/* ==========================================================================
   East 73 Studio — site.css
   One stylesheet for the whole site. Colors and type live in :root.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL — see /fonts/LICENSE.md) ---------- */
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira"; src: url("/fonts/saira-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Studio */
  --paper: #FAF8F4;
  --ink: #1C1B19;
  --ink-muted: #6B675F;
  --rule: #E4DFD6;
  --accent: #1C1B19;
  --placeholder: #E9E5DD;
  --placeholder-ink: #5F5A52;

  /* Expressed (exact values from the app's tailwind.config.js: bar.bg / bar.accent) */
  --expressed-bg: #141414;
  --expressed-surface: #1E1E1E;
  --expressed-amber: #EF9F27;
  --expressed-text: #FFFFFF;
  --expressed-muted: #A3A3A3;

  /* Type */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-expressed: "Saira", var(--font-sans);
  --text-base: 18px;
  --leading: 1.6;
  --measure: 65ch;

  /* Layout */
  --max-width: 1100px;
  --gutter: 24px;
  --section-space: 64px;
  --radius: 4px;
}

@media (min-width: 768px) {
  :root { --gutter: 48px; --section-space: 112px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--ink); color: var(--paper);
  padding: 8px 14px; z-index: 10; font-size: 15px;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-space) 0;
  border-top: 1px solid var(--rule);
}

.label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 32px;
}

.prose { max-width: var(--measure); }

/* ---------- Header ---------- */
.site-header { padding: 28px 0; }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark { display: block; line-height: 0; text-decoration: none; }
.wordmark img { width: 132px; }
@media (min-width: 768px) { .wordmark img { width: 156px; } }

.header-link {
  font-size: 15px; font-weight: 500; color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 56px 0 64px;
  font-size: 15px;
  color: var(--ink-muted);
}
.site-footer .container { display: grid; gap: 28px; }
@media (min-width: 768px) {
  .site-footer .container { grid-template-columns: 1fr auto; align-items: end; }
}
.footer-email {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--ink);
  display: inline-block;
  margin-top: 4px;
}
.site-footer .label { margin-bottom: 4px; }
.footer-meta p { margin: 0; }
.footer-links {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 0;
}
.footer-links li + li::before { content: "·"; margin: 0 10px; color: var(--rule); }
.footer-links a { color: var(--ink-muted); }
@media (min-width: 768px) { .footer-meta { text-align: right; } .footer-links { justify-content: flex-end; } }

/* ---------- Home: intro ---------- */
.intro { padding: 48px 0 var(--section-space); }
.intro h1 {
  font-size: clamp(38px, 6.4vw, 72px);
  font-weight: 400;
  max-width: 16ch;
  text-wrap: balance;
  margin-bottom: 28px;
}
.intro h1 em { font-style: italic; }
.intro p { font-size: 20px; color: var(--ink-muted); max-width: 44ch; }
@media (min-width: 768px) { .intro { padding-top: 88px; } }

/* ---------- Home: work cards ---------- */
.work-grid { display: grid; gap: 56px 40px; }
@media (min-width: 768px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: 1 / -1; }
}
.card { display: flex; flex-direction: column; gap: 20px; }
.card-media {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--placeholder);
}
.card h3 { font-size: 28px; }
.card p { color: var(--ink-muted); margin: 6px 0 12px; max-width: 46ch; }
.arrow-link { font-weight: 500; font-size: 16px; }

.app-icon { border-radius: 22.5%; }

/* Expressed card art: icon + phone on the dark band */
.expressed-art {
  background: var(--expressed-bg);
  border-color: var(--expressed-bg);
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(20px, 6vw, 72px);
  padding: 40px 24px 0;
  min-height: 300px;
}
.expressed-art .app-icon { width: clamp(72px, 14vw, 132px); align-self: center; margin-bottom: 40px; }
.expressed-art .phone { width: clamp(150px, 26vw, 230px); border-bottom: 0; border-radius: 30px 30px 0 0; margin-bottom: 0; }
.expressed-art .phone .screen { border-radius: 22px 22px 0 0; aspect-ratio: 9 / 13; }

/* Gray placeholder blocks (until real images arrive) */
.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--placeholder);
  color: var(--placeholder-ink);
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: center; padding: 16px;
}
.ratio-book {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  background: var(--placeholder);
}
.ratio-book img {
  width: auto; height: 80%;
  box-shadow: 0 1px 2px rgb(28 27 25 / 0.12), 0 6px 16px rgb(28 27 25 / 0.10);
}
.posters-fan {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  background: var(--placeholder);
}
.posters-fan img {
  width: 30%; aspect-ratio: 3 / 4; object-fit: cover;
  margin: 0 -2.5%;
  box-shadow: 0 1px 2px rgb(28 27 25 / 0.12), 0 6px 16px rgb(28 27 25 / 0.10);
}
.posters-fan img:nth-child(1) { transform: rotate(-7deg) translateY(8px); }
.posters-fan img:nth-child(3) { transform: rotate(7deg) translateY(8px); }
.posters-fan img:nth-child(2) { position: relative; z-index: 1; transform: scale(1.08); }

/* ---------- Home: about ---------- */
.about p { font-family: var(--font-serif); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.45; max-width: 34em; }

/* ---------- Phone frame (CSS only) ---------- */
.phone {
  background: #0A0A0A;
  border: 1px solid #2E2E2E;
  border-radius: 34px;
  padding: 8px;
}
.phone .screen {
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  background: var(--expressed-surface);
  color: #8A8A8A;
}
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- Expressed page ---------- */
.expressed-hero {
  background: var(--expressed-bg);
  color: var(--expressed-text);
  padding: 72px 0 80px;
  text-align: center;
}
.expressed-hero .app-icon { width: 112px; margin: 0 auto 28px; border-radius: 24px; }
.expressed-hero h1 {
  font-family: var(--font-expressed);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 68px);
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}
.expressed-hero .tagline {
  font-size: 20px; color: var(--expressed-muted); max-width: 32ch; margin: 0 auto 36px;
}
.expressed-hero a { color: var(--expressed-text); }

/* App Store state: flip data-app-store on <body> ("soon" | "live") */
.appstore-live, .appstore-soon { display: none; }
body[data-app-store="soon"] .appstore-soon { display: inline-flex; }
body[data-app-store="live"] .appstore-live { display: inline-flex; }
.appstore-soon {
  align-items: center; gap: 10px;
  border: 1px solid #3A3A3A; border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px; font-weight: 500; color: #D0D0D0;
}
.appstore-soon::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--expressed-amber);
}
.appstore-live img { height: 48px; width: auto; }

.features { display: grid; gap: 64px 40px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature .phone { max-width: 240px; margin: 0 auto 24px; }
.feature h3 { font-family: var(--font-expressed); font-weight: 600; font-size: 21px; margin-bottom: 6px; letter-spacing: 0.01em; }
.feature p { color: var(--ink-muted); font-size: 16px; }

.subnav { font-size: 16px; }
.subnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 0; margin: 0; padding: 0; }
.subnav li + li::before { content: "·"; margin: 0 12px; color: var(--ink-muted); }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc { padding: 56px 0 var(--section-space); }
.doc .breadcrumb { font-size: 15px; color: var(--ink-muted); margin-bottom: 20px; }
.doc .breadcrumb a { color: var(--ink-muted); }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 12px; }
.doc .updated { color: var(--ink-muted); font-size: 15px; margin-bottom: 48px; }
.doc-body {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.65;
  max-width: var(--measure);
}
.doc-body h2 { font-size: 27px; margin: 48px 0 12px; }
.doc-body h2:first-child { margin-top: 0; }
.todo {
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  color: #8A5A00; background: #FBF1DC; display: inline-block; padding: 2px 8px; border-radius: 3px;
}
.faq dt { font-weight: 500; margin-top: 28px; }
.faq dd { margin: 6px 0 0; }

/* ---------- 404 ---------- */
.not-found { padding: 120px 0 160px; }
.not-found h1 { font-size: clamp(44px, 8vw, 84px); font-weight: 400; margin-bottom: 24px; }

/* ---------- Motion: gentle image fade-in only ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js img.fade { opacity: 0; transition: opacity 0.6s ease; }
  .js img.fade.is-loaded { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.section--flush { border-top: 0; }
