/* ==========================================================================
   Muranti — Landing Page
   Design tokens (:root). See DESIGN-TOKENS.md for rationale.
   Source of truth: muranti.com brand (greige + olive + Poppins/Silk),
   with Vineta "Furniture 2" as layout/spacing reference.
   ========================================================================== */

/* --- Silk Serif (brand display font), self-hosted --------------------------- */
@font-face {
  font-family: "Silk Serif";
  src: url("../fonts/silk-serif-200.woff2") format("woff2");
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Silk Serif";
  src: url("../fonts/silk-serif-300.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Silk Serif";
  src: url("../fonts/silk-serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Silk Serif";
  src: url("../fonts/silk-serif-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  /* --- Color: semantic roles (matched to muranti.com) -------------------- */
  --paper: #EEEDE6;          /* page background — brand greige (exact) */
  --paper-light: #FAF9F5;    /* lighter warm tone, alt blocks */
  --surface: #FFFFFF;        /* cards (form, stocklist preview) */
  --ink: #212529;            /* primary body text (brand) */
  --olive: #3B3C2C;          /* BRAND signature — headlines, links, CTA fill */
  --olive-deep: #2A2B1F;     /* olive hover/pressed */
  --ink-soft: #6E6F60;       /* secondary text (olive-tinted grey) */
  --tan: #C0A17C;            /* warm wood accent (from Muranti photography) */
  --line: #DFDED7;           /* borders, hairlines, input outlines */
  --dark: #21201A;           /* dark sections / footer / hero overlay */
  --on-dark: #EEEDE6;        /* text on dark */
  --on-dark-soft: #A9A99B;   /* muted text on dark */
  --danger: #B23B2E;         /* form validation errors (muted brick) */

  /* --- Typography: families ---------------------------------------------- */
  /* Display = Silk Serif (the brand display face, self-hosted); body/UI = Poppins. */
  --font-display: "Silk Serif", Georgia, "Times New Roman", serif;
  --font-body: "Poppins", "Helvetica Neue", Arial, sans-serif;

  /* --- Typography: size / line-height scale ------------------------------ */
  --fs-display-2xl: 72px;  --lh-display-2xl: 84px;
  --fs-display-xl:  60px;  --lh-display-xl:  70px;
  --fs-display-lg:  48px;  --lh-display-lg:  58px;
  --fs-display-md:  36px;  --lh-display-md:  44px;
  --fs-display-sm:  30px;  --lh-display-sm:  38px;
  --fs-text-xl:     20px;  --lh-text-xl:     30px;
  --fs-text-lg:     18px;  --lh-text-lg:     28px;
  --fs-text-md:     16px;  --lh-text-md:     24px;
  --fs-text-sm:     14px;  --lh-text-sm:     20px;
  --fs-text-xs:     12px;  --lh-text-xs:     18px;

  /* --- Typography: weights & letter-spacing ------------------------------ */
  --fw-light: 300;       /* brand headings run light */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --ls-display: 0.05em;  /* uppercase display, gently spaced (muranti ~0.7px) */
  --ls-kicker: 0.22em;   /* uppercase eyebrow labels */
  --ls-body: 0.005em;
  --ls-button: 0.14em;   /* uppercase button text */

  /* --- Spacing: 8px base scale ------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 96px;
  --space-12: 128px;
  --section-y: clamp(56px, 9vw, 120px);   /* vertical rhythm per section */
  --container-max: 1360px;
  --container-pad: clamp(20px, 5vw, 72px);

  /* --- Radius (sharp, gallery framing — brand uses radius 0) ------------- */
  --radius-sm: 0px;
  --radius: 0px;

  /* --- Shadow (subtle only) --------------------------------------------- */
  --shadow-none: none;
  --shadow-soft: 0 4px 28px rgba(33, 32, 26, 0.08);

  /* --- Border ------------------------------------------------------------ */
  --hairline: 1px solid var(--line);

  /* --- Focus & motion ---------------------------------------------------- */
  --focus-ring: 2px solid var(--olive);
  --focus-offset: 2px;
  --transition: 0.3s ease;
}

/* ==========================================================================
   BASE / RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-text-md);
  line-height: var(--lh-text-md);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--olive); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--olive-deep); }

h1, h2, h3 { margin: 0; font-weight: var(--fw-regular); }

button { font-family: inherit; }

/* Visible focus for keyboard users everywhere */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ==========================================================================
   SHARED UTILITIES
   ========================================================================== */
.section__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Uppercase, letter-spaced eyebrow — plain and quiet, muranti-style */
.kicker {
  margin: 0 0 var(--space-4);
  font-family: var(--font-body);
  font-size: var(--fs-text-xs);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 16px 36px;
  font-family: var(--font-body);
  font-size: var(--fs-text-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.btn { transition: background-color var(--transition), color var(--transition), border-color var(--transition); }

.btn--primary {
  background: var(--olive);
  color: var(--paper);
  border-color: var(--olive);
}
.btn--primary:hover {
  background: var(--olive-deep);
  border-color: var(--olive-deep);
  color: var(--paper);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.btn--block { width: 100%; }

/* ==========================================================================
   HERO — split: brand statement over image | lead-capture card
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  /* Brand olive ground with cream text — the white form card sits on top.
     Drop in a real photo later if desired. */
  background: var(--olive);
}

.hero__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(48px, 8vw, 96px) var(--container-pad);
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr minmax(380px, 460px);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

/* --- Left: brand message (cream on olive) --- */
.hero__intro { color: var(--on-dark); max-width: 620px; }
.hero .kicker { color: var(--on-dark-soft); }

.hero__brand {
  display: inline-block;
  margin-bottom: var(--space-7);
}
.hero__brand img {
  height: clamp(48px, 6vw, 68px);
  width: auto;
  display: block;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: clamp(2.5rem, 5.4vw, 3.75rem);
  line-height: 1.14;
  color: var(--on-dark);
  margin: 0 0 var(--space-6);
}

.hero__sub {
  font-size: var(--fs-text-lg);
  line-height: 1.7;
  font-weight: var(--fw-light);
  color: var(--on-dark-soft);
  max-width: 46ch;
  margin: 0;
}

/* --- Right: the lead-capture card --- */
.hero__form-card {
  position: relative;
  background: var(--surface);
  padding: clamp(30px, 3vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-card__title {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  text-transform: uppercase;
  letter-spacing: var(--ls-display);
  font-size: var(--fs-display-sm);
  line-height: var(--lh-display-sm);
  color: var(--olive);
  margin: 0 0 var(--space-3);
}

.form-card__lead {
  margin: 0 0 var(--space-6);
  font-size: var(--fs-text-sm);
  line-height: var(--lh-text-sm);
  color: var(--ink-soft);
}

.form-card__note {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-text-xs);
  line-height: var(--lh-text-xs);
  color: var(--ink-soft);
  text-align: center;
}

/* ==========================================================================
   LEAD FORM (fields shared by hero card)
   ========================================================================== */
.lead-form .field { margin-bottom: var(--space-4); }

.lead-form label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--fs-text-sm);
  font-weight: var(--fw-medium);
  color: var(--ink);
}

.lead-form .req { color: var(--olive); }

.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form input[type="tel"],
.lead-form select {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: var(--fs-text-md);
  color: var(--ink);
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.lead-form input:focus,
.lead-form select:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 2px rgba(59, 60, 44, 0.18);
}

/* Native select caret (since appearance is reset) */
.lead-form select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
}

/* Consent row: checkbox beside small print */
.field--consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.field--consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--olive);
  cursor: pointer;
}
.field--consent label {
  margin: 0;
  font-size: var(--fs-text-xs);
  line-height: var(--lh-text-xs);
  font-weight: var(--fw-regular);
  color: var(--ink-soft);
}
.field--consent .privacy-link { text-decoration: underline; }

.lead-form .btn--block { margin-top: var(--space-5); }
.lead-form button[disabled] { opacity: 0.65; cursor: default; }

/* Field-level validation error */
.field.has-error input,
.field.has-error select { border-color: var(--danger); }
.field.has-error input:focus,
.field.has-error select:focus { box-shadow: 0 0 0 2px rgba(178, 59, 46, 0.18); }
.field__error {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--fs-text-xs);
  line-height: var(--lh-text-xs);
  color: var(--danger);
}
.field--consent.has-error label { color: var(--danger); }

/* Form-level error (network / server) */
.form-error {
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-text-sm);
  color: var(--danger);
  background: rgba(178, 59, 46, 0.08);
  border: 1px solid rgba(178, 59, 46, 0.35);
  border-radius: var(--radius);
}

/* Success state (replaces the form) */
.form-success { text-align: center; padding: var(--space-6) 0; }
.form-success__text {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-text-md);
  line-height: var(--lh-text-md);
  color: var(--ink-soft);
}

/* Honeypot: kept in the DOM (bots fill it) but removed from view */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   SHARED SECTION HEADINGS
   ========================================================================== */
section { padding-block: var(--section-y); }

.section__title {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.18;
  color: var(--olive);
  margin: 0 0 var(--space-4);
}

.section__lead {
  font-size: var(--fs-text-lg);
  line-height: 1.7;
  font-weight: var(--fw-light);
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0;
}

/* ==========================================================================
   MINIMAL FOOTER
   ========================================================================== */
.site-footer {
  background: var(--olive);
  color: var(--on-dark);
  padding-block: var(--space-9);
  text-align: center;
}
.site-footer__brand {
  margin: 0 0 var(--space-4);
}
.site-footer__brand img {
  height: 62px;
  width: auto;
  display: inline-block;
}
.site-footer__meta {
  margin: 0 0 var(--space-5);
  font-size: var(--fs-text-sm);
  color: var(--on-dark-soft);
}
.site-footer__legal {
  margin: 0;
  font-size: var(--fs-text-xs);
  letter-spacing: 0.04em;
  color: var(--on-dark-soft);
}
.site-footer__legal a { color: var(--on-dark); text-decoration: underline; }
.site-footer__legal a:hover { color: var(--on-dark-soft); }

/* ==========================================================================
   RESPONSIVE — hero stacks on tablet/mobile, form remains above the fold
   ========================================================================== */
@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: var(--space-8);
    padding-block: clamp(40px, 12vw, 72px);
  }
  .hero__intro { max-width: none; }
  .hero__brand { margin-bottom: var(--space-5); }
}

@media (max-width: 520px) {
  .hero__form-card { padding: 24px 20px; }
}

/* ==========================================================================
   SCROLL REVEAL — gentle fade-up as sections enter (muranti.com cue)
   ========================================================================== */
/* Fail-visible: elements only hide once JS confirms it can reveal them
   (html.reveal-ready). No JS / no observer → content stays visible. */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
}
.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger children within a revealed group */
.reveal-ready .reveal[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-ready .reveal.is-visible[data-reveal-stagger] > * { opacity: 1; transform: none; }
.reveal.is-visible[data-reveal-stagger] > *:nth-child(2) { transition-delay: 0.08s; }
.reveal.is-visible[data-reveal-stagger] > *:nth-child(3) { transition-delay: 0.16s; }
.reveal.is-visible[data-reveal-stagger] > *:nth-child(4) { transition-delay: 0.24s; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .reveal, .reveal[data-reveal-stagger] > * { opacity: 1; transform: none; }
}
