/* anana.social: the host's house (docs/DESIGN.md, Website).
   Lacquer red rooms with the logo's lattice as white trellis, white plaster panels for
   reading, arched frames for every photo, a black-and-white checkerboard floor.
   Gloock for display, Jost in tracked capitals for labels and navigation, the system
   font for reading. Phone first. No cookies or trackers. */
@font-face { font-family: "Gloock"; src: url("/fonts/Gloock-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("/fonts/Jost-variable-latin.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  /* Rooms */
  --lacquer: #AD1508;        /* the walls: white 7.27:1, --on-lacquer-soft 5.57:1 */
  --lacquer-deep: #6B0D05;   /* the plaque under the arch, pressed states */
  --plaster: #FFFFFF;        /* reading panels */
  --pearl: #F2F2F4;          /* the contents card: ink 17.02:1, ink-soft 6.49:1 */
  --border-pearl: #E3E3E7;
  --ink: #1F0A05;            /* text on plaster, the floor's dark squares, the footer */
  --ink-soft: #6B5148;       /* 7.25:1 on plaster */
  --on-lacquer: #FFFFFF;
  --on-lacquer-soft: #FFD9CF;  /* secondary text on the walls */
  --on-ink-soft: #D9CBC6;      /* footer text: 11.4:1 on ink */
  --trellis: rgba(255, 255, 255, 0.09);
  /* Brand marks (logo files, the turning symbol, list ovals). Never small text. */
  --brand-red: #FF2600;
  --brass: #D9B25A;          /* the door knobs only */
  --action-red: #E02200;     /* links on plaster: 4.77:1 */

  --display: "Gloock", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --system: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* 8px grid; the gutter is the one off-grid value. */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s6: 48px; --s8: 64px; --s12: 96px; --s16: 128px;
  --gutter: 20px;
  --measure: 38rem;
  --arch: 999px 999px 0 0;
  --hero: clamp(2.75rem, 10.5vw, 5.75rem);
  --title: clamp(2.25rem, 8vw, 3.5rem);
  --step: 1.75rem;
  --lead: 1.1875rem;
  --body: 1.0625rem;
  --secondary: 0.9375rem;
  --label: 0.8125rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--lacquer); }
body {
  margin: 0; background: var(--plaster); color: var(--ink);
  font: 400 var(--body)/1.6 var(--system);
}
img { max-width: 100%; }
::selection { background: var(--lacquer); color: var(--on-lacquer); }
.house ::selection { background: var(--plaster); color: var(--lacquer); }
.house .plaster ::selection { background: var(--lacquer); color: var(--on-lacquer); }
a { color: var(--action-red); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: var(--s2); z-index: 2; background: var(--plaster); color: var(--ink); padding: var(--s1) var(--s2); border-radius: 999px; }

h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 400; font-size: var(--step); line-height: 1.15; margin: 0; }
p, ul, ol { margin: var(--s2) 0 0; }
li + li { margin-top: var(--s2); }
/* Small labels: Jost in tracked capitals, like the lettering on a door plaque. */
nav.primary, footer.site nav, .toc > p, .arch figcaption, details summary, .button {
  font-family: var(--sans); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; font-size: var(--label);
}

/* The house: one lacquer wall behind the header and every page, carrying the trellis (the
   logo's lattice, x ± y = (k + 0.5)s, stroke 3.2/12 of s, at full scale, drawn as a mask so one
   token sets its color). Plaster panels are laid over it for reading; a .wall section lets the
   lacquer and the trellis show through, so the pattern runs unbroken from room to room. */
.house { background: var(--lacquer); color: var(--on-lacquer); z-index: 1; }
.house a { color: var(--on-lacquer); }
.plaster { background: var(--plaster); color: var(--ink); }
.plaster a { color: var(--action-red); }
.trellis { position: relative; isolation: isolate; }
.trellis::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--trellis);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M10 -10 50 30M-10 10 30 50M-10 30 30 -10M10 50 50 10' stroke='%23000' stroke-width='10.67' fill='none'/%3E%3C/svg%3E") center top / 72px 72px repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M10 -10 50 30M-10 10 30 50M-10 30 30 -10M10 50 50 10' stroke='%23000' stroke-width='10.67' fill='none'/%3E%3C/svg%3E") center top / 72px 72px repeat;
}

/* Header: on the wall. Phone: the lockup centred over a row of three links (symmetry, as a
   Regency facade). From 720px: the lockup left, the links right. */
header.site { padding: var(--s3) 0 var(--s1); }
header.site .wrap { display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.lockup { display: block; line-height: 0; }
.lockup img { height: 30px; width: auto; display: block; }
nav.primary { display: flex; justify-content: center; gap: var(--s3); }
nav.primary a { color: var(--on-lacquer-soft); text-decoration: none; min-height: 48px; display: inline-flex; align-items: center; }
nav.primary a:hover, nav.primary a[aria-current="page"] { color: var(--on-lacquer); }
nav.primary a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.5em; }
@media (min-width: 720px) {
  header.site .wrap { flex-direction: row; justify-content: space-between; }
  nav.primary { gap: var(--s4); }
}

/* Buttons and the App Store line: pills. On the walls they're white; the one filled
   button (the callback's "Open Anana") is plaster with lacquer lettering. */
.button {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  min-height: 56px; padding: var(--s1) var(--s4); border-radius: 999px;
  color: inherit; border: 1.5px solid currentColor; background: transparent;
}
.wall .button { color: var(--on-lacquer); }
.button.primary { background: var(--plaster); border-color: var(--plaster); color: var(--lacquer); font-weight: 600; }
.button:hover { background: rgba(255, 255, 255, 0.12); }
.button.primary:hover { background: var(--on-lacquer-soft); }
.button:active { transform: scale(0.97); }
/* Until the App Store ID is set: "Coming soon…" in a pill, sentence case so it fits a phone. */
.soon { display: inline-flex; align-items: center; min-height: 48px; padding: var(--s1) var(--s3); border: 1.5px solid currentColor; border-radius: 999px; margin: 0; font: 500 var(--secondary)/1.3 var(--sans); letter-spacing: 0.02em; }
@media (max-width: 400px) { .soon { padding: var(--s1) var(--s2); letter-spacing: 0; font-size: var(--label); } }
.badge { display: inline-block; line-height: 0; }
.badge img { height: 52px; width: auto; display: block; }

/* Arches: every photo stands in a plaster arch, with its caption seamed under it on a
   hairline. On the walls the arch is a white moulding around the photo. */
.arch { margin: 0; }
.arch .frame { position: relative; border-radius: var(--arch); overflow: hidden; background: var(--lacquer-deep); }
.arch img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.wall .arch .frame { padding: 8px; background: var(--plaster); }
.wall .arch img { border-radius: var(--arch); }
.arch figcaption { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid currentColor; text-align: center; color: var(--ink-soft); }
.wall .arch figcaption { color: var(--on-lacquer-soft); }

/* Home: the foyer. The headline, the lead and the App Store line, centred, then the door:
   a tall arch whose two lacquer doors part once on arrival. */
.foyer { text-align: center; padding: var(--s4) 0 var(--s8); }
.foyer h1 { font-size: var(--hero); max-width: 12ch; margin: 0 auto; }
.foyer .lead { font-size: var(--lead); line-height: 1.5; color: var(--on-lacquer-soft); max-width: 30rem; margin: var(--s3) auto 0; }
.foyer .act { margin-top: var(--s4); display: flex; justify-content: center; }
.foyer .arch { width: min(100%, 30rem); margin: var(--s6) auto 0; }
.doors { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .doors { display: block; position: absolute; inset: 8px; border-radius: var(--arch); overflow: hidden; pointer-events: none; }
  .doors::before, .doors::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 50%;
    /* A raised panel moulding and a brass knob on each leaf. */
    background: radial-gradient(circle at calc(100% - 24px) 58%, var(--brass) 0 5px, transparent 6px), var(--lacquer);
    box-shadow: inset 0 0 0 14px var(--lacquer), inset 0 0 0 15px rgba(255, 255, 255, 0.35);
    animation: door-left 1.1s var(--ease-out) 0.15s both;
  }
  .doors::before { left: 0; border-right: 1px solid var(--lacquer-deep); }
  .doors::after { right: 0; animation-name: door-right;
    background: radial-gradient(circle at 24px 58%, var(--brass) 0 5px, transparent 6px), var(--lacquer); }
  /* With JavaScript they wait until the arch is on screen (index.html adds .seen). */
  .js .doors::before, .js .doors::after { animation-play-state: paused; }
  .js .arch.seen .doors::before, .js .arch.seen .doors::after { animation-play-state: running; }
}
@keyframes door-left { to { transform: translateX(-101%); } }
@keyframes door-right { to { transform: translateX(101%); } }

/* Rooms: each section is one wall (lacquer) or one panel (plaster), one heading, one arch. */
.room { padding: var(--s12) 0; }
.room h2 { font-size: var(--title); }
.room .grid { display: grid; gap: var(--s6); }
@media (min-width: 900px) {
  .room .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: var(--s12); align-items: start; }
  .room .grid.mirror { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); }
  .room .grid.mirror .arch { order: -1; }
}
.room .arch { width: min(100%, 24rem); margin: 0 auto; }
@media (min-width: 900px) {
  .foyer h1 { max-width: 18ch; }
  .foyer .arch { margin-top: var(--s4); }
  /* Plaster panels hang on the wall with the lacquer around them and a moulding line inside.
     The close stays full width: the turning symbol stands on the floor beneath it. */
  main > .plaster:not(.finale) { margin-inline: var(--s6); outline: 1px solid var(--border-pearl); outline-offset: calc(-1 * var(--s3)); }
  .room.plaster > .wrap { padding-inline: var(--s6); }
}

/* The trust facts: big lines, each with the logo's oval as its bullet. */
.facts { list-style: none; padding: 0; margin-top: var(--s4); }
.facts li { position: relative; padding-left: var(--s4); font-size: var(--lead); line-height: 1.45; }
.facts li + li { margin-top: var(--s3); }
.facts li::before, .doc ul li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 9px; height: 12px;
  border-radius: 50%; background: var(--brand-red);
}
.after { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--border-pearl); color: var(--ink-soft); max-width: var(--measure); }

/* How it works: the four steps descend in their order, each under a white hairline. */
.steps { list-style: none; padding: 0; margin-top: var(--s4); }
.steps li { border-top: 1px solid rgba(255, 255, 255, 0.35); padding-top: var(--s3); }
.steps li + li { margin-top: var(--s4); }
.steps p { margin-top: var(--s1); color: var(--on-lacquer-soft); max-width: var(--measure); }

/* The close: the turning symbol stands on the checkerboard floor, with the App Store line. */
.finale { text-align: center; padding: var(--s12) 0 0; }
.finale h2 { font-size: var(--title); }
.finale .act { margin-top: var(--s3); display: flex; justify-content: center; }
.finale .soon { color: var(--ink); }
.turning-symbol { position: relative; display: flex; justify-content: center; margin: var(--s8) 0 0; }
.turning-symbol img, .turning-symbol canvas { display: block; height: 120px; width: auto; }
.turning-symbol::after {
  content: ""; position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%);
  width: 88px; height: 12px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(31, 10, 5, 0.22), rgba(31, 10, 5, 0));
}

/* Inner pages: a lacquer plaque with the title, then the text on plaster. */
.plaque { padding: var(--s6) 0 var(--s8); text-align: center; }
.plaque h1 { font-size: var(--title); max-width: 16ch; margin: 0 auto; }
.plaque .lead { font-size: var(--lead); line-height: 1.5; color: var(--on-lacquer-soft); max-width: 32rem; margin: var(--s3) auto 0; }
.plaque .lead a { color: var(--on-lacquer); }
.doc { max-width: calc(var(--measure) + 2 * var(--gutter)); padding-top: var(--s6); padding-bottom: var(--s12); }
.doc h2 { font-family: var(--display); font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.01em; margin-top: var(--s8); scroll-margin-top: var(--s3); }
.doc > :first-child { margin-top: 0; }
.doc h2 + p, .doc h2 + ul, .doc h2 + ol, .doc h2 + details { margin-top: var(--s2); }
.doc ul { list-style: none; padding-left: 0; }
.doc ul li { position: relative; padding-left: var(--s3); }
.doc ul li::before { width: 7px; height: 9px; top: 0.6em; }
.doc ol { padding-left: var(--s3); }
.doc ol > li::marker { font-family: var(--sans); font-weight: 600; color: var(--lacquer); }
.doc strong { font-weight: 600; }
/* The one line on Safety that must not be missed. */
.doc .urgent { background: var(--pearl); border-radius: 16px; padding: var(--s2) var(--s3); }
/* Contents (Privacy, Terms): the section titles as links. */
.toc { background: var(--pearl); border-radius: 16px; padding: var(--s3); }
.toc > p { margin: 0; color: var(--ink-soft); }
.toc ol { list-style: none; padding: 0; margin-top: var(--s1); columns: 2 10rem; column-gap: var(--s3); }
.toc li { margin: 0; break-inside: avoid; }
.toc a { color: var(--ink); text-decoration: none; display: flex; align-items: center; min-height: 40px; }
.toc a:hover { text-decoration: underline; }
/* FAQ rows: the question with a chevron that turns, a hairline between rows. */
details { border-top: 1px solid var(--border-pearl); padding: var(--s1) 0; }
details:last-of-type, details:has(+ :not(details)) { border-bottom: 1px solid var(--border-pearl); }
details summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); list-style: none; letter-spacing: 0.04em; text-transform: none; font-size: var(--body); font-weight: 600; }
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: ""; flex: none; width: 16px; height: 16px; background: var(--lacquer);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' stroke='%23000' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' stroke='%23000' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
details[open] summary::after { transform: rotate(180deg); }
details p { margin: 0 0 var(--s2); }
details + h2 { margin-top: var(--s8); }

/* 404 and the sign-in callback: one centred moment on the wall. */
.moment { text-align: center; padding: var(--s8) 0 var(--s12); min-height: 70svh; display: flex; flex-direction: column; justify-content: center; }
.moment .symbol { display: block; width: 88px; height: 88px; margin: 0 auto var(--s4); }
.moment h1 { font-size: var(--title); }
.moment .lead { font-size: var(--lead); color: var(--on-lacquer-soft); max-width: 28rem; margin: var(--s3) auto 0; }
.moment .act { margin-top: var(--s4); }
.moment .note { color: var(--on-lacquer-soft); max-width: 28rem; margin: var(--s4) auto 0; font-size: var(--secondary); }

/* Footer: the checkerboard floor in perspective, then the links on ink. */
.floor { height: 88px; overflow: hidden; perspective: 260px; perspective-origin: 50% 0; background: var(--plaster); }
.floor::before {
  content: ""; display: block; height: 280px; width: 300%; margin-left: -100%;
  transform: rotateX(62deg); transform-origin: 50% 0;
  /* One tile of four marble squares, ink and plaster. */
  background: var(--plaster) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2' viewBox='0 0 2 2'%3E%3Cpath d='M0 0h1v1H0zM1 1h1v1H1z' fill='%231F0A05'/%3E%3C/svg%3E") 50% 0 / 128px 128px;
}
footer.site { background: var(--ink); color: var(--on-ink-soft); font-size: var(--secondary); padding: var(--s6) 0; }
footer.site a { color: var(--plaster); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0 var(--s3); margin-bottom: var(--s3); }
footer.site nav a { text-decoration: none; min-height: 48px; display: inline-flex; align-items: center; color: var(--on-ink-soft); }
footer.site nav a:hover, footer.site nav a[aria-current="page"] { color: var(--plaster); }
footer.site p { margin: var(--s1) 0 0; }

@media (prefers-reduced-motion: no-preference) {
  a, .button { transition: color 0.16s ease-out, background-color 0.16s ease-out, transform 0.16s ease-out, text-decoration-thickness 0.16s ease-out; }
  details summary::after { transition: transform 0.2s var(--ease-out); }
}
