/* Stella Studio, the website. Brand: cream paper, wine, Newsreader for display, DM Sans for text. */
@font-face { font-family: "DM Sans"; font-weight: 100 1000; font-style: normal; font-display: swap; src: url("/assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-weight: 100 1000; font-style: normal; font-display: swap; src: url("/assets/fonts/dm-sans-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-weight: 200 800; font-style: normal; font-display: swap; src: url("/assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-weight: 200 800; font-style: normal; font-display: swap; src: url("/assets/fonts/newsreader-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #F5F0E6;
  --sunk: #EAE1D2;
  --ink: #302A29;
  --soft: #675D57;
  --wine: #802D38;
  --wine-strong: #6A2330;
  --night: #1B1817;
  --night-soft: #B5ABA2;
  --lit: #F2C46B;           /* the caption's spoken word, as in Stella's captions */

  --display: "Newsreader", "New York", Georgia, serif;
  --text: "DM Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* five sizes */
  --s-xl: clamp(56px, 9.5vw, 150px);
  --s-l: clamp(36px, 5.4vw, 88px);
  --s-m: clamp(23px, 2.5vw, 36px);
  --s-body: 18px;
  --s-small: 15px;

  --margin: 32px;
  --gap: 24px;
  --section: 160px;
  --round: 999px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --t-press: 120ms;
  --t-hover: 180ms;
}
@media (max-width: 760px) {
  :root { --margin: 20px; --gap: 14px; --section: 120px; --s-body: 17px; --s-l: 9vw; --s-m: 22px; --s-small: 14px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--s-body)/1.55 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, figure, fieldset, ul { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--wine); color: var(--paper); }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; border-radius: 4px; }
/* on the dark and wine fields the outline turns light, so it always shows */
:is(.how, .faq, .foot, .lang ul, .doc-foot) :focus-visible, .button:focus-visible { outline-color: var(--lit); }

.skip { position: absolute; left: var(--margin); top: -60px; z-index: 10; padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: var(--round); }
.skip:focus { top: 12px; }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .22em; text-decoration-thickness: .07em; transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }

.button, .blank-button {
  display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; text-decoration: none;
  background: var(--wine); color: var(--paper); border-radius: var(--round); font-weight: 600;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button { height: 44px; padding: 0 22px; font-size: var(--s-small); white-space: nowrap; }
.button:active, .blank-button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .button:hover, .blank-button:hover { background: var(--wine-strong); } }

/* --- navigation: wordmark, three links, language, one action */
.nav { position: absolute; z-index: 5; inset: 0 0 auto; background: var(--paper); display: flex; align-items: center; gap: 28px; padding: 24px var(--margin); font-size: var(--s-small); font-weight: 500; }
.wordmark { display: block; flex: none; width: 132px; height: 50px; margin-right: auto; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.wordmark-art { display: block; width: 100%; height: 100%; background: var(--wine); -webkit-mask: url("/assets/logo-long.svg") left center / contain no-repeat; mask: url("/assets/logo-long.svg") left center / contain no-repeat; }
.nav-links { display: flex; gap: 28px; white-space: nowrap; }
@media (max-width: 1080px) { .nav-links { display: none; } }
.nav-links a { text-decoration-thickness: 1.5px; }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; padding: 10px 4px; white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.lang ul { position: absolute; right: 0; top: 100%; list-style: none; min-width: 180px; padding: 8px; background: var(--night); color: var(--paper); border-radius: 14px; }
.lang li a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; }
.lang li a[aria-current] { font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .lang li a:hover { background: color-mix(in srgb, var(--paper) 14%, transparent); } }

/* --- hero: two fields, the sentence across the seam */
.hero { --seam: 50%; position: relative; min-height: max(100svh, 660px); background: var(--wine); color: var(--paper); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: var(--seam); background: var(--paper); }
.hero-title {
  --cut: 1.1em; /* where the seam crosses the title, from its top: through the upper third of line two */
  position: absolute; left: var(--margin); right: var(--margin); top: calc(var(--seam) - var(--cut));
  font: 500 var(--s-xl)/.88 var(--display); letter-spacing: -.035em; text-align: center;
}
.ht { display: block; }
.ht-top { color: var(--wine); clip-path: inset(0 0 calc(100% - var(--cut)) 0); }
.ht-bottom { position: absolute; inset: 0; color: var(--paper); clip-path: inset(var(--cut) 0 0 0); }
/* the word Stella shows instead of says: a caption, lit word by word */
/* inline-block with overflow: its bottom edge sits on the baseline, its top near the cap height */
.slot { display: inline-block; vertical-align: baseline; width: 2.3em; height: .66em; border-radius: .1em; background: var(--night); overflow: hidden; }
.slot-in { display: flex; align-items: center; justify-content: center; height: 100%; }
.slot-words { display: inline-flex; gap: .28em; font: 700 .17em/1 var(--text); letter-spacing: 0; color: var(--paper); white-space: nowrap; }
.slot-words b { font-weight: 700; color: var(--lit); }
.slot-words del { color: var(--night-soft); text-decoration-thickness: .12em; }
.hero-sub { position: absolute; left: 50%; bottom: max(56px, 16%); width: min(46ch, calc(100% - 2 * var(--margin))); transform: translateX(-50%); text-align: center; font-size: 20px; line-height: 1.5; }

/* --- how it works: a staircase of lines */
.how { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); row-gap: 56px; padding: 40px var(--margin) var(--section); background: var(--wine); color: var(--paper); }
.step { grid-column: var(--from) / span 6; }
.s1 { --from: 1; } .s2 { --from: 3; } .s3 { --from: 5; } .s4 { --from: 7; }
.step-line { font: 500 var(--s-l)/1 var(--display); letter-spacing: -.03em; }
.s4 .step-line { color: var(--lit); } /* the last step lit, like the spoken word in a caption */
.step p { max-width: 36ch; margin-top: 14px; }

/* --- the live thing: type a sentence, Stella cuts it */
.try { display: flex; flex-direction: column; min-height: 80svh; padding: 72px var(--margin) 56px; background: var(--sunk); }
.try-title { font: 500 var(--s-m)/1.15 var(--display); letter-spacing: -.01em; }
.try-input { display: block; width: 100%; margin-top: 28px; padding: 0; border: 0; background: none; outline: none; font: 500 var(--s-l)/1.15 var(--display); letter-spacing: -.03em; color: var(--ink); caret-color: var(--wine); text-overflow: ellipsis; }
.try-input:focus-visible { outline: none; }
.try-box:focus-within .try-input { text-decoration: underline; text-decoration-color: var(--wine); text-decoration-thickness: 3px; text-underline-offset: .18em; }
.try-answer { display: grid; grid-template-columns: minmax(0, 560px) auto; align-items: center; gap: 20px 48px; margin-top: 44px; }
.try-text { font-size: 20px; line-height: 1.65; }
.try-text del { color: var(--soft); text-decoration-color: var(--wine); text-decoration-thickness: 2px; }
.try-text del small { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: var(--round); background: var(--paper); color: var(--wine); font-size: 14px; font-weight: 600; text-decoration: none; vertical-align: 2px; }
.try-caption { grid-row: span 2; justify-self: start; display: grid; place-items: center; width: 168px; aspect-ratio: 9 / 16; border-radius: 16px; background: var(--night); color: var(--paper); font: 800 22px/1.1 var(--text); text-align: center; padding: 14px; }
.try-caption b { color: var(--lit); }
.try-sum { font-size: var(--s-small); color: var(--soft); }
.try-foot { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-top: auto; padding-top: 48px; }
.try-examples { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; max-width: 760px; }
.try-examples span { color: var(--soft); }
.try-ex { padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font-size: var(--s-body); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); }
@media (hover: hover) and (pointer: fine) { .try-ex:hover { text-decoration-color: var(--ink); } }
.try-note { max-width: 40ch; font-size: var(--s-small); color: var(--soft); }

/* --- what it does: rows hanging from one axis, pictures in the margin */
.what { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); padding: var(--section) var(--margin) 0; }
.what-title { grid-column: 5 / span 8; padding: 0 0 88px; font: 500 var(--s-l)/1 var(--display); letter-spacing: -.03em; }
.row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; }
.row + .row { margin-top: 88px; }
.row-text { grid-column: 5 / span 4; }
.row-text h3 { font: 500 var(--s-m)/1.1 var(--display); letter-spacing: -.01em; }
.row-text p { margin-top: 14px; max-width: 36ch; }
.row-pic { grid-column: 9 / -1; justify-self: end; overflow: hidden; background: var(--night); }
.row-pic img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.p-plan { width: min(100%, 380px); aspect-ratio: 3 / 2; }
.p-cuts { width: min(100%, 260px); aspect-ratio: 4 / 5; }
.p-podcast { width: 100%; aspect-ratio: 3 / 2; }
.p-voice { width: min(100%, 220px); aspect-ratio: 1; }
.p-news { width: min(100%, 320px); aspect-ratio: 4 / 5; }

/* --- questions: large on the left, answers beside, all open */
.faq { margin-top: var(--section); padding: 120px var(--margin); background: var(--night); color: var(--paper); }
.faq-row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: baseline; }
.faq-row + .faq-row { margin-top: 72px; }
.faq-row h2, .faq-row h3 { grid-column: 1 / span 6; font: 500 var(--s-m)/1.12 var(--display); letter-spacing: -.01em; }
.faq-head h2 { color: var(--night-soft); }
.faq-row p { grid-column: 8 / -1; max-width: 42ch; }

/* --- join: the form is a sentence with blanks */
.join { padding: 120px var(--margin); background: var(--sunk); }
.join-form { max-width: 1200px; }
.join-big { font: 500 var(--s-l)/1.2 var(--display); letter-spacing: -.03em; }
.join-h { cursor: text; }
.blank { height: 1.15em; padding: 0 .35em; border: 0; border-radius: .2em; background: var(--paper); color: var(--ink); font: inherit; letter-spacing: inherit; vertical-align: baseline; width: 7em; max-width: 100%; }
.blank.wide { width: 9.5em; }
.blank::placeholder { color: var(--soft); opacity: 1; }
.blank:focus-visible { outline: 3px solid var(--wine); outline-offset: 2px; }
select.blank { width: auto; padding-right: 1.4em; appearance: none; cursor: pointer; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23302A29' stroke-width='1.6'/%3E%3C/svg%3E") right .45em center / .45em auto no-repeat; }
.blank-button { height: 1.15em; padding: 0 .5em; font: 500 1em/1 var(--display); letter-spacing: -.02em; vertical-align: baseline; }
.join-more { margin-top: 64px; font: 500 var(--s-m)/1.3 var(--display); color: var(--soft); }
.join-line { margin-top: 18px; font: 500 var(--s-m)/1.55 var(--display); letter-spacing: -.01em; }
.join-line .blank { width: 7.5em; }
.join-line .blank.wide { width: min(16em, 100%); }
.chips > span { margin-right: .3em; }
.chip { position: relative; display: inline-block; margin: 0 .2em .25em 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 0 .45em; border-radius: var(--round); background: var(--paper); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--wine); outline-offset: 2px; }
.join-end { margin-top: 56px; }
.join-after { margin-top: 18px; font-size: var(--s-small); color: var(--soft); }
.join-status { margin-top: 12px; font-weight: 600; min-height: 1.5em; }
.join-status.ok { color: var(--wine); font: 500 var(--s-m)/1.2 var(--display); }

/* the form's hidden field for bots: off screen, out of the tab order and of the accessibility tree */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- footer: the address is the headline */
.foot { display: flex; flex-direction: column; min-height: 72svh; padding: 40px var(--margin) 28px; background: var(--night); color: var(--paper); }
.foot-top { display: flex; justify-content: space-between; gap: 24px; font-size: var(--s-small); }
.foot-label { margin-top: auto; color: var(--night-soft); font-size: var(--s-small); }
.foot-mail { display: flex; flex-wrap: wrap; margin-top: 8px; font: 500 clamp(40px, 9vw, 150px)/.95 var(--display); letter-spacing: -.04em; text-decoration: none; color: var(--paper); transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .foot-mail:hover { color: var(--lit); } }
.foot-meta { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 24px; margin-top: 40px; font-size: 14px; color: var(--night-soft); }
.foot-meta p:last-child { text-align: right; }
.foot-langs a { display: inline-block; padding: 4px 0; margin-right: 14px; }
.foot-langs a[aria-current] { color: var(--paper); }
.foot-credits a { color: var(--night-soft); }

/* very narrow phones: the language menu keeps its arrow, the button its words */
.lang-short { display: none; }
@media (max-width: 440px) { .lang-long { display: none; } .lang-short { display: inline; } }
@media (max-width: 380px) { .wordmark { width: 84px; } .button { padding: 0 12px; } }

/* --- phone */
@media (max-width: 760px) {
  .nav { gap: 14px; padding: 16px var(--margin); }
  .nav-links { display: none; }
  .wordmark { width: 104px; height: 40px; }
  .button { height: 40px; padding: 0 16px; }
  .lang ul { right: -70px; }
  .nav-right { gap: 12px; }

  .hero { --seam: 46%; }
  .hero-title { font-size: clamp(40px, 12.4vw, 72px); --cut: 1.08em; }
  .slot { width: 2.2em; }
  .slot-words { font-size: .2em; }
  .hero-sub { bottom: 14%; font-size: 17px; max-width: 30ch; }

  .how { row-gap: 40px; }
  .step { grid-column: 1 / -1; padding-left: calc(var(--i) * 6vw); }
  .s1 { --i: 0; } .s2 { --i: 1; } .s3 { --i: 2; } .s4 { --i: 3; }

  .try { padding-top: 56px; }
  .try-answer { grid-template-columns: 1fr; margin-top: 28px; }
  .try-caption { grid-row: auto; width: 132px; font-size: 17px; }
  .try-foot { flex-direction: column; align-items: start; }

  .what { display: block; }
  .what-title { padding-bottom: 72px; }
  .row { display: block; }
  .row + .row { margin-top: 64px; }
  .row-pic { margin-top: 20px; }
  .p-plan, .p-podcast { width: 100%; }
  .p-cuts { width: 70%; margin-left: auto; }
  .p-voice { width: 55%; }
  .p-news { width: 70%; margin-left: auto; }

  .faq-row { display: block; }
  .faq-row + .faq-row { margin-top: 48px; }
  .faq-row p { margin-top: 12px; }

  .join { padding: 80px var(--margin); }
  .join-big .blank { display: block; width: 100%; margin: .15em 0; }
  .join-line .blank { width: 8em; }
  .chips { font-size: 18px; } /* a row of choices, not a statement */
  .join-line .blank.wide { width: 100%; margin-top: .2em; }

  .foot-mail { font-size: 12vw; }
  .foot-meta { grid-template-columns: 1fr; gap: 10px; }
  .foot-meta p:last-child { text-align: left; }
}

/* --- motion: entrances, the shutter picture, a slow drift */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--d, 0) * 75ms); }
  .js .rise.is-in { opacity: 1; transform: none; }
  .js .hero .ht { animation: settle 1100ms var(--ease-out) both; }
  .js .hero .slot { animation: open 1100ms var(--ease-in-out) 250ms both; }
  .js .hero-sub { animation: fade 900ms var(--ease-out) 500ms both; }
  .js .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter img { transform: scale(1.12); transition: transform 1500ms var(--ease-out); }
  .js .shutter.is-in { clip-path: inset(0); }
  .js .shutter.is-in img { transform: none; }
  @keyframes settle { from { opacity: 0; transform: translateY(.12em); } }
  @keyframes open { from { clip-path: inset(0 50% 0 50% round .1em); } to { clip-path: inset(0 0 0 0 round .1em); } }
  @keyframes fade { from { opacity: 0; transform: translateX(-50%) translateY(12px); } }
  @supports (animation-timeline: view()) {
    .row-pic:not(.shutter) img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    @keyframes drift { from { transform: scale(1.08) translateY(-3%); } to { transform: scale(1.08) translateY(3%); } }
  }
}

/* --- the legal pages: one readable column */
.doc .nav-doc { position: static; }
.doc-body { max-width: 68ch; margin: 0 auto; padding: 56px var(--margin) 120px; }
.doc-body h1 { font: 500 var(--s-l)/1 var(--display); letter-spacing: -.03em; }
.doc-body h2 { margin-top: 48px; font: 500 var(--s-m)/1.15 var(--display); letter-spacing: -.01em; }
.doc-body h3 { margin-top: 32px; font: 600 var(--s-body)/1.3 var(--text); }
.doc-body p, .doc-body ul { margin-top: 16px; }
.doc-body ul { padding-left: 1.2em; }
.doc-body li + li { margin-top: 8px; }
.doc-date { color: var(--soft); font-size: var(--s-small); }
.doc-body ol { margin-top: 16px; padding-left: 1.6em; }
.doc-toc { margin-top: 32px; padding: 20px 24px; background: var(--sunk); border-radius: 12px; font-size: var(--s-small); }
.doc-toc ol { margin-top: 0; columns: 2 16ch; column-gap: var(--gap); }
.doc-toc li + li { margin-top: 4px; }
.doc-table { margin-top: 16px; overflow-x: auto; }
.doc-table table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: var(--s-small); }
.doc-table :is(th, td) { padding: 10px 12px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sunk); }
.doc-table thead th { border-bottom: 2px solid var(--ink); }
.doc-form { margin-top: 16px; padding: 4px 24px 20px; border-left: 3px solid var(--sunk); }
.doc-body code { font-size: .9em; background: var(--sunk); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
/* placeholders in drafts, to fill in before publishing */
.todo { background: var(--lit); color: var(--ink); padding: 0 3px; border-radius: 3px; }
.doc-foot { padding: 32px var(--margin); background: var(--night); color: var(--paper); font-size: var(--s-small); }
