/* =============================================================================
   aethino.com
   Monochrome photography, one signal-vermilion accent, Geist.
   Radius rule: interactive controls are pills (999px), containers are 14px.
   Theme: follows prefers-color-scheme. Every color comes from the tokens below.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f4f4f2;
  --surface: #ebebe8;
  --raised: #fafaf9;
  --ink: #131315;
  --muted: #55555b;
  --line: #d6d6d2;
  --accent: #e5502f;
  --accent-text: #b13a1b;
  --on-accent: #131315;
  --code-bg: #18181b;
  --code-ink: #e7e7e4;
  --code-add: #7fd49b;
  --code-del: #f08a78;
  --hero-veil: radial-gradient(ellipse 72% 78% at 0% 18%, rgb(244 244 242 / .9) 0%, rgb(244 244 242 / .66) 45%, rgb(244 244 242 / 0) 78%);
  --hero-ink: #131315;
  --hero-muted: #3f3f44;
  --hero-filter: none;

  --radius: 14px;
  --pill: 999px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(96px, 12vw, 168px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --surface: #161619;
    --raised: #1c1c20;
    --ink: #ededea;
    --muted: #a3a3a8;
    --line: #2b2b30;
    --accent-text: #f2734f;
    --code-bg: #0a0a0c;
    --hero-veil: radial-gradient(ellipse 80% 85% at 0% 20%, rgb(14 14 16 / .9) 0%, rgb(14 14 16 / .7) 45%, rgb(14 14 16 / .2) 80%), linear-gradient(0deg, rgb(14 14 16 / .35), rgb(14 14 16 / 0) 40%);
    --hero-ink: #f1f1ee;
    --hero-muted: #c4c4c8;
    --hero-filter: brightness(.62) contrast(1.05);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
a { color: inherit; }
svg.icon { width: 1.1em; height: 1.1em; flex: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 30;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--pill);
  text-decoration: none; transition: top .2s var(--ease);
}
.skip:focus { top: 16px; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  height: 52px; padding: 0 24px;
  border-radius: var(--pill); border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 550; letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .18s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #ee6342; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translate(2px, -2px); }
.copy:hover .icon, .btn-ink:hover .icon { transform: none; }
.copy.copied { border-color: var(--accent); }

.inline-link {
  display: inline-flex; align-items: center; gap: .3em;
  color: var(--accent-text); font-weight: 550; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.inline-link:hover { text-decoration-thickness: 2px; }

/* ---------- header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  height: 72px; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 32px;
  color: var(--hero-ink);
}
.brand { display: inline-flex; color: inherit; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo .m-dark { display: none; }
@media (prefers-color-scheme: dark) { .logo .m-light { display: none; } .logo .m-dark { display: inline; } }
.logo-word { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 600; font-size: 21px; letter-spacing: -.04em; line-height: 1; }
.nav { display: flex; gap: 28px; margin-left: 24px; font-size: 15px; font-weight: 500; }
.site-header > .btn { margin-left: auto; }
.nav a { text-decoration: none; color: var(--hero-muted); transition: color .2s; }
.nav a:hover { color: var(--hero-ink); }
@media (max-width: 860px) {
  .nav { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100dvh, 960px);
  display: flex; align-items: flex-start;
  padding: 168px var(--gutter) 72px;
  overflow: hidden;
  color: var(--hero-ink);
}
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -2; }
.hero-media img { object-fit: cover; object-position: 50% 38%; filter: var(--hero-filter); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-veil); }
.hero-copy { max-width: 940px; }
.eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--hero-muted); margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(44px, 6.6vw, 92px);
  line-height: .98; letter-spacing: -.045em; font-weight: 600;
}
.lede {
  margin-top: 26px; max-width: 30ch;
  font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--hero-muted);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero .btn-ghost { color: var(--hero-ink); border-color: color-mix(in srgb, var(--hero-ink) 28%, transparent); background: color-mix(in srgb, var(--bg) 40%, transparent); }
.hero .btn-ghost:hover { border-color: var(--hero-ink); }
@media (max-width: 640px) {
  .hero { padding-top: 132px; min-height: 92dvh; }
  .hero-media img { object-position: 30% 40%; }
  .hero::before { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, color-mix(in srgb, var(--bg) 20%, transparent) 100%); }
}

/* ---------- sections ---------- */
.section { padding: var(--section) 0; }
.section h2 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02; letter-spacing: -.035em; font-weight: 600;
  max-width: 16ch;
}
.section-lede { margin-top: 18px; max-width: 52ch; color: var(--muted); font-size: 18px; }

/* How joining works: a diagonal run of three steps */
.steps {
  list-style: none; padding: 0; margin-top: 72px;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 56px;
}
.step { grid-column: span 4; border-top: 1px solid var(--line); padding-top: 24px; }
.step:nth-child(2) { margin-top: 72px; }
.step:nth-child(3) { margin-top: 144px; }
.step-n {
  display: block; font-size: clamp(88px, 10vw, 148px); line-height: .82;
  font-weight: 500; letter-spacing: -.06em; color: var(--accent);
  margin-bottom: 28px;
}
.step h3 { font-size: 22px; letter-spacing: -.02em; font-weight: 600; }
.step p { margin-top: 8px; color: var(--muted); max-width: 32ch; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; margin-top: 48px; }
  .step, .step:nth-child(2), .step:nth-child(3) { grid-column: auto; margin-top: 0; }
  .step-n { font-size: 80px; margin-bottom: 16px; }
}

/* What the Discord is for: four-cell bento */
.uses { background: var(--surface); }
.bento {
  margin-top: 64px;
  display: grid; gap: 16px;
  grid-template-columns: 1.25fr 1fr;
  grid-template-areas: "show fix" "show compare" "ship ship";
}
.cell { border-radius: var(--radius); overflow: hidden; position: relative; background: var(--raised); display: flex; flex-direction: column; }
.cell h3 { font-size: 22px; letter-spacing: -.02em; font-weight: 600; }
.cell-copy p { margin-top: 6px; color: var(--muted); max-width: 44ch; }
.cell-copy { padding: 28px; }

.cell-show { grid-area: show; min-height: 560px; color: #f1f1ee; }
.cell-show img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.cell-show::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(10 10 12 / 0) 40%, rgb(10 10 12 / .82) 100%); }
.cell-show .cell-copy { position: relative; z-index: 1; margin-top: auto; }
.cell-show .cell-copy p { color: #d4d4d6; }

.cell-fix { grid-area: fix; background: var(--code-bg); color: var(--code-ink); }
.cell-fix .cell-copy p { color: #a9a9ae; }
.code {
  margin: 0; padding: 28px 28px 4px;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 14px; line-height: 1.7;
  overflow-x: auto; white-space: pre;
}
.c-file { color: #8d8d93; }
.c-add { color: var(--code-add); }
.c-del { color: var(--code-del); }

.cell-compare { grid-area: compare; background: color-mix(in srgb, var(--accent) 14%, var(--raised)); }
.logos { list-style: none; padding: 28px 28px 0; display: flex; flex-wrap: wrap; gap: 22px; color: var(--ink); }
.logos svg { width: 30px; height: 30px; }

.cell-ship { grid-area: ship; flex-direction: row; min-height: 320px; }
.cell-ship img { width: 52%; object-fit: cover; }
.cell-ship .cell-copy { align-self: flex-end; padding: 40px; }
.cell-ship h3 { font-size: clamp(26px, 3vw, 40px); letter-spacing: -.03em; }

@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "show" "fix" "compare" "ship"; }
  .cell-show { min-height: 440px; }
  .cell-ship { flex-direction: column; }
  .cell-ship img { width: 100%; aspect-ratio: 3 / 2; }
  .cell-ship .cell-copy { align-self: auto; padding: 28px; }
}

/* Phrasebook: tabs */
.phrases {
  margin-top: 64px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px;
}
.phrase-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.phrase-list [role="tab"] {
  appearance: none; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--muted); font: inherit; text-align: left; cursor: pointer;
  position: relative; padding: 22px 8px 22px 20px; display: flex; align-items: center;
  font-size: clamp(20px, 2.1vw, 26px); letter-spacing: -.02em; font-weight: 500;
  transition: color .2s var(--ease), padding .3s var(--ease);
}
.phrase-list [role="tab"]::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; border-radius: 2px;
  background: var(--accent); transform: translateY(-50%); transition: height .3s var(--ease);
}
.phrase-list [role="tab"]:hover { color: var(--ink); }
.phrase-list [role="tab"][aria-selected="true"] { color: var(--ink); }
.phrase-list [role="tab"][aria-selected="true"]::before { height: 44%; }
.said { text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); }

.phrase-panels { position: relative; }
.panel {
  background: var(--raised); border-radius: var(--radius); padding: clamp(28px, 4vw, 48px);
  min-height: 100%;
  display: flex; flex-direction: column; align-items: flex-start;
}
.js .panel[hidden] { display: none; }
.js .panel { animation: panel-in .45s var(--ease); }
.why { color: var(--muted); font-size: 18px; max-width: 46ch; }
.try-label {
  margin-top: 36px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px;
  color: var(--accent-text); font-weight: 600;
}
.try { margin-top: 10px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; letter-spacing: -.02em; font-weight: 500; max-width: 26ch; }
.panel .copy { margin-top: auto; }
.panel .try + .copy { margin-top: 32px; }
.phrase-foot { margin-top: 32px; color: var(--muted); }
@media (max-width: 860px) {
  .phrases { grid-template-columns: 1fr; }
  .phrase-list [role="tab"] { padding: 16px 0 16px 18px; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }


/* Join */
.join { border-top: 1px solid var(--line); }
.join-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.join .actions { margin-top: 32px; }
.invite { margin-top: 40px; }
.invite-label { font-size: 14px; color: var(--muted); }
.invite-row { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.invite code {
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 16px;
  padding: 9px 16px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line);
}
.status { min-height: 1.5em; margin-top: 8px; font-size: 14px; color: var(--muted); }

.draft { margin-top: 64px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 40px); }
.draft h3 { font-size: 22px; letter-spacing: -.02em; font-weight: 600; }
.fields { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 550; color: var(--ink); }
.field input {
  height: 48px; padding: 0 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, var(--bg)); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder { color: color-mix(in srgb, var(--muted) 85%, var(--bg)); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--accent-text); }
.preview { margin-top: 24px; padding: 18px 20px; border-radius: 10px; background: var(--surface); font-size: 17px; }
.preview-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.preview b { font-weight: 600; }
.preview b.empty { color: var(--muted); font-weight: 500; }
.error { min-height: 1.4em; margin-top: 10px; font-size: 14.5px; color: var(--accent-text); font-weight: 500; }
.draft-actions { margin-top: 8px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.draft-note { font-size: 14px; color: var(--muted); max-width: 34ch; }

.join-media { position: sticky; top: 32px; }
.join-media img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 62% 50%; width: 100%; }

@media (max-width: 960px) {
  .join-grid { grid-template-columns: 1fr; }
  .join-media { position: static; order: -1; }
  .join-media img { aspect-ratio: 16 / 9; }
  .fields { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 64px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.site-footer .logo svg { width: 32px; height: 32px; }
.site-footer .logo-word { font-size: 19px; }
.footer-tag { margin-top: 14px; color: var(--muted); font-size: 15px; }
.footer-legal { color: var(--muted); font-size: 13.5px; max-width: 52ch; justify-self: end; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } .footer-legal { justify-self: start; } }

/* ---------- motion (only when the reader hasn't asked for less) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .hero-media img { animation: hero-settle 1.6s var(--ease) both; }
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@keyframes hero-settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
