/* ============================================================
   Rowhome AI — styles
   Palette: brick + slate on warm paper. Edit the tokens below
   to rebrand the whole site.
   ============================================================ */

:root {
  /* Brand palette */
  --ink:        #17242b;   /* deep warm slate — headings, dark sections */
  --ink-soft:   #26363f;
  --brick:      #b4472e;   /* primary accent */
  --brick-deep: #8f3623;   /* accent hover / text-safe accent */
  --paper:      #faf6ef;   /* page background */
  --paper-2:    #f2ebe0;   /* alternating section background */
  --card:       #fffdf9;   /* card surface */
  --stone:      #5d6b73;   /* secondary text */
  --line:       #e5dccd;   /* borders on light */
  --line-dark:  #33454e;   /* borders on dark */
  --cream:      #f7f1e6;   /* light text on dark */

  /* Type */
  --font-head: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --wrap: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23,36,43,.04), 0 12px 30px -12px rgba(23,36,43,.16);
  --shadow-sm: 0 1px 2px rgba(23,36,43,.06), 0 6px 16px -10px rgba(23,36,43,.14);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--brick-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
img, svg { max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.15rem, 4vw, 2rem); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--cream); padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Eyebrows & titles ---------- */
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--brick-deep);
  margin: 0 0 1rem;
}
.eyebrow-light { color: #e6a08d; }

.section-title { font-size: clamp(1.85rem, 1.3rem + 2.4vw, 2.85rem); max-width: 20ch; }
.section-lede { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem); color: var(--stone); max-width: 60ch; margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  line-height: 1; text-decoration: none; cursor: pointer;
  padding: .8rem 1.3rem; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .58rem 1rem; font-size: .9rem; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.02rem; }

.btn-primary { background: var(--brick); color: #fff; box-shadow: 0 8px 20px -10px rgba(180,71,46,.7); }
.btn-primary:hover { background: var(--brick-deep); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(23,36,43,.03); }

.btn-outline-light { background: transparent; color: var(--cream); border-color: rgba(247,241,230,.4); }
.btn-outline-light:hover { border-color: var(--cream); background: rgba(247,241,230,.08); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  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 transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; color: var(--brick); flex: none; }
.brand-name { font-family: var(--font-head); font-size: 1.28rem; font-weight: 600; letter-spacing: -.01em; }
.brand-ai { color: var(--brick); }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { color: var(--ink); font-weight: 500; font-size: .96rem; }
.site-nav a:hover { color: var(--brick-deep); text-decoration: none; }
.site-nav a.btn { color: #fff; }
.site-nav a.btn-primary:hover { color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; padding: 0; margin-right: -8px;
  background: transparent; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 24px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; margin: 0 auto; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(3rem, 7vw, 5.5rem); overflow: hidden; }
.hero-inner { position: relative; z-index: 2; max-width: 46rem; padding-bottom: clamp(6rem, 14vw, 10rem); }
.hero h1 { font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.2rem); margin: 0 0 1.25rem; }
.lede { font-size: clamp(1.12rem, 1rem + 0.6vw, 1.4rem); color: var(--stone); margin: 0 0 1.9rem; max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-note { margin-top: 1.6rem; color: var(--stone); font-size: .95rem; }

.rowhome-band {
  position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto;
  color: var(--brick);
  opacity: .32;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--paper-2); }
.section-title + .section-lede { margin-bottom: 2.5rem; }
.section > .wrap > .eyebrow { margin-bottom: .75rem; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.15rem; margin-top: 2.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.4rem; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.28rem; margin: .2rem 0 .55rem; }
.card p { color: var(--stone); margin: 0; font-size: .98rem; }
.card-tag {
  display: inline-block; font-family: var(--font-body); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--brick-deep);
  background: rgba(180,71,46,.09); padding: .3rem .55rem; border-radius: 6px; margin-bottom: .9rem;
}

.pillar { padding: .5rem .25rem; }
.pillar-num { font-family: var(--font-head); font-size: 1rem; font-weight: 600; color: var(--brick); letter-spacing: .05em; margin-bottom: .8rem; }
.pillar h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.pillar p { color: var(--stone); margin: 0; }

.niche { padding-top: 1.4rem; border-top: 2px solid var(--brick); }
.niche h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.niche p { color: var(--stone); font-size: .95rem; margin: 0; }

/* ---------- Before / After ---------- */
.beforeafter {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.25rem;
  margin-top: 3rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm);
}
.ba-col { }
.ba-label { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .6rem; }
.ba-before .ba-label { color: var(--stone); }
.ba-after .ba-label { color: var(--brick-deep); }
.ba-col p { margin: 0; color: var(--ink); }
.ba-before p { color: var(--stone); }
.ba-arrow { font-size: 1.6rem; color: var(--brick); font-weight: 700; }

/* ---------- Feature (flagship) ---------- */
.feature {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center;
}
.feature-body .section-title { max-width: 16ch; margin-bottom: 1rem; }
.feature-body > p { color: var(--stone); font-size: 1.08rem; }
.checks { margin: 1.4rem 0 1.8rem; display: grid; gap: .7rem; }
.checks li { position: relative; padding-left: 1.9rem; color: var(--ink); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .15rem; width: 1.25rem; height: 1.25rem;
  border-radius: 50%; background: var(--brick);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9.55 17.6 4.4 12.45l1.4-1.4 3.75 3.75 8.25-8.25 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9.55 17.6 4.4 12.45l1.4-1.4 3.75 3.75 8.25-8.25 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.feature-aside {
  background: var(--ink); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.thread { display: grid; gap: .7rem; }
.bubble { font-size: .92rem; line-height: 1.45; padding: .75rem .9rem; border-radius: 14px; max-width: 88%; position: relative; }
.bubble-meta { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; opacity: .65; margin-bottom: .3rem; }
.bubble-in { background: #2c3d46; color: var(--cream); justify-self: start; border-bottom-left-radius: 4px; }
.bubble-out { background: var(--brick); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.bubble-out .bubble-meta { opacity: .8; }
.bubble-reply { background: #35843f; color: #fff; }

/* ---------- Offer (dark) ---------- */
.section-dark { background: var(--ink); color: var(--cream); }
.section-dark .section-title { color: #fff; }
.section-dark .section-lede { color: #c9d3d8; }
.offer-inner { max-width: 46rem; }
.offer-inner .hero-actions { margin-top: 2rem; }

/* ---------- Approach ---------- */
.approach-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.approach-body p { color: var(--stone); font-size: 1.08rem; }
.approach-body p:first-child { color: var(--ink); }
.approach-sign { font-family: var(--font-head); font-style: italic; color: var(--ink) !important; font-size: 1.1rem; margin-top: .5rem; }

/* ---------- Final CTA ---------- */
.cta-band { text-align: center; background: var(--paper-2); }
.cta-inner { max-width: 40rem; margin: 0 auto; }
.cta-band h2 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.6rem); margin-bottom: .6rem; }
.cta-band p { color: var(--stone); font-size: 1.15rem; margin-bottom: 1.8rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); padding: 2.5rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .55rem; }
.footer-brand .brand-mark { color: var(--brick); width: 24px; height: 24px; }
.footer-brand .brand-name { color: #fff; font-family: var(--font-head); font-size: 1.15rem; }
.footer-brand .brand-ai { color: #e6a08d; }
.footer-meta { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; color: #aeb9bf; font-size: .92rem; }
.footer-meta a { color: var(--cream); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature-aside { order: -1; }
  .approach-grid { grid-template-columns: 1fr; }
  .beforeafter { grid-template-columns: 1fr; text-align: left; }
  .ba-arrow { transform: rotate(90deg); justify-self: start; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .35rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .75rem clamp(1.15rem, 4vw, 2rem) 1.25rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav a { padding: .6rem .2rem; font-size: 1.05rem; }
  .site-nav a.btn { margin-top: .4rem; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Anchor offset for sticky header */
:target { scroll-margin-top: 84px; }
[id] { scroll-margin-top: 84px; }
