/*
 * Owl product line: shared brand layer.
 *
 * Used by owlink.app; meant to be copied unchanged to later Owl+word sites.
 * A product sets only its accent with a few variables on :root (see
 * owlink.css: --accent, --accent-ink, --accent-soft). Everything here is
 * product-neutral: palette, type, spacing, buttons, the site header and
 * the site footer (.site-header / .site-footer markup is the same on every
 * product page; only the logo, name and nav links change).
 *
 * Owl palette, taken from Cedric's art and the Cedric / Cedric Night
 * editor themes (CedricCore/Theme.swift):
 *   navy #27295a, night #1b1c3d, coral #ff7c5c, gold #ffc533,
 *   paper #fbeee4, chevron grey-blue #5d5f83.
 */

:root {
  --owl-navy: #27295a;
  --owl-night: #1b1c3d;
  --owl-night-2: #24264f;
  --owl-coral: #ff7c5c;
  --owl-coral-deep: #b2391d;
  --owl-gold: #ffc533;
  --owl-gold-deep: #8a5300;
  --owl-paper: #fbeee4;
  --owl-paper-2: #f4e2d4;
  --owl-chevron: #5d5f83;
  --owl-lilac: #a9b4ff;

  /* Light scheme (default) */
  --bg: #fdf7f2;
  --bg-alt: var(--owl-paper);
  --surface: #ffffff;
  --surface-2: #fbf1e8;
  --border: #ead8c9;
  --text: #1f2150;
  --text-muted: #4f5178;
  --heading: var(--owl-navy);
  --link: #9a3412;
  --focus: #2f4f9a;
  --shadow: 0 1px 2px rgb(39 41 90 / .06), 0 12px 40px -12px rgb(39 41 90 / .25);
  --shadow-lg: 0 2px 6px rgb(39 41 90 / .08), 0 40px 80px -30px rgb(39 41 90 / .45);
  --perch: var(--owl-paper);

  /* Product accent (overridden per product) */
  --accent: var(--owl-coral);
  --accent-ink: var(--owl-navy);
  --accent-soft: #ffe1d8;

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111229;
    --bg-alt: #161736;
    --surface: var(--owl-night);
    --surface-2: #202247;
    --border: #2e3060;
    --text: #f3e3d3;
    --text-muted: #b4b6d6;
    --heading: #fff3e6;
    --link: #ffb48a;
    --focus: var(--owl-gold);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 40px -12px rgb(0 0 0 / .6);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / .3), 0 40px 80px -30px rgb(0 0 0 / .8);
    --perch: #f6e3d4;
    --accent-soft: #3a2a3f;
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { color: var(--heading); line-height: 1.12; letter-spacing: -.02em; font-family: var(--font-display); }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); margin: 0 0 .3em; letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 .4em; }
h3 { font-size: 1.22rem; margin: 0 0 .35em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--font-mono); font-size: .9em; }
kbd {
  display: inline-block; padding: .05em .4em; border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font-size: .82em;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--radius-s);
  box-shadow: var(--shadow);
}
.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;
}

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section--alt { background: var(--bg-alt); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px;
}
.lede { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--text-muted); max-width: 40em; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

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

.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .82em 1.35em; border-radius: 999px; border: 0;
  font: 600 1rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--accent); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -10px var(--accent); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text-muted); }
.btn--small { padding: .6em 1.05em; font-size: .92rem; }

.pill {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  padding: .28em .7em; border-radius: 999px;
  background: var(--accent-soft); color: var(--text);
}

/* ---------- shared site header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); text-decoration: none; font: 700 1.2rem/1 var(--font-display); letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px;
}
.site-nav a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 760px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ---------- shared site footer ---------- */

.site-footer { background: var(--owl-night); color: #d9d2e6; padding: 56px 0 40px; font-size: .92rem; }
.site-footer a { color: #ffd9b0; }
.site-footer a:not(.brand) { display: inline-block; min-height: 24px; }
.site-footer .brand { color: #fff3e6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 32px; }
.footer-grid h2 { font: 700 .78rem/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: #b4b6d6; margin: 6px 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-fine { margin-top: 40px; padding-top: 24px; border-top: 1px solid #2e3060; color: #b4b6d6; font-size: .84rem; }
.footer-fine p { margin: 0 0 .5em; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- owl perch (Cedric art sits on paper in both schemes) ---------- */

.perch {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff7ef, var(--perch) 70%);
}

/* ---------- motion ---------- */

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
