/* ============================================================
   WAYFIRE — Main Stylesheet
   All copy maps to content.json. See HTML comments for keys.
   ============================================================ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Tokens ── */
:root {
  --bg:          #FAFAF8;
  --bg-alt:      #F3F3F0;
  --text:        #1A1A18;
  --text-muted:  #6B6B66;
  --accent:      #C17F3A;
  --accent-light:#FDF3E7;
  --border:      #E5E5E1;
  --radius:      6px;
  --max-w:       1200px;
  --section-gap: 7rem;

  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 300;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
ul { list-style: none; }

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: var(--section-gap);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 38ch;
  margin-bottom: 1.5rem;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ================================================================
   NAV
   ================================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* nav.logo → content.json: nav.logo */
.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav__logo-svg {
  height: 58px; /* mark portion renders ~44px tall */
  width: auto;
  display: block;
}
.footer__logo-svg {
  height: 46px;
  width: auto;
  display: block;
  opacity: 0.85;
}

.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

/* nav.links[] → content.json: nav.links */
.nav__links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav__links a:hover { color: var(--text); }

/* nav.cta → content.json: nav.cta */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.6em 1.3em;
  border-radius: var(--radius);
  border: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover {
  background: #333330;
  transform: translateY(-1px);
}
.btn-primary:active { transform: none; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  padding-top: 5rem;
  padding-bottom: 6rem;
  text-align: center;
}

/* hero.headline → content.json: hero.headline */
.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-inline: auto;
  margin-bottom: 1.5rem;
}
.hero__headline em {
  font-style: italic;
  color: var(--accent);
}

/* hero.subheadline → content.json: hero.subheadline */
.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* hero.cta → content.json: hero.cta */
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.8em 1.8em;
  border-radius: var(--radius);
  border: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(193, 127, 58, 0.3);
}
.btn-hero:hover {
  background: #A86D2C;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(193, 127, 58, 0.35);
}
.btn-hero:active { transform: none; }

.hero__divider {
  width: 48px;
  height: 1px;
  background: var(--border);
  margin: 4rem auto 0;
}

/* ================================================================
   PROBLEM
   ================================================================ */
.problem {
  background: var(--bg-alt);
}

/* problem.body → content.json: problem.body */
.problem__body {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 54ch;
  margin-bottom: 3.5rem;
  line-height: 1.8;
}

/* problem.painPoints[] → content.json: problem.painPoints */
.problem__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.problem__card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
}
.problem__card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.6rem;
}
.problem__card-body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ================================================================
   SERVICES
   ================================================================ */

/* services.items[] → content.json: services.items */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(193, 127, 58, 0.08);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.service-card__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.service-card__desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.service-card__bullets {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.service-card__bullets li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1.1em;
  position: relative;
}
.service-card__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ================================================================
   PROCESS
   ================================================================ */
.process {
  background: var(--bg-alt);
}

/* process.steps[] → content.json: process.steps */
.process__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
  position: relative;
}

.process-step__number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.7;
}
.process-step__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.process-step__desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ================================================================
   WHY WAYFIRE
   ================================================================ */

/* why.items[] → content.json: why.items */
.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.why-item__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.why-item__body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.why-item__marker {
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 1rem;
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact {
  background: var(--bg-alt);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

/* contact.subheadline → content.json: contact.subheadline */
.contact__sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-top: 1rem;
}

.contact__email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 500;
  transition: color 0.15s;
}
.contact__email-link:hover { color: #A86D2C; }

/* contact.fields → content.json: contact.fields */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-field label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.form-field input,
.form-field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(193, 127, 58, 0.12);
}
.form-field textarea {
  resize: vertical;
  min-height: 120px;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #AFAFAB; }

/* contact.fields.submit → content.json: contact.fields.submit */
.btn-submit {
  align-self: flex-start;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.75em 1.75em;
  border-radius: var(--radius);
  border: none;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.5rem;
}
.btn-submit:hover { background: #333330; transform: translateY(-1px); }
.btn-submit:active { transform: none; }

.form-success {
  display: none;
  background: var(--accent-light);
  border: 1px solid rgba(193, 127, 58, 0.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--accent);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  padding-block: 3rem;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* footer.logo → content.json: footer.logo */
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer__links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

/* footer.links[] → content.json: footer.links */
.footer__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer__links a:hover { color: var(--text); }

/* footer.legal / footer.builtWith → content.json: footer */
.footer__legal {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.6;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  :root { --section-gap: 4.5rem; }

  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1.25rem;
    align-items: flex-start;
  }
  .nav__hamburger { display: flex; }
  .nav { position: sticky; }

  .hero { padding-top: 3.5rem; padding-bottom: 4rem; }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__legal { text-align: left; }
}

@media (max-width: 480px) {
  .process__steps { gap: 2.5rem; }
  .services__grid { grid-template-columns: 1fr; }
  .problem__grid { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
}
