/* ==========================================================================
   Kingsfoil Homes — landing page
   ========================================================================== */

:root {
  /* warm paper */
  --paper:      #FAF7F0;
  --paper-2:    #F3ECE1;
  --cream:      #FFFDF8;

  /* sage (from logo, left side) */
  --sage-900:   #2F3A29;
  --sage-800:   #3D4A35;
  --sage-700:   #55684C;
  --sage-500:   #8A9A7B;
  --sage-300:   #B5C0A5;
  --sage-100:   #E3E8DA;

  /* taupe (from logo, right side) */
  --taupe-600:  #A08A76;
  --taupe-400:  #C4AE9A;
  --taupe-100:  #EFE5DA;

  --ink:        #23261F;
  --ink-soft:   #59604F;

  --grad:       linear-gradient(105deg, var(--sage-500) 0%, var(--taupe-400) 100%);

  --max:        1180px;
  --gut:        clamp(1.25rem, 5vw, 3rem);

  --shadow-sm:  0 1px 2px rgba(35,38,31,.04), 0 6px 16px rgba(35,38,31,.05);
  --shadow-lg:  0 4px 12px rgba(35,38,31,.05), 0 30px 70px -20px rgba(47,58,41,.28);

  --display:    'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:       'DM Sans', system-ui, -apple-system, sans-serif;

  --ease:       cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

p { margin: 0 0 1.1em; }

h1, h2, h3, .cover-title {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 120;
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 0 0 .4em;
  color: var(--ink);
}
h1 em, h2 em, .inside-close em {
  font-style: italic;
  font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 144;
  color: var(--sage-700);
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

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

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

/* ---------- paper grain ---------------------------------------------------
   A fixed noise wash. This is what stops large flat cream areas from
   reading like a default bootstrap page.
   ------------------------------------------------------------------------ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- shared bits --------------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-700);
  margin-bottom: 1.4rem;
}
.eyebrow-rule {
  width: 34px; height: 1px;
  background: var(--taupe-600);
  flex: 0 0 auto;
}

.pill {
  display: inline-block;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage-700);
  border: 1px solid var(--sage-300);
  border-radius: 999px;
  padding: .3rem .75rem .25rem;
  margin-bottom: 1rem;
}

/* ---------- reveal on scroll --------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(2rem, 4vw, 3rem) clamp(4rem, 10vw, 7rem);
  overflow: hidden;
}

/* soft off-centre wash of colour behind the hero */
.hero-bloom {
  position: absolute;
  top: -35vh; right: -18vw;
  width: 92vw; max-width: 1100px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 45%,
              rgba(138,154,123,.30) 0%,
              rgba(196,174,154,.22) 42%,
              rgba(250,247,240,0) 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 7vw, 5rem);
  align-items: center;
}
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: 1.06fr .94fr; }
}

.hero-logo { width: 42px; height: 42px; margin-bottom: 1.5rem; }

/* Sized so the title holds ~3 lines and the form still lands above the
   fold on a 1440x900 laptop. */
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.2rem);
  max-width: 14ch;
  margin-bottom: .42em;
}

.hero-sub {
  max-width: 38ch;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}


/* ---------- hero visual: arch + floating cover + stamp ------------------- */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(360px, 56vw, 620px);
}

.arch {
  position: absolute;
  inset-inline: 6%;
  top: 0; bottom: 6%;
  background: var(--grad);
  border-radius: 999px 999px 28px 28px;
  opacity: .95;
}
.arch::after {           /* inner hairline for a printed, considered edge */
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,253,248,.30);
  border-radius: 999px 999px 18px 18px;
}

.cover {
  position: relative;
  z-index: 2;
  width: min(76%, 372px);
  aspect-ratio: 1 / 1.26;
  margin-top: 13%;
  background: var(--cream);
  border-radius: 6px 14px 14px 6px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
  padding: clamp(1.8rem, 3.6vw, 2.6rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  overflow: hidden;
}
.cover-rule {            /* spine */
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 9px;
  background: var(--grad);
}
.cover-mark { width: 46px; height: 46px; margin-bottom: 2.4rem; }
.cover-kicker {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--taupe-600);
  margin: 0 0 .7rem;
}
.cover-title {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.05;
  margin: 0;
}

.stamp {
  position: absolute;
  z-index: 3;
  right: 1%;
  bottom: 2%;
  width: clamp(92px, 13vw, 128px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--sage-300);
  display: grid;
  place-items: center;
  text-align: center;
  transform: rotate(-11deg);
  box-shadow: var(--shadow-sm);
}
.stamp span {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  line-height: 1.1;
  color: var(--sage-700);
}
.stamp small {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--taupe-600);
  margin-top: .25rem;
}

/* ==========================================================================
   FORM
   ========================================================================== */
.signup {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  max-width: 920px;   /* room for email + audit choice + button on one row */
}
.signup input[type="email"] {
  flex: 1 1 240px;
  min-height: 62px;
  padding: 0 1.3rem;
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--taupe-100);
  border-radius: 4px;
  transition: border-color .2s var(--ease);
}
.signup input[type="email"]:hover { border-color: var(--taupe-400); }
.signup input[type="email"]::placeholder { color: #A9A79C; }

.signup button {
  flex: 0 0 auto;
  min-height: 62px;
  padding: 0 1.8rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--sage-800);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s var(--ease);
}
.signup button i { font-style: normal; transition: transform .25s var(--ease); }
.signup button:hover { background: var(--sage-900); }
.signup button:hover i { transform: translateX(4px); }
.signup button:disabled { opacity: .6; cursor: default; }

.signup .hp {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; opacity: 0;
}

/* Rides on the same row as the email field and the button — matched to their
   62px height so the three read as one band, wrapping only when the column
   genuinely runs out of room. */
.audit-opt {
  flex: 1 1 250px;
  min-height: 62px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: .15rem .95rem;
  font-size: .84rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.audit-q { flex-basis: 100%; }
.req {
  font-weight: 500;
  color: var(--taupe-600);
  margin-left: .2em;
}
.audit-opt label {
  display: flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
}
.audit-opt input[type="radio"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  accent-color: var(--sage-800);
  cursor: pointer;
}

.form-status {
  flex-basis: 100%;
  margin: .35rem 0 0;
  font-size: .88rem;
  min-height: 1.2em;
}
.form-status.is-error { color: #9E3B27; }

.micro-trust {
  margin: 1rem 0 0;
  font-size: .78rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 42ch;
}

/* dark variant, used in the closing CTA */

/* success state */
.signup-success {
  max-width: 500px;
  background: var(--cream);
  border: 1px solid var(--sage-300);
  border-left: 4px solid var(--sage-700);
  border-radius: 4px;
  padding: 1.5rem 1.6rem;
}
.signup-success p { margin: 0; font-size: 1.1rem; color: var(--ink-soft); }
.signup-success .success-head {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -.02em;
  color: var(--sage-900);
  margin-bottom: .4rem;
}

/* ==========================================================================
   SOURCE MARQUEE
   ========================================================================== */
.sources {
  padding-block: clamp(2.5rem, 5vw, 3.2rem);
  background: var(--paper-2);
  border-block: 1px solid var(--taupe-100);
  text-align: center;
  overflow: hidden;
}
.sources-label {
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--taupe-600);
  margin: 0;
  padding-inline: var(--gut);
}

.marquee {
  margin-top: 1.6rem;
  -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;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee-list {
  display: flex;
  align-items: center;
  gap: 3.2rem;
  list-style: none;
  margin: 0;
  padding: 0 1.6rem;
  flex: 0 0 auto;
}
.marquee-list li {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  letter-spacing: -.01em;
  color: var(--sage-700);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   WHAT'S INSIDE
   ========================================================================== */
.inside { padding-block: clamp(4.5rem, 11vw, 8.5rem); }

.section-head { max-width: 46ch; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section-head h2 { max-width: 17ch; }
.section-head h2 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
.section-head p {
  max-width: 46ch;
  font-size: 1.35rem;
  color: var(--ink-soft);
  margin: 1.2rem 0 0;
}

.steps { list-style: none; margin: 0; padding: 0; }

.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
  padding-block: clamp(1.8rem, 3.5vw, 2.6rem);
  border-top: 1px solid var(--taupe-100);
}
.step:last-of-type { border-bottom: 1px solid var(--taupe-100); }

@media (min-width: 760px) {
  .step {
    grid-template-columns: 8rem 1fr;
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: start;
  }
}

.step-num {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 144;
  line-height: 1;
  color: var(--sage-300);
  transition: color .4s var(--ease);
}
.step:hover .step-num { color: var(--sage-700); }

.step-body { max-width: 56ch; }
.step h3 {
  font-size: clamp(1.55rem, 2.9vw, 2.15rem);
  margin-bottom: .5rem;
}
.step p { font-size: 1.25rem; line-height: 1.62; color: var(--ink-soft); margin: 0; }

.inside-close {
  max-width: 30ch;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0 auto;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.1vw, 2.15rem);
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--ink);
  text-align: right;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about {
  background: var(--paper-2);
  border-block: 1px solid var(--taupe-100);
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 7vw, 5.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: .8fr 1.2fr; }
}

.about-visual { position: relative; padding: 1.5rem; }
.about-arch {
  position: relative;
  aspect-ratio: 1 / 1.22;
  max-width: 330px;
  margin-inline: auto;
  background: var(--grad);
  border-radius: 999px 999px 20px 20px;
  display: grid;
  place-items: center;
}
.about-arch::after {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid rgba(255,253,248,.32);
  border-radius: 999px 999px 12px 12px;
}
.about-arch img {
  width: 44%;
  mix-blend-mode: luminosity;
  opacity: .9;
}
.about-shadow {          /* offset block for depth */
  position: absolute;
  left: 0; bottom: 0;
  width: 62%; height: 58%;
  border: 1px solid var(--taupe-400);
  border-radius: 6px;
}

.about-copy h2 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); margin-bottom: .6em; }
.about-copy p { font-size: 1.25rem; line-height: 1.68; color: var(--ink-soft); max-width: 50ch; }

.pull-quote {
  margin: 2.2rem 0 0;
  padding-left: 1.6rem;
  border-left: 2px solid var(--sage-500);
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 144;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.35;
  letter-spacing: -.02em;
  color: var(--sage-800);
  max-width: 30ch;
}

/* ==========================================================================
   CLOSING CTA — quiet band, horizontal, no colour shift
   ========================================================================== */
.cta {
  position: relative;
  background: var(--paper);
  border-top: 1px solid var(--taupe-100);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.cta h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin: 0;
  flex: 0 1 auto;
}
.cta .signup { flex: 1 1 420px; max-width: 520px; margin: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}
.footer-logo { width: 40px; height: 40px; margin: 0 auto .9rem; }
.footer-name {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -.02em;
  margin: 0 0 .1rem;
}
.footer-tagline {
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--taupe-600);
  margin: 0;
}
.footer-rule {
  display: block;
  width: 48px; height: 1px;
  background: var(--taupe-400);
  margin: 2.2rem auto;
}
.footer-legal {
  max-width: 58ch;
  margin: 0 auto 1.2rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.footer-copy { font-size: 1rem; color: var(--taupe-600); margin: 0; }

/* ==========================================================================
   MOBILE STICKY CTA
   ========================================================================== */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem .9rem;
  background: rgba(47,58,41,.97);
  color: var(--cream);
  backdrop-filter: blur(8px);
  transform: translateY(110%);
  transition: transform .4s var(--ease);
}
.sticky-cta[hidden] { display: none; }
.sticky-cta.is-in { transform: none; }
.sticky-cta span {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sage-300);
}
.sticky-cta a {
  flex: 0 0 auto;
  padding: .7rem 1.1rem;
  background: var(--cream);
  color: var(--sage-900);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
}
@media (max-width: 759px) {
  .sticky-cta:not([hidden]) { display: flex; }
  body { padding-bottom: 0; }
}

/* ==========================================================================
   RESPONSIVE TRIMS
   ========================================================================== */
@media (max-width: 939px) {
  .hero-visual { min-height: 0; padding-block: 1rem 2rem; }
  .arch { inset-inline: 14%; bottom: 6%; }
  .cover { width: min(80%, 330px); margin-top: 8%; }
  .stamp { right: 6%; bottom: 6%; }
  .inside-close { margin-inline: 0 auto; text-align: left; max-width: 34ch; }
  .about-shadow { display: none; }
}

@media (max-width: 480px) {
  .signup input[type="email"] { flex-basis: 100%; }
  .signup button { width: 100%; justify-content: center; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .marquee {
    -webkit-mask-image: none; mask-image: none;
    overflow-x: auto;
  }
}
