/* Styles for the home page and the DM pages (/script-template/, /before-you-record/, /practice-scripts/); /start only forwards home.
   Colours come from the app icon (lilac, frost, graphite) and the recording screen (true black, record red).
   Red appears only on the recording status. */
:root {
    --lilac: #B29BE2;
    --lilac-deep: #5F45A8;
    --frost: #F1EDFB;
    --graphite: #26252C;
    --black: #000000;
    --white: #FFFFFF;
    --rec: #FF3B30;
    --ink-soft: rgba(38, 37, 44, 0.82);
    --font: 'Atkinson Hyperlegible Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --gutter: clamp(20px, 5vw, 56px);
    --page: 1180px;
}

/* Japanese and Korean pages: system fonts (Atkinson has no CJK glyphs), looser lines, no mid-word breaks in Korean */
:root:lang(ja) { --font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', Meiryo, sans-serif; }
:root:lang(ko) { --font: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif; }
:lang(ja) body { line-height: 1.75; line-break: strict; word-break: auto-phrase; overflow-wrap: anywhere; }
:lang(ko) body { line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) :is(h1, h2, h3), :lang(ko) :is(h1, h2, h3) { line-height: 1.3 !important; letter-spacing: 0 !important; }
:lang(ja) h1, :lang(ko) h1 { font-size: clamp(2rem, min(8.4vw, 13svh), 3.7rem) !important; }
:lang(ja) h2, :lang(ko) h2 { font-size: clamp(1.6rem, 5vw, 2.6rem) !important; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 1.125rem;
    line-height: 1.5;
    color: var(--graphite);
    background: var(--lilac);
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p, li, figcaption { text-wrap: pretty; }
::selection { background: var(--graphite); color: var(--frost); }
.story ::selection { background: var(--lilac); color: var(--black); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--graphite); outline-offset: 3px; border-radius: 4px; }
.story a:focus-visible, .foot a:focus-visible { outline-color: var(--white); }

.skip { position: absolute; left: -999px; top: 0; background: var(--graphite); color: var(--white); padding: 10px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.page { max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }

/* Download bar on iPhone and iPad. Apple's own Smart App Banner shows only in Safari, never in
   Instagram's browser, and its taps can't be tracked. This one works everywhere and carries the campaign token. */
.getbar { display: none; }
.is-ios .getbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 11px;
    padding: 9px clamp(14px, 4vw, 24px);
    background: var(--frost);
    box-shadow: 0 -120px 0 120px var(--frost); /* fills the area under Safari's status bar */
}
.getbar img { width: 42px; height: 42px; border-radius: 10px; flex: none; }
.getbar-text { flex: 1; min-width: 0; line-height: 1.24; }
.getbar-text strong { display: block; font-size: 0.97rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.getbar-text span { display: block; font-size: 0.86rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.getbar a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--graphite); color: var(--white); font-size: 1rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
/* Small phones (320 to 359px): the icon steps aside so the name and "no card" both fit */
@media (max-width: 359px) {
    .getbar img { display: none; }
    .getbar-text strong, .getbar-text span { white-space: normal; }
    .getbar a { padding: 0 18px; }
}
.is-ios .hero .bar { display: none; }
.is-ios .status-strip { top: 62px; }
/* Phones up to 439px: the free-week line takes two lines instead of losing "no card needed" to an ellipsis.
   Non-breaking spaces in the HTML leave the comma as the only break. The bar grows to 71px, so the story's
   status pill moves down with it. */
@media (max-width: 439px) {
    .getbar-text span { white-space: normal; }
    .is-ios .status-strip { top: 71px; }
}

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.bar-cta { display: none; font-weight: 700; font-size: 1rem; text-underline-offset: 4px; white-space: nowrap; }
@media (min-width: 560px) { .bar-cta { display: inline; } }

/* Hero */
.hero { padding-bottom: clamp(48px, 8vw, 80px); }
.hero-grid { display: grid; gap: 36px; padding-top: clamp(16px, 5vw, 56px); }
h1 {
    /* the svh term keeps the headline from filling a phone held sideways */
    font-size: clamp(2.7rem, min(12.2vw, 17svh), 6.4rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.03em;
}
h1 span { display: block; }
h1 .next { margin-top: 0.14em; animation: arrive 600ms 250ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes arrive {
    from { opacity: 0; transform: translateY(0.5em); }
    to { opacity: 1; transform: none; }
}
.lede { font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.48; max-width: 31em; margin-top: 22px; }

.get { display: grid; justify-items: start; gap: 10px; margin-top: 26px; }
.get img { height: 56px; width: auto; }
.get p { font-weight: 700; }
.small { font-size: 0.95rem; color: var(--ink-soft); }

/* Visitors who are not on an iPhone or iPad */
.elsewhere { display: none; align-items: center; gap: 16px; margin-top: 18px; max-width: 26em; }
.elsewhere p { font-size: 1rem; }
.elsewhere img { display: none; width: 96px; height: 96px; background: var(--white); padding: 6px; border-radius: 10px; flex: none; }
.msg-android, .msg-desktop { display: none; }
.is-android .elsewhere, .is-desktop .elsewhere { display: flex; }
.is-desktop .elsewhere img { display: block; }
.is-android .msg-android, .is-desktop .msg-desktop { display: block; }

/* The whole phone is always visible */
.phone {
    width: min(74vw, 330px);
    justify-self: center;
    border: 9px solid var(--graphite);
    border-radius: 46px;
    overflow: hidden;
    background: var(--graphite);
}
.phone img { width: 100%; height: auto; }

/* Smaller real captures in the same graphite frame */
.shot {
    width: 100%; height: auto;
    border: 6px solid var(--graphite);
    border-radius: 30px;
    background: var(--graphite);
}
figcaption { margin-top: 12px; font-size: 1rem; line-height: 1.4; }

/* iPad portrait and small laptops: text and phone side by side */
@media (min-width: 760px) {
    h1 { font-size: clamp(3rem, 6.4vw, 5rem); }
    .hero-grid { grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: 44px; }
    .phone { width: 260px; border-width: 8px; border-radius: 38px; }
}
@media (min-width: 960px) {
    h1 { font-size: clamp(3.6rem, 6.2vw, 5rem); }
    .hero-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; padding-top: 20px; }
    .phone { width: 340px; border-width: 9px; border-radius: 46px; }
}
/* A phone held sideways: the phone sits beside the text, small enough to stay whole */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 959px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 32px; padding-top: 12px; }
    .phone { width: min(30vw, 150px); border-width: 6px; border-radius: 24px; }
}

/* The page behaves like the app: lines light up as you scroll, and the clock stops when you stop */
.story { background: var(--black); color: var(--white); position: relative; padding-bottom: clamp(56px, 9vw, 104px); }
/* The pill rides on a black strip that fades out, so lines scrolling under it never collide with it */
.status-strip {
    position: sticky; top: 0; z-index: 2;
    padding-top: 14px; padding-bottom: 26px;
    margin-bottom: -26px;
    background: linear-gradient(var(--black) 62%, rgba(0, 0, 0, 0));
    visibility: hidden;
}
.follow .status-strip { visibility: visible; }
.status {
    display: inline-flex; align-items: center; gap: 9px;
    margin-top: 2px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #2C2C2E;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; /* the app's own UI font */
    font-size: 0.95rem; font-weight: 500;
    font-variant-numeric: tabular-nums;
}
/* The Red Light Rule: the dot is red only while the page "records" (you scroll), gray while it waits */
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: #8E8E93; }
.status.on .dot { background: var(--rec); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.reader { max-width: 15.5em; font-size: clamp(2.05rem, 8.2vw, 4.6rem); padding-block: 18vh 14vh; margin-left: 0.5em; }
.line {
    position: relative;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.015em;
    padding-block: 0.36em;
    transition: color 220ms linear;
}
/* Upcoming lines at 0.42 white stay above 3:1 on black (about 3.9:1) */
.follow .line { color: rgba(255, 255, 255, 0.42); }
.follow .line.read { color: rgba(255, 255, 255, 0.58); }
.follow .line.now { color: var(--white); }
/* Same reading marker as in the app */
.follow .line.now::before {
    content: ""; position: absolute; left: -0.62em; top: 0.72em;
    border-left: 0.3em solid rgba(255, 255, 255, 0.75);
    border-block: 0.18em solid transparent;
}
.line.turn { margin-top: 1.1em; }

/* Plain sections */
.sheet { padding-block: clamp(64px, 11vw, 120px); }
.sheet.frost { background: var(--frost); }
h2 { font-size: clamp(2.2rem, 6.4vw, 3.6rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.022em; text-wrap: balance; }
.sub { max-width: 34em; margin-top: 16px; font-size: 1.25rem; line-height: 1.42; }

.steps { list-style: none; counter-reset: step; margin-top: 44px; display: grid; gap: 34px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 14px; max-width: 40em; }
.steps li::before { content: counter(step); font-size: 2.1rem; font-weight: 800; line-height: 1.1; color: var(--lilac-deep); }
.steps h3 { font-size: 1.6rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.steps p { grid-column: 2; margin-top: 4px; }

.how-shots { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 4vw, 32px); max-width: 500px; margin-top: 44px; }
@media (min-width: 960px) {
    .how { display: grid; grid-template-columns: minmax(0, 1fr) 480px; column-gap: 64px; align-items: start; }
    .how h2 { grid-column: 1 / -1; }
    .how-shots { grid-column: 2; grid-row: 2; margin-top: 44px; }
}

.also { list-style: none; margin-top: 36px; columns: 2 380px; column-gap: 56px; }
.also li { break-inside: avoid; padding-block: 10px; font-size: 1.25rem; line-height: 1.34; font-weight: 500; }

/* What it costs */
.plans { display: grid; gap: 44px; margin-top: 44px; max-width: 60em; }
.plan h3 { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.plan .price { font-size: 1.25rem; margin-top: 2px; }
.plan ul { list-style: none; margin-top: 14px; }
.plan li { position: relative; padding-block: 5px; padding-left: 1.02em; }
.plan li::before { content: ""; position: absolute; left: 0; top: calc(5px + 0.56em); width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--graphite); }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; gap: 64px; } }
.terms { margin-top: 32px; max-width: 42em; }
.terms a { text-underline-offset: 3px; }

/* Questions */
.faq { margin-top: 32px; max-width: 42em; }
.faq details { padding-block: 16px; border-bottom: 1px solid rgba(38, 37, 44, 0.24); }
/* The app's own reading triangle as the marker; wrapped questions keep a hanging indent */
.faq summary { position: relative; list-style: none; cursor: pointer; padding-left: 1.15em; font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
    content: ""; position: absolute; left: 0.1em; top: 0.4em;
    border-left: 0.42em solid currentColor;
    border-block: 0.26em solid transparent;
    transition: transform 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.faq details[open] summary::before { transform: rotate(90deg); }
.faq p { margin-top: 8px; padding-left: calc(1.3rem * 1.15); }

.end { padding-block: clamp(64px, 11vw, 112px); }
.end h2 { font-size: clamp(2.6rem, 8.6vw, 5rem); max-width: 12em; }

/* The DM pages (/script-template/, /before-you-record/, /practice-scripts/): what a comment keyword on Instagram sends to a phone.
   Same bands and type as the home page, a smaller headline, no app screenshots (the app's look is being redone).
   The template sits on recording black and reads like the prompter, with its triangle on the first line. */
.short h1 { font-size: clamp(2.4rem, min(10.6vw, 14svh), 4.4rem); line-height: 1.02; max-width: 12em; text-wrap: balance; }
.short .hero { padding-bottom: clamp(44px, 8vw, 80px); }
.short .hero .page:last-child { padding-top: clamp(12px, 4vw, 40px); }
.short .lede { max-width: 30em; margin-top: 16px; }

.tpl { background: var(--black); color: var(--white); padding-block: clamp(56px, 10vw, 104px); }
.tpl ::selection { background: var(--lilac); color: var(--black); }
.tpl-parts { list-style: none; margin-top: 34px; display: grid; gap: 30px; max-width: 34em; }
.tpl-parts .label { font-size: 1rem; font-weight: 700; color: var(--lilac); }
.tpl-parts .slot {
    position: relative;
    margin-top: 4px;
    font-size: clamp(1.45rem, 5.6vw, 2.1rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em;
}
.tpl-parts .slot.now::before {
    content: ""; position: absolute; left: -0.6em; top: 0.42em;
    border-left: 0.3em solid rgba(255, 255, 255, 0.75);
    border-block: 0.18em solid transparent;
}
.tpl-parts .tip { margin-top: 8px; font-size: 1.06rem; color: rgba(255, 255, 255, 0.78); }
.copy {
    display: inline-flex; align-items: center; min-height: 52px; margin-top: 40px; padding: 0 26px;
    border: 0; border-radius: 999px; background: var(--frost); color: var(--graphite);
    font: 700 1.1rem var(--font); cursor: pointer;
}
.copy:hover { background: var(--white); }
.copy:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.copy-note { margin-top: 10px; font-size: 0.95rem; color: rgba(255, 255, 255, 0.72); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: pre; border: 0; }

.example { margin-top: 32px; max-width: 36em; }
.example dt { font-size: 1rem; font-weight: 700; color: var(--lilac-deep); }
.example dt:not(:first-child) { margin-top: 20px; }
.example dd { margin-top: 2px; font-size: 1.3rem; line-height: 1.38; font-weight: 500; }
.note-title { margin-top: 48px; font-size: 1.6rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.note { margin-top: 8px; max-width: 34em; }
.crosslink { margin-top: 36px; font-weight: 700; }
.crosslink + .crosslink { margin-top: 12px; }
.crosslink a { text-underline-offset: 4px; }

/* A checklist you can tick on the phone; nothing is stored */
.check { list-style: none; margin-top: 20px; max-width: 36em; }
.check label { display: grid; grid-template-columns: 30px 1fr; column-gap: 14px; padding-block: 8px; cursor: pointer; }
.check input {
    appearance: none; -webkit-appearance: none;
    width: 30px; height: 30px; margin: 0;
    border: 2.5px solid var(--graphite); border-radius: 8px; background: transparent;
    display: grid; place-content: center; cursor: pointer;
}
.check input::before {
    content: ""; width: 13px; height: 7px; margin-top: -3px;
    border-left: 3px solid var(--frost); border-bottom: 3px solid var(--frost);
    transform: rotate(-45deg); opacity: 0;
}
.check input:checked { background: var(--graphite); }
.check input:checked::before { opacity: 1; }
.check input:focus-visible { outline: 3px solid var(--graphite); outline-offset: 3px; }
.check strong { display: block; font-size: 1.22rem; font-weight: 700; line-height: 1.3; }
.check .why { display: block; margin-top: 2px; font-size: 1rem; line-height: 1.4; color: var(--ink-soft); }
.check input:checked + span { opacity: 0.62; }
.end-short h2 { max-width: 12em; }

/* Practice scripts (/practice-scripts/): a three-step how-to in the hero, then six scripts on recording black.
   Each script reads like the prompter: white text with the reading triangle on its first line, a Frost copy button. */
.howto { list-style: none; counter-reset: step; margin-top: 26px; display: grid; gap: 10px; max-width: 32em; }
.howto li { counter-increment: step; display: grid; grid-template-columns: 1.8rem 1fr; column-gap: 8px; line-height: 1.45; }
.howto li::before { content: counter(step); font-size: 1.3rem; font-weight: 800; line-height: 1.12; }
.scripts-note { margin-top: 12px; font-size: 1rem; color: rgba(255, 255, 255, 0.72); }
.scripts { list-style: none; margin-top: 28px; max-width: 34em; }
.scripts > li { padding-block: 36px 20px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.scripts h3 { font-size: 1.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.scripts .role { display: block; margin-bottom: 2px; font-size: 1rem; font-weight: 700; letter-spacing: 0; color: var(--lilac); }
.scripts .meta { margin-top: 4px; font-size: 0.95rem; color: rgba(255, 255, 255, 0.72); }
.scripts .direction { margin-top: 10px; font-size: 1.06rem; color: rgba(255, 255, 255, 0.86); }
.script-text {
    position: relative;
    margin-top: 22px;
    font-size: clamp(1.35rem, 5.2vw, 1.9rem); font-weight: 700; line-height: 1.26; letter-spacing: -0.01em;
}
.script-text::before {
    content: ""; position: absolute; left: -0.6em; top: 0.42em;
    border-left: 0.3em solid rgba(255, 255, 255, 0.75);
    border-block: 0.18em solid transparent;
}
.scripts .copy { margin-top: 26px; }
.scripts .copy-note { min-height: 1.5em; }
/* Wide screens: two scripts side by side, copy buttons lined up at the bottom of each row */
@media (min-width: 1100px) {
    .scripts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; max-width: none; }
    .scripts > li { display: flex; flex-direction: column; align-items: flex-start; }
    .script-text { flex: 1; font-size: 1.6rem; }
}

.foot { background: var(--graphite); color: var(--white); padding-block: 40px calc(150px + env(safe-area-inset-bottom, 0px)); font-size: 1rem; }
@media (min-width: 760px) { .foot { padding-bottom: 56px; } }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; margin-bottom: 14px; }
.foot a { text-underline-offset: 3px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Cookie consent bar (built by analytics.js). The script's own look belongs to /agents; on these pages it
   follows this system: a flat graphite band, the site font, no shadow, 44px buttons. */
html #consent-bar {
    left: 0; right: 0; bottom: 0; max-width: none; margin: 0;
    padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
    background: var(--graphite); color: var(--white);
    border: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); border-radius: 0; box-shadow: none;
    font: 1rem/1.45 var(--font);
    gap: 10px 20px; justify-content: flex-start;
}
html #consent-bar p { flex: 1 1 280px; max-width: 40em; color: rgba(255, 255, 255, 0.86); }
html #consent-bar a { color: var(--frost); text-underline-offset: 3px; }
html #consent-bar button {
    min-height: 44px; padding: 0 20px;
    font: 700 1rem var(--font);
    border: 1px solid rgba(255, 255, 255, 0.5); background: transparent; color: var(--white);
}
html #consent-bar button.cb-yes { background: var(--frost); color: var(--graphite); border-color: var(--frost); }
html #consent-bar button:focus-visible { outline: 3px solid var(--frost); outline-offset: 2px; }
.foot p { color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
    h1 .next { animation: none; }
    .line { transition: none; }
    .status.on .dot { animation: none; }
    .faq summary::before { transition: none; }
}
