/* =========================================================
   BuyProperty.com — domain sale landing page
   "Heritage advisory": Fraunces display · Instrument Sans body ·
   Space Mono utility. Pine green on cool porcelain. Light + dark.
   Self-hosted fonts, no external requests, no framework.
   ========================================================= */

/* ---------- Self-hosted typefaces ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/space-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --paper:   #efeee7;   /* cool porcelain — not cream */
  --paper-2: #e6e5dc;   /* subtly raised surface */
  --ink:     #1a1c19;   /* cool near-black, faint green-grey */
  --muted:   #63665f;   /* secondary text */
  --line:    rgba(26, 28, 25, 0.15);
  --line-2:  rgba(26, 28, 25, 0.08);
  --accent:  #2c5e45;   /* deep pine green — heritage, value, trust */
  --accent-soft: rgba(44, 94, 69, 0.10);
  --accent-ink: #f2f1e9;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-mono: "Space Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] {
  --paper:   #101311;
  --paper-2: #181c19;
  --ink:     #ecede6;
  --muted:   #969b90;
  --line:    rgba(236, 237, 230, 0.16);
  --line-2:  rgba(236, 237, 230, 0.09);
  --accent:  #74c39a;   /* brightened pine for dark */
  --accent-soft: rgba(116, 195, 154, 0.12);
  --accent-ink: #0e120f;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --paper:   #101311;
    --paper-2: #181c19;
    --ink:     #ecede6;
    --muted:   #969b90;
    --line:    rgba(236, 237, 230, 0.16);
    --line-2:  rgba(236, 237, 230, 0.09);
    --accent:  #74c39a;
    --accent-soft: rgba(116, 195, 154, 0.12);
    --accent-ink: #0e120f;
  }
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.55;
  letter-spacing: -0.004em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

/* Display face carries the personality; used with restraint at large sizes. */
h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 540;
  line-height: 1.03;
  margin: 0;
  letter-spacing: -0.02em;
}
p { margin: 0; }
a { color: inherit; }
em { font-style: italic; }

.mono { font-family: var(--font-mono); font-size: 0.86em; letter-spacing: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: 4px;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* ---------- Layout helpers ---------- */
main > section,
.topbar,
.footer { padding-inline: var(--gutter); }

.section, .band, .offer { max-width: var(--maxw); margin-inline: auto; }

/* ---------- Wordmark ---------- */
.wordmark {
  text-decoration: none; font-family: var(--font-display); font-optical-sizing: auto;
  font-weight: 560; letter-spacing: -0.02em;
  font-size: 1.28rem; display: inline-flex; align-items: baseline;
}
.wordmark__tld { color: var(--accent); }
.wordmark--sm { font-size: 1.16rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 500; letter-spacing: -0.01em;
  padding: 0.62rem 1.15rem; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn--lg { padding: 0.85rem 1.6rem; font-size: 1.02rem; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.topbar__actions { display: flex; align-items: center; gap: 0.75rem; }

/* Keep the top bar from overflowing on narrow phones */
@media (max-width: 440px) {
  .topbar { --gutter: 1.1rem; }
  .topbar__actions { gap: 0.5rem; }
  .topbar .wordmark { font-size: 1.02rem; }
  .topbar .btn--primary { padding: 0.5rem 0.85rem; font-size: 0.92rem; }
  .theme-toggle { width: 32px; height: 32px; }
}

.theme-toggle {
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0;
  transition: border-color 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle__dot {
  width: 15px; height: 15px; border-radius: 999px;
  background: radial-gradient(circle at 32% 30%, var(--ink) 0 50%, transparent 51%);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin-inline: auto;
  padding-top: clamp(3.5rem, 9vw, 7rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1.4rem;
}
.hero__title {
  font-size: clamp(3.2rem, 12.5vw, 10.5rem);
  line-height: 0.92; letter-spacing: -0.028em; font-weight: 500;
  display: flex; flex-wrap: wrap; align-items: baseline;
}
.hero__tld { color: var(--accent); }
.hero__lede {
  max-width: 34ch; margin-top: 1.8rem;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.4; color: var(--ink); letter-spacing: -0.015em;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.2rem; }
.hero__note {
  margin-top: 1.6rem; font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: 0.02em; color: var(--muted);
}

/* ---------- Section heads ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); border-top: 1px solid var(--line); }
.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head--center { text-align: center; }
.section__index {
  display: block; font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent);
  margin-bottom: 0.85rem;
}
.section__title { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.5rem); max-width: 20ch; }
.section__head--center .section__title { margin-inline: auto; }

/* ---------- Pillars ---------- */
.pillars {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem) clamp(2rem, 4vw, 4rem);
}
.pillar { padding-top: 1.4rem; border-top: 1px solid var(--line-2); }
.pillar__title {
  font-family: var(--font-sans); font-weight: 600;
  font-size: 1.2rem; margin-bottom: 0.6rem; letter-spacing: -0.01em;
}
.pillar__body { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.pillar__body em { color: var(--ink); font-style: italic; }

/* ---------- Versatility band + marquee ---------- */
.band { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); text-align: center; }
.marquee {
  position: relative; display: flex; gap: 0; overflow: hidden;
  padding-block: 0.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; flex-shrink: 0;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding-right: clamp(0.75rem, 2vw, 1.5rem);
  font-family: var(--font-display); font-optical-sizing: auto;
  font-size: clamp(1.7rem, 1rem + 3.4vw, 3.6rem);
  font-weight: 500; letter-spacing: -0.02em; white-space: nowrap;
  animation: marquee 40s linear infinite;
}
.marquee__track span { color: var(--ink); }
.marquee__sep { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; flex-wrap: wrap; justify-content: center; }
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; }
  .marquee__track:nth-child(2) { display: none; }
}
.band__note {
  max-width: 46ch; margin: clamp(2rem, 4vw, 3rem) auto 0;
  color: var(--muted); font-size: clamp(1.02rem, 1rem + 0.4vw, 1.25rem); line-height: 1.5;
}

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}
.stat { border-top: 1px solid var(--line-2); padding-top: 1.4rem; }
.stat__figure {
  font-family: var(--font-display); font-optical-sizing: auto;
  font-size: clamp(3.2rem, 2rem + 5.2vw, 5.8rem); font-weight: 480;
  letter-spacing: -0.03em; line-height: 1; display: flex; align-items: baseline;
}
.stat__prefix, .stat__suffix { color: var(--accent); }
.stat__prefix { font-size: 0.6em; margin-right: 0.05em; }
.stat__suffix { font-size: 0.6em; margin-left: 0.03em; }
.stat__word { color: var(--accent); font-family: var(--font-mono); letter-spacing: -0.02em; }
.stat__label { margin-top: 1rem; color: var(--muted); font-size: 0.98rem; line-height: 1.45; max-width: 26ch; }
.stats__foot { margin-top: clamp(2rem, 4vw, 3rem); color: var(--muted); font-size: 0.9rem; max-width: 60ch; }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step {
  display: flex; gap: clamp(1rem, 3vw, 2.5rem); align-items: flex-start;
  padding-block: clamp(1.4rem, 3vw, 2rem); border-top: 1px solid var(--line-2);
}
.step:first-child { border-top: none; }
.step__num {
  font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px;
  width: 2.4rem; height: 2.4rem; flex: 0 0 auto; display: grid; place-items: center;
}
.step__title {
  font-family: var(--font-sans); font-weight: 600;
  font-size: 1.2rem; margin-bottom: 0.4rem; letter-spacing: -0.01em;
}
.step__body { color: var(--muted); max-width: 52ch; }

/* ---------- Offer ---------- */
.offer {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 900px) { .offer { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }
.offer__lede { margin-top: 1.4rem; color: var(--muted); font-size: 1.1rem; max-width: 38ch; line-height: 1.5; }
.offer__direct { margin-top: 1.2rem; font-size: 0.98rem; color: var(--muted); }
.offer__direct a { color: var(--accent); text-underline-offset: 3px; }

.offer-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; font-family: var(--font-mono); letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }
.field__opt { text-transform: none; opacity: 0.7; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 0.9rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  width: 100%; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--paper); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.offer-form__foot { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 0.4rem; }
.offer-form__status { font-size: 0.95rem; color: var(--muted); margin: 0; }
.offer-form__status[data-state="ok"] { color: var(--accent); }
.offer-form__status[data-state="err"] { color: #c0392b; }
:root[data-theme="dark"] .offer-form__status[data-state="err"] { color: #ff7a63; }
@media (max-width: 520px) { .offer-form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; align-items: baseline; justify-content: space-between;
}
.footer__contact a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
.footer__contact a:hover { text-decoration: underline; }
.footer__legal { color: var(--muted); font-size: 0.82rem; width: 100%; margin-top: 0.5rem; }

/* ---------- Reveal animation ----------
   Only hidden when JS is active (.js on <html>), so no-JS visitors see everything. */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
