/* ==========================================================================
   Conatus — conatus.space
   Quieter sibling of the Clutch site: same warm paper, less product energy.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg:          #EFEAE0;
  --surface:     #F7F3EC;
  --surface-alt: #E8E2D3;
  --ink:         #2B2A26;
  --ink-muted:   #6B655A;
  --ink-soft:    #9A9280;
  --accent:      #C2823A;
  --sage:        #7A8A6E;
  --hairline:    rgba(43, 42, 38, 0.10);
  --hairline-strong: rgba(43, 42, 38, 0.18);
  --shadow:      0 4px 14px rgba(60, 45, 20, 0.06);
  --shadow-lg:   0 18px 48px rgba(60, 45, 20, 0.11);
  --grain-ink:   rgba(43, 42, 38, 0.035);

  --maxw: 940px;
  --radius: 18px;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                  Georgia, ui-serif, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1813; --surface: #23201A; --surface-alt: #2C281F;
    --ink: #F4EFE3; --ink-muted: #A8A092; --ink-soft: #6B6557;
    --accent: #E8B86D; --sage: #A4B398;
    --hairline: rgba(244, 239, 227, 0.10);
    --hairline-strong: rgba(244, 239, 227, 0.20);
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.42);
    --grain-ink: rgba(244, 239, 227, 0.03);
  }
}

:root[data-theme="light"] {
  --bg: #EFEAE0; --surface: #F7F3EC; --surface-alt: #E8E2D3;
  --ink: #2B2A26; --ink-muted: #6B655A; --ink-soft: #9A9280;
  --accent: #C2823A; --sage: #7A8A6E;
  --hairline: rgba(43, 42, 38, 0.10);
  --hairline-strong: rgba(43, 42, 38, 0.18);
  --shadow: 0 4px 14px rgba(60, 45, 20, 0.06);
  --shadow-lg: 0 18px 48px rgba(60, 45, 20, 0.11);
  --grain-ink: rgba(43, 42, 38, 0.035);
}
:root[data-theme="dark"] {
  --bg: #1A1813; --surface: #23201A; --surface-alt: #2C281F;
  --ink: #F4EFE3; --ink-muted: #A8A092; --ink-soft: #6B6557;
  --accent: #E8B86D; --sage: #A4B398;
  --hairline: rgba(244, 239, 227, 0.10);
  --hairline-strong: rgba(244, 239, 227, 0.20);
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.42);
  --grain-ink: rgba(244, 239, 227, 0.03);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(var(--grain-ink) 1px, transparent 1px),
    radial-gradient(var(--grain-ink) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 2px 3px;
}

main, header, footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg);
  padding: 10px 18px; border-radius: 0 0 10px 0; z-index: 99; font-weight: 600;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header[data-stuck="true"] { border-bottom-color: var(--hairline); }

.nav { display: flex; align-items: center; gap: 20px; height: 66px; }

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600; letter-spacing: -0.005em;
  text-decoration: none; margin-right: auto;
}
.mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%,
    color-mix(in srgb, var(--accent) 92%, #fff) 0%, var(--accent) 58%,
    color-mix(in srgb, var(--accent) 72%, #000) 100%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
  flex: none;
}

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { font-size: 14.5px; color: var(--ink-muted); text-decoration: none; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav-links { display: none; } }

.theme-toggle {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-muted);
  width: 34px; height: 34px; border-radius: 999px;
  cursor: pointer; display: grid; place-items: center;
  font-size: 15px; line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--hairline-strong); transform: rotate(-12deg); }

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.16s ease,
              background 0.16s ease, border-color 0.16s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); }

/* --------------------------------------------------------------- hero --- */

.hero { padding: clamp(64px, 11vw, 128px) 0 clamp(48px, 7vw, 80px); position: relative; }
.hero::after {
  content: "";
  position: absolute; top: -22%; left: 50%; transform: translateX(-50%);
  width: min(820px, 100vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--accent) 15%, transparent) 0%, transparent 62%);
  pointer-events: none; z-index: -1;
}

.hero h1 {
  font-size: clamp(38px, 6.6vw, 64px);
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 22px;
}
.hero h1 em { font-style: italic; color: var(--accent); }

.lede {
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--ink-muted);
  max-width: 54ch;
}
.lede + .lede { margin-top: 16px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ------------------------------------------------------------ section --- */

.section { padding: clamp(48px, 7vw, 80px) 0; }
.rule { height: 1px; background: var(--hairline); border: 0; margin: 0; }

.section-head { max-width: 48ch; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 { font-size: clamp(27px, 3.8vw, 36px); margin-bottom: 14px; }
.section-head p { color: var(--ink-muted); }

/* ------------------------------------------------------------ product --- */

.products { display: grid; gap: 18px; }

.product {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1),
              box-shadow 0.2s ease, border-color 0.2s ease;
}
.product:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--hairline-strong);
}
@media (max-width: 700px) {
  .product { grid-template-columns: 64px minmax(0, 1fr); gap: 18px; padding: 22px; }
  .product .go { grid-column: 1 / -1; justify-self: start; }
}

.product-icon {
  width: 86px; height: 86px; border-radius: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--hairline);
}
@media (max-width: 700px) { .product-icon { width: 64px; height: 64px; border-radius: 15px; } }

.product-icon.placeholder {
  display: grid; place-items: center;
  background: var(--surface-alt);
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--ink-soft);
}

.product h3 { font-size: 22px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product p { color: var(--ink-muted); font-size: 15.5px; line-height: 1.55; }

.status {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--sage) 20%, transparent);
  color: color-mix(in srgb, var(--sage) 80%, var(--ink));
}
.status.early { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.status.soon { background: var(--surface-alt); color: var(--ink-soft); }

.go {
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  color: var(--accent); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 0.16s ease;
}
.go:hover { gap: 11px; }

/* ---------------------------------------------------------- beliefs --- */

.beliefs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
@media (max-width: 760px) { .beliefs { grid-template-columns: 1fr; gap: 26px; } }

.belief .n {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em; color: var(--accent);
  display: block; margin-bottom: 12px;
}
.belief h3 { font-size: 19px; margin-bottom: 9px; }
.belief p { font-size: 15px; color: var(--ink-muted); line-height: 1.58; }

/* ------------------------------------------------------------ contact --- */

.contact {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}
@media (max-width: 680px) { .contact { grid-template-columns: 1fr; } }
.contact h2 { font-size: clamp(25px, 3.4vw, 32px); margin-bottom: 12px; }
.contact p { color: var(--ink-muted); max-width: 46ch; }

/* -------------------------------------------------------------- footer --- */

.site-footer {
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--hairline);
  padding: 34px 0 48px;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.footer-grid a { text-decoration: none; color: var(--ink-muted); }
.footer-grid a:hover { color: var(--accent); }

.etymology {
  margin-top: 24px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 62ch;
  font-style: italic;
}
.etymology b { font-style: normal; color: var(--ink-muted); font-weight: 620; }

[data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }
