/* ==========================================================================
   Lockwood Sky — shared design system ("night sky over warm paper")
   Loaded by every tool page. Per-tool accent set via :root override:
     :root { --accent: …; --accent-ink: …; --accent-soft: …; }
   ========================================================================== */

/* ---- fonts (self-hosted, latin subsets) -------------------------------- */
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ---- tokens ------------------------------------------------------------- */
:root {
  /* the sky */
  --ink-950: #0B1526;      /* deepest night — hero bg */
  --ink-900: #101E33;
  --ink-800: #1A2C47;
  --ink-700: #2A3F5E;
  --ink-500: #52678A;
  --ink-300: #9DACC4;      /* muted text on dark */
  /* the paper */
  --paper: #FAF7F1;        /* warm page background */
  --paper-raised: #FFFFFF;
  --paper-sunken: #F1ECE2;
  --line: #E4DDCF;
  --text: #22304A;
  --text-muted: #5D6B84;
  /* default accent (tools override) */
  --accent: #C89B3C;       /* aged gold */
  --accent-ink: #8F6A1E;
  --accent-soft: #F6ECD7;
  --star: #E8D9AE;
  /* shape + depth */
  --radius-s: 8px;  --radius-m: 14px;  --radius-l: 22px;
  --shadow-s: 0 1px 2px rgba(16, 30, 51, .06), 0 2px 8px rgba(16, 30, 51, .05);
  --shadow-m: 0 2px 6px rgba(16, 30, 51, .07), 0 12px 32px rgba(16, 30, 51, .10);
  --shadow-l: 0 4px 10px rgba(16, 30, 51, .08), 0 24px 64px rgba(16, 30, 51, .16);
  /* type */
  --display: 'Fraunces', Georgia, serif;
  --ui: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--ui); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; color: var(--ink-900); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.17rem; }
p  { margin: 0 0 1em; }
a  { color: var(--accent-ink); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-muted); }

/* ---- nav ---------------------------------------------------------------- */
.sky-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 21, 38, .92); backdrop-filter: blur(10px);
  color: #fff;
}
.sky-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.sky-nav .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.06rem; letter-spacing: .01em; }
.sky-nav .brand .mark { width: 22px; height: 22px; flex: none; }
.sky-nav .nav-links { display: flex; gap: 22px; align-items: center; }
.sky-nav .nav-links a { color: var(--ink-300); text-decoration: none; font-size: .9rem; font-weight: 500; }
.sky-nav .nav-links a:hover { color: #fff; }

/* ---- hero (the night sky) ---------------------------------------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 78% -10%, var(--ink-700) 0%, transparent 60%),
    radial-gradient(900px 420px at 12% 110%, var(--ink-800) 0%, transparent 55%),
    linear-gradient(175deg, var(--ink-950) 0%, var(--ink-900) 70%, var(--ink-800) 100%);
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 88px);
}
.hero h1 { color: #fff; max-width: 17em; }
.hero .lede { color: var(--ink-300); font-size: clamp(1.02rem, 2.2vw, 1.2rem); max-width: 34em; }
.hero .accent-word { color: var(--star); font-style: italic; font-weight: 400; }
/* star field: element is injected by sky.js, pure decoration */
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars .st { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: var(--star); opacity: .6; animation: twinkle 4.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .stars .st { animation: none; opacity: .35; } }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ui); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--ink-950); box-shadow: var(--shadow-s); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-m); }
.btn-ghost { background: transparent; color: inherit; border: 1.5px solid var(--ink-300); }
.btn-ghost:hover { border-color: currentColor; }
.btn-quiet { background: var(--paper-sunken); color: var(--text); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- sections + cards --------------------------------------------------- */
.section { padding: clamp(44px, 7vw, 84px) 0; }
.section-alt { background: var(--paper-sunken); }
.kicker { font: 600 .78rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.card {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-m); box-shadow: var(--shadow-s); padding: 26px;
}
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hover-lift { transition: transform .18s ease, box-shadow .18s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }

/* ---- the tool stage (preview area) -------------------------------------- */
.stage {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow-l); overflow: hidden;
}
.stage-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.stage-body { padding: 0; }

/* ---- forms --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: .84rem; font-weight: 600; color: var(--ink-700); }
input[type="text"], input[type="date"], input[type="number"], input[type="email"], select, textarea {
  font: 400 1rem/1.4 var(--ui); color: var(--text);
  background: var(--paper-raised); border: 1.5px solid var(--line);
  border-radius: var(--radius-s); padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* ---- unlock / paywall card ---------------------------------------------- */
.unlock-card {
  background: linear-gradient(170deg, var(--ink-900), var(--ink-950));
  color: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-l);
  padding: clamp(26px, 5vw, 44px); position: relative; overflow: hidden;
}
.unlock-card h2, .unlock-card h3 { color: #fff; }
.unlock-card .price { font-family: var(--display); font-size: 2.6rem; font-weight: 700; color: var(--star); line-height: 1; }
.unlock-card .price small { font: 500 .95rem var(--ui); color: var(--ink-300); }
.unlock-card ul { list-style: none; margin: 18px 0; padding: 0; }
.unlock-card li { padding: 7px 0 7px 30px; position: relative; color: #E8ECF4; }
.unlock-card li::before { content: '✦'; position: absolute; left: 4px; color: var(--star); }

/* ---- FAQ ----------------------------------------------------------------- */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: '+'; font-family: var(--display); font-size: 1.3rem; color: var(--accent-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 0 16px; color: var(--text-muted); }

/* ---- footer --------------------------------------------------------------- */
.sky-footer { background: var(--ink-950); color: var(--ink-300); padding: 44px 0 30px; font-size: .88rem; margin-top: 0; }
.sky-footer a { color: var(--ink-300); }
.sky-footer a:hover { color: #fff; }
.sky-footer .cols { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 26px; }
.sky-footer .brandline { font-family: var(--display); color: #fff; font-size: 1rem; margin-bottom: 8px; }
.sky-footer .honesty { border-top: 1px solid var(--ink-800); padding-top: 18px; font-size: .8rem; line-height: 1.6; }

/* ---- scroll reveal (sky.js adds .in) ------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- utility -------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 .76rem/1 var(--ui); letter-spacing: .04em; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.hr-soft { border: 0; border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 640px) {
  .sky-nav .nav-links { gap: 14px; }
  .btn { width: 100%; }
  .btn.btn-inline { width: auto; }
}
