/* ==========================================================================
   Whimoir — static site
   Ported from Framer. Tokens measured from the live build.
   ========================================================================== */

@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,700&display=swap');

:root {
  --bg:          #f3f3f3;
  --bg-warm:     #f3efec;
  --text:        #423628;
  --text-muted:  rgba(66, 54, 40, 0.6);
  --ink:         #000000;
  --ink-muted:   rgba(0, 0, 0, 0.6);
  --accent:      #fcbb2b;
  --rule:        rgba(0, 0, 0, 0.08);

  --container:   872px;
  --nav-h:       68px;

  --font: 'General Sans', ui-sans-serif, system-ui, -apple-system,
          'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* --- Nav ---------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  z-index: 100;
  background: transparent;
  transition: background 240ms ease, backdrop-filter 240ms ease;
}
.nav.is-stuck {
  background: rgba(243, 243, 243, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.nav__inner { display: flex; align-items: center; }
.nav__logo  { width: 93px; height: auto; }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding-inline: 24px;
  border-radius: 80px;
  background: var(--accent);
  color: var(--text);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.22,.61,.36,1), filter 180ms ease;
}
.btn:hover  { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn svg    { flex: none; transition: transform 180ms cubic-bezier(.22,.61,.36,1); }
.btn:hover svg { transform: translateX(3px); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  background: var(--bg-warm);
  padding-top: calc(var(--nav-h) + 104px);
  padding-bottom: 0;
  overflow: hidden;
}
.hero__title {
  margin: 0;
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--text);
}
.hero__sub {
  max-width: 500px;
  margin: 32px auto 0;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text-muted);
}
.hero__cta { display: flex; justify-content: center; margin-top: 45px; }

/* Hero visual: pen + notepad + phone, positioned as measured on the original.
   Ratios are taken from a 792 x 875 stage. */
.stage {
  position: relative;
  width: 100%;
  max-width: 792px;
  margin: 72px auto 0;
  aspect-ratio: 792 / 875;
}
.stage img { position: absolute; }

.stage__pen     { left: 0;       top: 0;       width: 44.95%; }  /* 356/792 */
.stage__frame   { left: 29.55%;  top: 16.34%;  width: 45.20%; }  /* 358/792 */
.stage__screen  { left: 31.31%;  top: 17.26%;  width: 41.67%;    /* 330/792 */
                  border-radius: 30px; }
.stage__pad     { left: 59.34%;  top: 35.66%;  width: 40.66%; }  /* 322/792 */

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

.closing { background: var(--bg-warm); padding: 96px 0 120px; }
.closing__title {
  margin: 0;
  max-width: 644px;
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
}
.closing__cta { margin-top: 58px; }

/* --- Footer ------------------------------------------------------------- */

.footer {
  background: var(--bg);
  padding: 40px 0;
  border-top: 1px solid var(--rule);
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-muted);
}
.footer__copy { margin: 0; margin-right: 52px; }
.footer a { transition: color 160ms ease; }
.footer a:hover { color: var(--ink); }

/* --- Legal pages (privacy / terms) -------------------------------------- */

.legal { background: var(--bg); padding-top: calc(var(--nav-h) + 104px); padding-bottom: 120px; }
.legal__updated { margin: 0; font-size: 19px; font-weight: 400; color: var(--ink-muted); }
.legal__title {
  margin: 24px 0 0;
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.legal__layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  margin-top: 128px;
  align-items: start;
}

.toc { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 18px; }
.toc a {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-muted);
  transition: color 160ms ease;
}
.toc a:hover, .toc a.is-active { color: var(--ink); }

.prose { color: var(--ink); font-size: 19px; line-height: 1.45; max-width: 644px; }
.prose > p:first-child { margin-top: 0; }
.prose h2 {
  margin: 74px 0 24px;
  font-size: clamp(28px, 2.7vw, 39px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.prose p  { margin: 0 0 18px; }
.prose ul { margin: 0 0 18px; padding-left: 22px; list-style: disc; }
.prose li { margin-bottom: 10px; }
.prose strong { font-weight: 700; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* --- Contact ------------------------------------------------------------ */

.contact { background: var(--bg-warm); padding-top: calc(var(--nav-h) + 104px); padding-bottom: 96px; }
.contact__title {
  margin: 0 0 48px;
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--text);
}
/* Tally embed — the contact form now lives in Tally (form id 1AaNGb).
   transparentBackground=1 lets the warm section colour show through. */
.tally-embed { max-width: 560px; }
/* min-height is a floor, not a target: Tally's dynamicHeight grows the frame to
   fit. It matters only when that script fails — without it the iframe would sit
   at its placeholder height and clip the form, worst on narrow screens. */
.tally-embed iframe { display: block; width: 100%; border: 0; min-height: 480px; }

/* The hand-built form below is no longer rendered — kept so the custom-styled
   version can be restored by swapping the Tally embed back out in contact.html.
   Field styling mirrors the original: transparent ground, square corners,
   a single hairline rule under each input. */
.form { display: grid; gap: 20px; max-width: 440px; }
.field { display: grid; gap: 6px; }
.field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}
.field input, .field textarea {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(66, 54, 40, 0.22);
  border-radius: 0;
  padding: 10px 2px;
  width: 100%;
  transition: border-color 160ms ease;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(66, 54, 40, 0.38); }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--text);
}
.form .btn { width: 100%; justify-content: center; height: 43px; margin-top: 12px; }
.form__note { font-size: 14px; color: var(--text-muted); margin: 4px 0 0; }

/* --- Scroll-in animation (mirrors Framer's appear effect) ---------------- */

/* Gated on .js so the page still renders fully if the script never runs. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.22,.61,.36,1),
              transform 700ms cubic-bezier(.22,.61,.36,1);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .btn, .btn svg { transition: none; }
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 860px) {
  .legal__layout { grid-template-columns: 1fr; gap: 32px; margin-top: 64px; }
  /* Tap targets: the links are only ~19px tall from line-height alone. Trading
     the 18px gap for 10px of padding lifts each target to ~39px without making
     the list any longer overall. */
  .toc {
    position: static;
    grid-auto-flow: row;
    gap: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule);
  }
  .toc a { padding: 10px 0; }
  .hero { padding-top: calc(var(--nav-h) + 56px); }
  .legal, .contact { padding-top: calc(var(--nav-h) + 56px); }
  .stage { margin-top: 48px; }
  .closing { padding: 72px 0 88px; }
}

@media (max-width: 560px) {
  .footer__inner { gap: 0 20px; }
  .footer__copy { margin-right: 0; flex-basis: 100%; }
  .footer a { padding: 9px 0; }          /* ~37px tap target, was 19px */
  .hero__cta .btn, .closing__cta .btn { width: 100%; justify-content: center; }
  .tally-embed iframe { min-height: 560px; }  /* form is taller when narrow */
}
