/* =============================================================================
   teahubery.com — landing.css
   The public face of the estate. Palette and type are the Toan Ngo PhD Thesis
   Design System, the same object as quotes.teahubery.com, the /thesis reader and
   modumatics.com: ET Book serif, maroon accent, warm parchment ground. Tokens are
   ported from 260708-teahubery-quotes/site/assets/quotes.css so the family reads
   as one thing. Self-contained: no external font, style, script or analytics.

   ARB-03 option A: this public surface keeps the thesis and Tufte look. The
   signed-in console uses the governed hub design system instead, and does not
   share this stylesheet.
   ========================================================================== */

/* ---- 1. TOKENS: light (parchment) is the default ------------------------- */
:root {
  --serif: 'ET Book', 'TeX Gyre Pagella', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --sans:  'Lato', 'Helvetica Neue', Arial, sans-serif;
  --mono:  'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --brand: 'Quicksand', 'Futura', 'Century Gothic', 'Avenir Next', sans-serif;

  --bg:        #fbf6ec;
  --bg-raised: #f4efe6;
  --bg-sunk:   #f6f1e6;
  --ink:       #322d27;
  --ink-2:     #574f45;
  --ink-3:     #8a8073;
  --rule:      #e2dcd2;
  --rule-soft: #efeae1;
  --accent:    #800000;
  --accent-ink:#5e0000;
  --accent-tint:#f3e3e3;
  --on-accent: #fdf7ef;
  --shadow-sm: 0 1px 2px rgba(40,20,10,.06);
  --shadow-md: 0 2px 10px rgba(40,20,10,.08);
  --sel:       rgba(128,0,0,.14);

  --measure: 34rem;
  --gutter: 1.25rem;

  /* SIX type sizes, no more. The design floor caps a website at six distinct
     sizes, and an earlier draft of this file had thirteen. Every rule below
     picks one of these; none sets a literal font-size. */
  --fs-xs:   0.78rem;   /* kicker, footer, chrome labels */
  --fs-sm:   0.88rem;   /* buttons, section labels, captions, code */
  --fs-base: 1.0625rem; /* body copy */
  --fs-md:   1.15rem;   /* lede, wordmark */
  --fs-lg:   1.45rem;   /* band heading */
  --fs-xl:   clamp(2rem, 5.4vw, 3.1rem); /* page heading */
}

/* ---- dark: by explicit toggle -------------------------------------------- */
:root[data-theme="dark"] {
  --bg:        #1b1916;
  --bg-raised: #24211d;
  --bg-sunk:   #17150f;
  --ink:       #ece5d8;
  --ink-2:     #c3baa9;
  --ink-3:     #8f8778;
  --rule:      #35312a;
  --rule-soft: #2a2721;
  --accent:    #e0897a;
  --accent-ink:#e6a494;
  --accent-tint:#38231f;
  --on-accent: #1b1916;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 2px 12px rgba(0,0,0,.4);
  --sel:       rgba(224,137,122,.22);
}

/* ---- dark: by system preference, unless a light choice is stored --------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg:#1b1916; --bg-raised:#24211d; --bg-sunk:#17150f;
    --ink:#ece5d8; --ink-2:#c3baa9; --ink-3:#8f8778;
    --rule:#35312a; --rule-soft:#2a2721;
    --accent:#e0897a; --accent-ink:#e6a494; --accent-tint:#38231f;
    --on-accent:#1b1916;
    --shadow-sm:0 1px 2px rgba(0,0,0,.3); --shadow-md:0 2px 12px rgba(0,0,0,.4);
    --sel:rgba(224,137,122,.22);
  }
}

/* ---- 2. RESET + BASE ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::selection { background: var(--sel); }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-tint); }
a:hover { border-bottom-color: var(--accent); }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

code {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  background: var(--bg-sunk);
  border: 1px solid var(--rule-soft);
  border-radius: 3px;
  padding: .05em .3em;
}

.wrap { width: 100%; max-width: 60rem; margin-inline: auto; padding-inline: var(--gutter); }

/* ---- 3. TOP BAR ---------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(140%) blur(6px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  border-bottom: 0;
  color: var(--ink);
}
.brand:hover { border-bottom: 0; }
.brand .mark {
  font-family: var(--serif);
  color: var(--accent);
  font-size: var(--fs-md);
  line-height: 1;
}
.brand .word {
  font-family: var(--brand);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -.01em;
}

.bar-spacer { flex: 1 1 auto; }

.iconbtn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  width: 2.1rem;
  height: 2.1rem;
  font-size: var(--fs-base);
  cursor: pointer;
  line-height: 1;
}
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .01em;
  padding: .5rem .95rem;
  border-radius: 4px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn:hover { background: var(--accent-tint); border-bottom-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-lg { font-size: var(--fs-sm); padding: .75rem 1.5rem; }

/* States. The floor requires default, hover, active, disabled and loading on every
   button, and a visible focus ring that does not shift the layout. */
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"],
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1em;
  height: 1em;
  border: 2px solid currentcolor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--on-accent);
  animation: btn-spin .7s linear infinite;
}
.btn-primary.is-loading::after { color: var(--on-accent); }
.btn:not(.btn-primary).is-loading::after { color: var(--accent); }
@keyframes btn-spin { to { transform: rotate(360deg); } }

.iconbtn:active { transform: translateY(1px); }
.iconbtn svg { width: 1.125rem; height: 1.125rem; display: block; margin: auto; }

/* ---- 4. HERO ------------------------------------------------------------- */
main { flex: 1 0 auto; }

.hero { padding-block: clamp(2.5rem, 8vw, 5.5rem) 2rem; }

.kicker {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-xl);
  line-height: 1.14;
  letter-spacing: -.024em;
  margin: 0 0 1.4rem;
  max-width: 30rem;
}

.lede {
  font-size: var(--fs-md);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: var(--measure);
  margin: 0 0 1.1rem;
}

.rule { border: 0; border-top: 1px solid var(--rule); margin-block: 1.5rem; }

/* ---- 5. THREE COLUMNS --------------------------------------------------- */
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem 2.5rem;
  padding-block: 1.5rem 3rem;
}

.col h2 {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .55rem;
}
.col p { margin: 0; color: var(--ink-2); font-size: var(--fs-base); }

/* ---- 6. SIGN-IN BAND ---------------------------------------------------- */
.signin-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  padding: 1.6rem var(--gutter);
  margin-block: 0 3.5rem;
  max-width: calc(60rem - 2 * var(--gutter));
}
.signin-band h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-lg);
  margin: 0 0 .3rem;
}
.muted { color: var(--ink-3); font-size: var(--fs-sm); margin: 0; max-width: 30rem; }

/* ---- 6b. PROSE (the privacy page) -------------------------------------- */
.prose { padding-block: clamp(2rem, 6vw, 3.5rem) 3rem; max-width: 44rem; }
.prose h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-xl);
  line-height: 1.16;
  letter-spacing: -.024em;
  margin: 0 0 1.2rem;
}
.prose h2 {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.2rem 0 .5rem;
}
.prose p { max-width: var(--measure); color: var(--ink-2); margin: 0 0 1rem; }
.prose .lede { color: var(--ink-2); }

/* ---- 7. FOOTER --------------------------------------------------------- */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  padding-block: 1.1rem 2rem;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  flex: 0 0 auto;
}
.foot a { color: var(--ink-3); border-bottom-color: var(--rule); }
.foot a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- 8. MOTION --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
