:root {
  --paper: #faf9f7;
  --cream: #f3f1ec;
  --ink: #14120f;
  --ink-soft: #3d3a36;
  --muted: #6b6560;
  --line: rgba(20, 18, 15, 0.12);
  --terracotta: #c45c3e;
  --terracotta-dark: #a34a30;
  --terracotta-soft: rgba(196, 92, 62, 0.12);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px rgba(20, 18, 15, 0.08);
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-serif: "Fraunces", ui-serif, Georgia, serif;
  --font-script: "Great Vibes", cursive;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  background: var(--terracotta);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 22px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 4px;
}

.nav-link:hover {
  color: var(--terracotta);
}

/* —— Hero (two-column with chat) —— */
.hero-fullbleed {
  position: relative;
  min-height: min(92vh, 960px);
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--cream);
}

.hero-backdrop img,
.hero-backdrop video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(250, 249, 247, 0.96) 0%,
    rgba(250, 249, 247, 0.78) 35%,
    rgba(20, 18, 15, 0.38) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.hero-inner:has(.hero-estimate:not([hidden])) {
  grid-template-columns: 1fr 1fr;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--terracotta);
  margin: 0 0 14px;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.15;
}

.hero-script {
  font-family: var(--font-script);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  color: #9a6b2d;
  margin: 10px 0 0;
  line-height: 1.2;
}

.hero-lede {
  margin: 18px 0 0;
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-aside {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 420px;
}

.hero-aside-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.hero-aside-body {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
}

/* —— Hero estimate panel (right column) —— */
.hero-estimate {
  justify-self: end;
  width: 100%;
  max-width: 420px;
}

.hero-estimate[hidden] { display: none !important; }

/* Dotted divider band */
.grill-band {
  height: 44px;
  background-color: #fff;
  background-image: radial-gradient(circle at center, var(--ink) 1.4px, transparent 1.5px);
  background-size: 14px 14px;
  background-position: 3px 4px;
  border-block: 1px solid var(--line);
}

.grill-band--subtle {
  height: 28px;
  opacity: 0.55;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 10px 24px rgba(196, 92, 62, 0.35);
}

.btn-primary:hover {
  background: var(--terracotta-dark);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  backdrop-filter: blur(4px);
}

.hero-fullbleed .btn-outline {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
}

.btn-compact {
  padding: 9px 18px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* —— Sections —— */
.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-white {
  background: #fff;
}

.section-cream {
  background: var(--cream);
}

.section-head {
  margin-bottom: 28px;
  max-width: 720px;
}

.section-head--wide {
  max-width: 820px;
}

.section-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 24px 22px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(20, 18, 15, 0.04);
}

.section-white .card {
  background: var(--paper);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

/* Video grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.video-tile {
  grid-column: span 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(20, 18, 15, 0.12);
}

.video-tile--wide {
  grid-column: span 6;
}

.video-tile__media {
  aspect-ratio: 16 / 10;
  background: #0f0f0f;
}

.video-tile__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-tile__cap {
  padding: 14px 16px 16px;
  border-top: 1px dashed var(--line);
}

.video-tile__cap strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.video-tile__cap p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Story */
.story-card {
  max-width: none;
  padding: 48px 0;
}

.story-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.story-card p {
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.85;
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  max-width: 52em;
}

/* Contact */
.section-contact {
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 36px 40px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.contact-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  min-width: 220px;
}

.contact-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-wrap {
  padding: 22px 0;
}

.footer-wrap p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.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;
}

/* —— Intake chat (in hero) —— */
.intake-chat {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 48px rgba(20, 18, 15, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.intake-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px 8px;
  max-height: min(46vh, 420px);
  overflow-y: auto;
}

.intake-msg {
  max-width: 90%;
  padding: 9px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.45;
  animation: msgIn 0.18s ease-out;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.intake-msg--agent {
  align-self: flex-start;
  background: #f0efed;
  color: var(--ink);
  border-bottom-left-radius: 6px;
}

.intake-msg--user {
  align-self: flex-end;
  background: var(--terracotta);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.intake-msg p { margin: 0; }
.intake-msg p + p { margin-top: 6px; }
.intake-msg strong { font-weight: 600; }
.intake-msg--agent strong { color: var(--ink); }
.intake-msg--user strong { color: #fff; }

.intake-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 18px 6px;
}

.intake-chip {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s ease;
}

.intake-chip:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  background: var(--terracotta-soft);
}

.intake-form {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--line);
  padding: 0;
}

.intake-input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 14px 16px;
  font: inherit;
  font-size: 0.9rem;
  background: transparent;
  outline: none;
}

.intake-send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--terracotta);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.12s;
}

.intake-send:hover { color: var(--terracotta-dark); }

.intake-restart {
  display: block;
  margin: 10px auto 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 999px;
  transition: color 0.12s;
}

.intake-restart:hover { color: #fff; }
.intake-restart[hidden] { display: none; }

.intake-footnote {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  text-align: center;
}

.intake-result-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 6px;
}

.intake-result-total {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}

.intake-result-range {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 2px 0 0;
}

.intake-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.intake-result-row:last-child { border-bottom: none; }

.intake-result-label { color: var(--ink-soft); }
.intake-result-value { font-weight: 600; color: var(--ink); }

/* —— Responsive —— */
@media (max-width: 960px) {
  .hero-fullbleed {
    min-height: unset;
    padding: 100px 0 48px;
    align-items: flex-start;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-estimate {
    max-width: 100%;
    justify-self: stretch;
  }

  .hero-scrim {
    background: linear-gradient(
      180deg,
      rgba(250, 249, 247, 0.96) 0%,
      rgba(250, 249, 247, 0.85) 50%,
      rgba(20, 18, 15, 0.3) 100%
    );
  }

  .intake-messages {
    max-height: min(50vh, 380px);
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .videos-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .video-tile,
  .video-tile--wide {
    grid-column: span 6;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .nav-links .nav-link {
    display: none;
  }

  .nav-links .btn-compact {
    display: inline-flex;
  }

  .intake-restart { color: var(--muted); }
  .intake-restart:hover { color: var(--ink); }
  .intake-footnote { color: var(--muted); }
}

@media (max-width: 520px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }

  .video-tile,
  .video-tile--wide {
    grid-column: span 1;
  }
}
