/* hifi.css — refined production styles, overrides wireframe.css aesthetic
   - kills the baseline grid / dashed borders / sketchy bits
   - adds real button hover states, real placeholder treatment
   - hi-fi defaults to: paper bg, instrument serif display, general sans body */

@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap");
@import url("assets/tokens.css");

/* ---------- container reset (kill wireframe grid) ---------- */
.hifi {
  width: 100%;
  background: var(--stone-100);
  color: var(--stone-900);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  position: relative;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}
/* When the hi-fi is rendered inside a fixed-size design-canvas artboard,
   clip to the artboard. On the live site (.site host), let it grow. */
.dc-artboard .hifi { height: 100%; overflow: hidden; }
.site .hifi { min-height: 100vh; }
.hifi::before { content: none !important; }   /* no baseline grid */
.hifi * { box-sizing: border-box; }

/* ---------- nav ---------- */
.hifi-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 56px;
  background: rgba(244, 242, 238, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.hifi-nav[data-scheme="dark"] {
  background: rgba(28, 26, 22, 0.86);
  color: var(--stone-100);
}
.hifi-nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: inherit;
}
.hifi-nav-logo img { width: 22px; height: 22px; }
.hifi-nav ul {
  display: flex; gap: 36px; list-style: none; margin: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hifi-nav ul li { cursor: pointer; transition: color 0.15s; opacity: 0.7; }
.hifi-nav ul li:hover { opacity: 1; color: var(--red-signal); }

/* ---------- buttons ---------- */
.hifi-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.hifi-btn-red { background: var(--red-signal); color: #fff; }
.hifi-btn-red:hover { background: var(--red-signal-hover, #a83a23); transform: translateY(-1px); }
.hifi-btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.hifi-btn-ghost:hover { background: var(--stone-900); color: var(--stone-100); border-color: var(--stone-900); }
.hifi-btn[data-scheme="dark"].hifi-btn-ghost:hover { background: var(--stone-100); color: var(--stone-900); border-color: var(--stone-100); }
.hifi-btn .arr { transition: transform 0.2s; }
.hifi-btn:hover .arr { transform: translateX(3px); }

/* ---------- image placeholders (clean, not sketchy X-cross) ---------- */
.hifi-ph {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--stone-200);
  color: var(--stone-500);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  overflow: hidden;
}
.hifi-ph::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(39,34,21,0.02) 12px 13px);
  pointer-events: none;
}
.hifi-ph[data-tone="dark"] {
  background: var(--stone-800, #2a2620); color: var(--stone-500);
}
.hifi-ph[data-tone="dark"]::before {
  background-image:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,0.025) 12px 13px);
}

/* ---------- type scale ---------- */
.hifi h1, .hifi h2, .hifi h3, .hifi h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.hifi .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--stone-600);
}
.hifi .eyebrow::before {
  content: ""; display: block; width: 24px; height: 1px; background: currentColor;
}
.hifi p { text-wrap: pretty; }

/* ---------- letter form inputs ---------- */
.hifi-letter-input {
  display: inline-block;
  padding: 0 6px 4px;
  margin: 0 4px;
  border: none;
  border-bottom: 1.5px solid var(--stone-400);
  background: transparent;
  font-family: var(--font-display);
  font-style: italic;
  font-size: inherit;
  line-height: inherit;
  color: var(--stone-900);
  outline: none;
  vertical-align: baseline;
  transition: border-color 0.15s;
}
.hifi-letter-input:focus { border-bottom-color: var(--red-signal); }

/* ---------- FAQ accordion ---------- */
.hifi-faq-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid var(--stone-300);
  cursor: pointer;
  transition: padding 0.2s;
}
.hifi-faq-row:hover { color: var(--red-signal); }
.hifi-faq-q {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 400;
  letter-spacing: -0.01em;
}
.hifi-faq-plus {
  font-family: var(--font-mono); font-size: 22px;
  color: var(--stone-500);
  transition: transform 0.2s;
}
.hifi-faq-row:hover .hifi-faq-plus { color: var(--red-signal); transform: rotate(90deg); }

/* ---------- testimonial card (postcard feel) ---------- */
.hifi-test-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 36px;
}
.hifi-test-card {
  --tilt: 0deg;
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, rgba(199, 184, 153, 0.06) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(199, 184, 153, 0.05) 0, transparent 40%),
    #fffdf7;
  border: 1px solid var(--stone-300);
  padding: 44px 36px 32px;
  border-radius: 2px;
  transform: rotate(var(--tilt));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 1px 2px rgba(39,34,21,0.06),
    0 14px 28px -18px rgba(39,34,21,0.22),
    0 28px 56px -36px rgba(39,34,21,0.18);
}
.hifi-test-card::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(39,34,21,0.012) 2px 3px);
  pointer-events: none;
  border-radius: inherit;
}
.hifi-test-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 1px 2px rgba(39,34,21,0.06),
    0 24px 48px -20px rgba(39,34,21,0.28),
    0 40px 80px -40px rgba(39,34,21,0.22);
}
.hifi-test-tape {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 88px; height: 22px;
  background: linear-gradient(180deg, rgba(238,222,176,0.85), rgba(214,194,140,0.85));
  border-left: 1px dashed rgba(0,0,0,0.06);
  border-right: 1px dashed rgba(0,0,0,0.06);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  opacity: 0.75;
}

/* ---------- letter form (paper feel) ---------- */
.hifi-letter {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 47px,
      rgba(80, 60, 30, 0.04) 47px 48px
    ),
    radial-gradient(circle at 10% 20%, rgba(199,184,153,0.08) 0, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(199,184,153,0.07) 0, transparent 50%),
    #fffdf7 !important;
  border: 1px solid var(--stone-300);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 1px 3px rgba(39,34,21,0.08),
    0 28px 56px -28px rgba(39,34,21,0.25),
    0 56px 112px -56px rgba(39,34,21,0.18);
}
.hifi-letter::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent 0 2px, rgba(39,34,21,0.01) 2px 3px
  );
  pointer-events: none;
}

/* ---------- live site shell (used by 5STONES.html) ---------- */
.site {
  width: 100%;
  min-height: 100vh;
  background: var(--stone-100);
}
/* Section bands go full-bleed so backgrounds stretch edge-to-edge,
   while inner content is centered at a comfortable max width via
   fluid inline padding. The padding-inline values override the inline
   styles authored in JSX. */
.site .hifi { width: 100%; margin: 0; }
.site-bg-edges { background: var(--stone-100); }

/* Fluid inline section padding: at narrow widths use 24-56px, at wide
   widths grow to keep content within a ~1480px column. */
.site .hifi > section {
  padding-left: max(56px, calc((100% - 1480px) / 2)) !important;
  padding-right: max(56px, calc((100% - 1480px) / 2)) !important;
}
/* Nav follows the same gutter logic so the logo + cta line up with content. */
.site .hifi-nav {
  padding-left: max(24px, calc((100% - 1480px) / 2));
  padding-right: max(24px, calc((100% - 1480px) / 2));
}

/* ============================================================
   READABILITY PASS — bigger, calmer type for the audience
   (faith-led 35-60+ business owners, often on phones in bright
   light or laptops at 100% zoom). Inline pixel sizes get
   overridden here so reads breathe on every viewport.
   ============================================================ */

/* Display headings — clamp grows up to ~ultra-wide */
.site .hifi h1 { font-size: clamp(56px, 9.2vw, 176px) !important; line-height: 0.95 !important; letter-spacing: -0.025em !important; }
.site .hifi h2 { font-size: clamp(44px, 7vw, 128px) !important; line-height: 1.0 !important; letter-spacing: -0.02em !important; }
.site .hifi section h3 { font-size: clamp(30px, 3.6vw, 64px) !important; line-height: 1.05 !important; }

/* Body copy — scales with viewport so a 27" monitor doesn't read like a phone */
.site .hifi { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.65; }
.site .hifi p { font-size: clamp(20px, 1.7vw, 30px) !important; line-height: 1.6 !important; }

/* Hero lede — the opening paragraph should feel like a lede, not body */
.site .hifi > section:first-of-type p { font-size: clamp(24px, 2.4vw, 42px) !important; line-height: 1.45 !important; max-width: 36ch !important; }

/* Eyebrows + mono metadata — scale fluidly so labels stay legible on big screens */
.site .hifi .eyebrow { font-size: clamp(14px, 1.1vw, 20px) !important; letter-spacing: 0.12em !important; }
.site .hifi span[style*="font-family: var(--font-mono)"],
.site .hifi div[style*="font-family: var(--font-mono)"] {
  font-size: clamp(13px, 1vw, 18px) !important; letter-spacing: 0.12em !important;
}

/* FAQ */
.site .hifi .hifi-faq-q { font-size: clamp(26px, 2.8vw, 48px) !important; line-height: 1.2 !important; }
.site .hifi .hifi-faq-plus { font-size: clamp(28px, 2.2vw, 40px) !important; }

/* Testimonial cards */
.site .hifi-test-card > div:first-of-type + div,
.site .hifi-test-card > div[style*="Caveat"] {
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-size: clamp(30px, 3vw, 52px) !important;
  line-height: 1.1 !important;
  color: var(--stone-900) !important;
  margin-bottom: 28px !important;
}
.site .hifi-test-card p { font-size: clamp(19px, 1.5vw, 26px) !important; line-height: 1.6 !important; color: var(--stone-700) !important; }

/* Process band paragraph */
.site .hifi section[style*="stone-900"] p { font-size: clamp(20px, 1.8vw, 32px) !important; line-height: 1.6 !important; }

/* Contact section subhead ("Tell us about what you're building…") —
   should also feel like a lede, not body. */
.site .hifi section[style*="text-align: center"] > p { font-size: clamp(22px, 2.2vw, 36px) !important; line-height: 1.5 !important; max-width: 40ch !important; }

/* ============================================================
   LETTER / CONTACT FORM — bigger, wider, more presence
   ============================================================ */
.site .hifi-letter {
  max-width: 1280px !important;
  width: 100% !important;
  padding: clamp(48px, 5.5vw, 120px) clamp(32px, 5.5vw, 120px) !important;
}
.site .hifi-letter > div[style*="font-size: 28px"] {
  font-size: clamp(28px, 3.2vw, 60px) !important;
  line-height: 1.45 !important;
}
/* To / From eyebrow row — give right column room for the postmark */
.site .hifi-letter > div[style*="margin-bottom: 48px"] {
  font-size: clamp(14px, 1.1vw, 20px) !important;
  letter-spacing: 0.12em !important;
  padding-right: 160px;
}
/* Footer row (reply note) */
.site .hifi-letter > div[style*="margin-top: 56px"] > div[style*="text-align: right"] {
  font-size: clamp(14px, 1.1vw, 20px) !important;
  letter-spacing: 0.12em !important;
  line-height: 1.7 !important;
}
/* Postmark stamp — scale with viewport so it sits proportionally */
.site .hifi-letter > div[style*="rotate(4deg)"] {
  width: clamp(96px, 7vw, 132px) !important;
  height: clamp(116px, 8vw, 160px) !important;
  font-size: clamp(10px, 0.75vw, 14px) !important;
  letter-spacing: 0.12em !important;
  top: clamp(28px, 2.4vw, 44px) !important;
  right: clamp(28px, 2.4vw, 44px) !important;
}
.site .hifi-letter > div[style*="rotate(4deg)"] > div:first-child {
  font-size: clamp(32px, 2.6vw, 48px) !important;
}
/* Letter inputs — inherit the bigger letter font, looser tap area */
.site .hifi-letter-input {
  padding: 2px 8px 6px !important;
  margin: 0 4px;
}
.site .hifi-letter-input::placeholder { opacity: 0.55; }

/* Nav: bigger logo + menu links — both scale with viewport */
.site .hifi-nav { padding-top: clamp(22px, 2vw, 40px); padding-bottom: clamp(22px, 2vw, 40px); }
.site .hifi-nav-logo { font-size: clamp(15px, 1.2vw, 22px) !important; gap: clamp(10px, 0.8vw, 16px) !important; }
.site .hifi-nav-logo svg { width: clamp(28px, 2.2vw, 42px) !important; height: clamp(28px, 2.2vw, 42px) !important; }
.site .hifi-nav ul { font-size: clamp(13px, 1.05vw, 19px) !important; gap: clamp(28px, 3.2vw, 60px) !important; }

/* Buttons — bigger so the red CTA reads with confidence, not cramped */
.site .hifi-btn {
  font-size: clamp(13px, 1.05vw, 19px) !important;
  padding: clamp(18px, 1.6vw, 28px) clamp(28px, 2.6vw, 48px) !important;
  gap: clamp(10px, 0.8vw, 16px) !important;
}

/* Footer — mono labels and lists also scale up on wide monitors */
.site .hifi footer { font-size: clamp(13px, 1vw, 18px) !important; }
.site .hifi footer ul { line-height: 2.1 !important; }
.site .hifi footer div[style*="font-size: 32px"] { font-size: clamp(28px, 2.6vw, 48px) !important; }
.site .hifi footer div[style*="font-size: 11px"] { font-size: clamp(12px, 0.9vw, 16px) !important; }

/* ---------- responsive: scale display type fluidly across viewports ---------- */
/* Tablet — collapse 3-col testimonial grid only (type already clamps fluidly above). */
@media (max-width: 1100px) {
  .hifi-test-grid { grid-template-columns: 1fr 1fr !important; }
  .hifi-test-card:nth-child(3) { grid-column: span 2; max-width: 60%; margin: 0 auto; }
}
/* Phone: stack everything, drop nav menu, kill artificial tilts, tighten padding. */
@media (max-width: 720px) {
  .site .hifi > section,
  .site .hifi-nav { padding-left: 22px !important; padding-right: 22px !important; }
  .hifi > section { padding-top: 88px !important; padding-bottom: 88px !important; }
  .hifi-nav { padding-top: 18px !important; padding-bottom: 18px !important; }
  .hifi-nav ul { display: none; }
  .hifi [style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 28px !important; }
  .hifi [style*="position: absolute"][style*="right:"] { position: static !important; width: auto !important; text-align: left !important; margin-top: 32px; }
  .hifi-test-grid { grid-template-columns: 1fr !important; gap: 36px !important; }
  .hifi-test-card { --tilt: 0deg !important; margin: 0; padding: 36px 28px 28px !important; }
  .hifi-test-card:nth-child(2),
  .hifi-test-card:nth-child(3) { margin: 0; max-width: none; grid-column: auto; }

  /* Letter form on phone — stack inputs to full width, kill the postmark
     (overlaps content), tighten the footer row. */
  .site .hifi-letter { padding: 40px 22px 32px !important; max-width: 100% !important; }
  .site .hifi-letter > div[style*="font-size: 28px"] {
    font-size: 22px !important; line-height: 1.5 !important;
  }
  .site .hifi-letter-input {
    display: block !important;
    width: 100% !important;
    margin: 6px 0 14px !important;
    box-sizing: border-box;
    padding: 6px 10px 8px !important;
  }
  .site .hifi-letter > div[style*="rotate(4deg)"] { display: none !important; }
  .site .hifi-letter > div[style*="margin-top: 56px"] {
    flex-direction: column !important; align-items: flex-start !important;
    gap: 20px !important;
  }
  .site .hifi-letter > div[style*="margin-top: 56px"] > div[style*="text-align: right"] {
    text-align: left !important;
  }

  /* Hero: tighten section, ensure CTA row wraps */
  .hifi > section:first-of-type div[style*="display: flex"][style*="gap: 16px"] {
    flex-wrap: wrap !important; gap: 12px !important;
  }
  .hifi-btn { padding: 16px 22px !important; font-size: 12px !important; }

  /* Process band: kill the 140px first column entirely on phone, FiveStones
     row sits inline above the heading. */
  .hifi > section[style*="stone-900"] [style*="grid-template-columns: 140px"] {
    padding: 36px 0 !important;
  }

  /* FAQ sticky column un-sticks on phone */
  .hifi > section[style*="gray-100"] div[style*="position: sticky"] {
    position: static !important; margin-bottom: 32px;
  }

  /* Footer stack */
  footer[style*="stone-900"] > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr 1fr !important; gap: 32px !important;
  }
}

