/* ============================================================
   Omytea — omyteaai.com
   Archetype: Anthropic "research journal on warm stone"
   Tokens per ~/.claude/skills/bigtech-ui-patterns/SKILL.md (Archetype A)
   Warm-neutral base + ONE earthy accent · serif display · sans UI
   · mono metadata · shadow-free depth from surface ramp · 4px grid
   ============================================================ */

:root {
  /* ---- Warm-light neutral ramp (Anthropic-class) ---- */
  --page:     #faf9f5;
  --surface:  #f2f0e9;
  --inset:    #e9e6db;
  --hairline: #ddd9cc;
  --ink:      #1a1916;   /* softened, never #000 */
  --body:     #3d3b35;
  --muted:    #6b685f;

  /* ---- ONE earthy accent (terracotta — warmth IS the positioning) ---- */
  --accent:        #c25d3c;
  --accent-deep:   #a84a2c;   /* hover / AA contrast */
  --accent-tint:   #f0e3da;

  /* canvas colors (read by JS) */
  --c-ink: 26, 25, 22;
  --c-accent: 194, 93, 60;

  /* ---- Type ---- */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ---- Spacing (4px base) ---- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px;
  --s24: 96px; --s32: 128px;

  --rail: 1120px;
  --measure: 64ch;

  color-scheme: light;
}

/* ---- DARK THEME (Linear archetype: warm near-black + generated ramp) ---- */
:root[data-theme="dark"] {
  --page:     #0a0a0b;   /* warm near-black */
  --surface:  #141414;
  --inset:    #1c1c1b;
  --hairline: rgba(255,255,255,0.10);
  --ink:      #f4f3ef;   /* warm white, never #fff */
  --body:     #b7b5ac;
  --muted:    #86847d;

  --accent:        #e0876a;   /* terracotta brightened for dark */
  --accent-deep:   #ec9376;
  --accent-tint:   rgba(224,135,106,0.14);

  --c-ink: 244, 243, 239;
  --c-accent: 224, 135, 106;

  color-scheme: dark;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--body);
  background: var(--page);
  font-feature-settings: "tnum" 1, "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

a { color: inherit; text-decoration: none; }

/* ---- Layout primitives ---- */
.rail { max-width: var(--rail); margin: 0 auto; padding: 0 var(--s8); }
@media (max-width: 640px) { .rail { padding: 0 var(--s6); } }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 500;
}

/* ---- Type scale (serif display, negative tracking scaling with size) ---- */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 500; }
h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.018em; }
h3 { font-size: clamp(20px, 2.4vw, 25px); line-height: 1.22; letter-spacing: -0.01em; }

p { max-width: var(--measure); }
.lead { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; color: var(--body); }

/* flush both edges on reading prose (justified + clean hyphenation).
   Headings stay left-aligned — justifying display type looks broken. */
.split__body p, .about__body p, .pullquote__body, .hero .lead, .note-line,
.method p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

/* The single emphasis device: warm underline on key links (Anthropic signature) */
.u {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color .2s ease;
}
.u:hover { text-decoration-color: var(--accent-deep); }

/* ============================================================
   NAV — slim, translucent, plain-text, hairline on scroll
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--hairline); }
.nav__inner {
  max-width: var(--rail); margin: 0 auto; padding: 0 var(--s8);
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
@media (max-width: 640px) { .nav__inner { padding: 0 var(--s6); } }
.brand {
  font-family: var(--serif); font-size: 21px; font-weight: 600;
  color: var(--ink); letter-spacing: -0.01em;
}
.brand sup { font-family: var(--mono); font-size: 9px; color: var(--accent-deep);
  letter-spacing: 0.1em; vertical-align: super; margin-left: 2px; }
.nav__links { display: flex; gap: var(--s8); align-items: center; }
.nav__links a {
  font-size: 14.5px; color: var(--body); letter-spacing: 0.005em;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  font-size: 14px; color: var(--page) !important;
  background: var(--ink); padding: 8px 16px; border-radius: 6px;
  transition: background .2s ease;
}
.nav__cta:hover { background: var(--accent-deep); }
@media (max-width: 720px) { .nav__links a:not(.nav__cta) { display: none; } }

/* theme toggle */
.themebtn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--hairline); background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--body); flex: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.themebtn:hover { border-color: var(--ink); color: var(--ink); }
.themebtn svg { width: 16px; height: 16px; }
.themebtn .moon { display: none; }
:root[data-theme="dark"] .themebtn .sun { display: none; }
:root[data-theme="dark"] .themebtn .moon { display: block; }

/* smooth global theme transition (skip on reduced-motion) */
body, .nav, .band, .method, .btn--ghost, .themebtn {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease;
}
@media (prefers-reduced-motion: reduce) {
  body, .nav, .band, .method, .btn--ghost, .themebtn { transition: none; }
}

/* ============================================================
   HERO — typographic + signature canvas (branching futures)
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  min-height: clamp(620px, 92vh, 920px);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--s24) 0 var(--s16);
}
/* the signature visual — a living distribution over futures, full-bleed */
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block;
}
/* veil keeps text legible over the canvas — warm, left-weighted */
.hero__veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(100deg,
      var(--page) 0%,
      color-mix(in srgb, var(--page) 86%, transparent) 38%,
      color-mix(in srgb, var(--page) 30%, transparent) 64%,
      transparent 100%),
    linear-gradient(to bottom,
      var(--page) 0%, transparent 14%, transparent 80%, var(--page) 100%);
}
.hero .rail { position: relative; z-index: 2; width: 100%; }
.hero__inner { max-width: 640px; }
.hero h1 { margin: var(--s6) 0 var(--s8); }
.hero .lead { color: var(--body); margin-bottom: var(--s8); max-width: 38ch; }
.hero__actions { display: flex; gap: var(--s3); margin-bottom: var(--s8); flex-wrap: wrap; }
.hero__note {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  letter-spacing: 0.02em;
}
.hero__note .dot { color: var(--accent); }
.hero__caption {
  position: absolute; z-index: 2; right: var(--s8); bottom: var(--s6);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.03em; max-width: 300px; text-align: right; opacity: .8;
}
.hero__caption .mono { color: var(--accent-deep); }
@media (max-width: 860px) {
  .hero__veil { background:
      linear-gradient(to bottom, var(--page) 0%, color-mix(in srgb, var(--page) 70%, transparent) 46%, color-mix(in srgb, var(--page) 88%, transparent) 100%); }
  .hero__caption { display: none; }
  .hero .lead { max-width: none; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  padding: 11px 20px; border-radius: 6px; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.btn--primary { background: var(--ink); color: var(--page); }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { color: var(--ink); border-color: var(--hairline); background: color-mix(in srgb, var(--page) 60%, transparent); }
.btn--ghost:hover { border-color: var(--ink); }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: var(--s24) 0; }
.section__head { max-width: var(--measure); margin-bottom: var(--s12); }
.section__head .eyebrow { display: block; margin-bottom: var(--s4); }
.section__head h2 { margin-bottom: var(--s6); }

/* editorial two-column: heading-left / prose-right — fills the rail,
   gives the ragged-right column a structured home (Anthropic/Stripe pattern) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s12) var(--s16); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: var(--s6); } }
.split__head h2 { margin-top: var(--s2); }
.split__body > * + * { margin-top: var(--s6); }
.split__body p { max-width: 52ch; }

/* editorial index number — "01 / Research" rhythm */
.section__num {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  color: var(--muted); margin-bottom: var(--s6);
  display: flex; align-items: center; gap: var(--s3);
}
.section__num::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
  display: inline-block;
}
.section__num b { color: var(--accent-deep); font-weight: 500; }

.band { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

/* Approach — method cards (depth from surface tone, tight interiors) */
.methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); margin-top: var(--s12); }
@media (max-width: 720px) { .methods { grid-template-columns: 1fr; } }
.method {
  position: relative; background: var(--page); border: 1px solid var(--hairline);
  border-radius: 12px; padding: var(--s8); overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.method:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--hairline)); transform: translateY(-3px); }
.method__k {
  font-family: var(--mono); font-size: 26px; line-height: 1; color: var(--accent);
  margin-bottom: var(--s6); font-weight: 400; display: block;
}
.method h3 { margin-bottom: var(--s3); }
.method p { font-size: 15.5px; color: var(--muted); line-height: 1.55; max-width: none; }

.note-line { font-family: var(--mono); font-size: 13px; color: var(--muted);
  margin-top: var(--s12); letter-spacing: 0.01em; max-width: var(--measure); line-height: 1.6; }

/* Pull-quote — "the longer arc" gets a distinct register: editorial 2-col spread */
.pullquote {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s16);
  align-items: end; margin: 0;
}
@media (max-width: 820px) { .pullquote { grid-template-columns: 1fr; gap: var(--s8); align-items: start; } }
.pullquote .eyebrow { display: block; margin-bottom: var(--s8); }
.pullquote blockquote {
  font-family: var(--serif); font-size: clamp(32px, 5.2vw, 58px); line-height: 1.1;
  letter-spacing: -0.022em; color: var(--ink); margin: 0;
}
.pullquote blockquote .accent { color: var(--accent-deep); font-style: italic; }
.pullquote__body { color: var(--body); padding-bottom: 8px; max-width: 42ch; }
@media (max-width: 820px) { .pullquote__body { padding-bottom: 0; } }

/* About — two-column label/content (Anthropic editorial) */
.about__grid { display: grid; grid-template-columns: 200px 1fr; gap: var(--s12); align-items: start; }
@media (max-width: 760px) { .about__grid { grid-template-columns: 1fr; gap: var(--s6); } }
.about__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.about__body p + p { margin-top: var(--s4); }

/* About */
.about__role { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-deep); margin-top: var(--s6); margin-bottom: var(--s2); }

/* Contact */
.contact__email {
  font-family: var(--serif); font-size: clamp(24px, 4vw, 38px);
  color: var(--ink); letter-spacing: -0.015em; display: inline-block; margin-top: var(--s4);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: text-decoration-color .2s ease;
}
.contact__email:hover { text-decoration-color: var(--accent-deep); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--hairline); padding: var(--s12) 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: var(--s6); flex-wrap: wrap; }
.footer__brand { font-family: var(--serif); font-size: 18px; color: var(--ink); font-weight: 600; }
.footer__meta { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }

/* ============================================================
   AUTH MODAL
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: center; justify-content: center; padding: var(--s6); }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0;
  background: color-mix(in srgb, #000 55%, transparent);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal__card {
  position: relative; z-index: 1; width: 100%; max-width: 412px;
  background: var(--page); border: 1px solid var(--hairline);
  border-radius: 18px; padding: var(--s12) var(--s8) var(--s8);
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  animation: modalIn .28s cubic-bezier(0.28,0.11,0.32,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal__card { animation: none; } }
.modal__x { position: absolute; top: 14px; right: 16px; border: 0; background: none;
  font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
.modal__x:hover { color: var(--ink); }
.modal__tabs { display: inline-flex; gap: 2px; background: var(--inset);
  border-radius: 8px; padding: 3px; margin-bottom: var(--s8); }
.modal__tab { border: 0; background: none; cursor: pointer; font-family: var(--sans);
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 7px 14px; border-radius: 6px; transition: background .2s, color .2s; }
.modal__tab.is-active { background: var(--page); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.modal__title { font-size: 27px; letter-spacing: -0.018em; margin-bottom: 4px; }
.modal__sub { font-size: 14px; color: var(--muted); margin-bottom: var(--s8); max-width: none; }
.btn--google { width: 100%; justify-content: center; background: var(--page);
  border: 1px solid var(--hairline); color: var(--ink); font-weight: 500; }
.btn--google:hover { border-color: var(--ink); background: var(--surface); }
.modal__divider { display: flex; align-items: center; gap: var(--s3);
  margin: var(--s6) 0; color: var(--muted); font-size: 12px; }
.modal__divider::before, .modal__divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.field { display: block; margin-bottom: var(--s4); }
.field span { display: block; font-size: 12.5px; font-weight: 500; color: var(--body); margin-bottom: 6px; }
.field input { width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px;
  padding: 11px 13px; transition: border-color .18s, box-shadow .18s; }
.field input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint); }
.modal__submit { width: 100%; justify-content: center; margin-top: var(--s2); }
.modal__msg { font-size: 13.5px; line-height: 1.45; margin-top: var(--s4);
  padding: 10px 12px; border-radius: 8px; }
.modal__msg[hidden] { display: none; }
.modal__msg.is-error { color: #8a2b1a; background: var(--accent-tint); }
.modal__msg.is-ok { color: var(--ink); background: var(--surface); border: 1px solid var(--hairline); }
:root[data-theme="dark"] .modal__msg.is-error { color: #f0a890; }
.modal__fine { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin-top: var(--s6); max-width: none; }

/* ============================================================
   Motion — ONE signature: scroll fade-up reveal (baseline only)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(0.28,0.11,0.32,1), transform .7s cubic-bezier(0.28,0.11,0.32,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
