/* Portland H2O — main.css
   Tokens compiled from design/DESIGN.md. Edit tokens there, mirror here. */

:root {
  --primary: #0E6BA8;
  --primary-deep: #063D6B;
  --primary-soft: #D6ECF8;
  --accent: #3A8C4F;
  --accent-soft: #DBEEDF;
  --surface: #FBFCFD;
  --surface-card: #FFFFFF;
  --surface-warm: #FFF8EE;
  --ink: #0F1B2D;
  --ink-soft: #46566B;
  --ink-faint: #8896A8;
  --border: #E3E9F0;
  --border-strong: #C9D4E1;
  --warning: #B57E1D;
  --danger: #9B2C2C;

  --family-display: 'Source Serif 4', Georgia, serif;
  --family-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(15,27,45,0.04), 0 4px 12px rgba(15,27,45,0.05);
  --shadow-hover: 0 2px 4px rgba(15,27,45,0.05), 0 12px 28px rgba(15,27,45,0.08);
  --shadow-focus: 0 0 0 3px rgba(14,107,168,0.30);

  --max-width: 1120px;
  --reading-width: 680px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(48px, 8vw, 96px);

  --duration-fast: 120ms;
  --duration-base: 220ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--family-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--duration-fast) var(--ease); }
a:hover { color: var(--primary-deep); }
a:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }

h1, h2, h3 { font-family: var(--family-display); font-weight: 600; color: var(--ink); margin: 0 0 0.5em; }
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.lede { font-size: 19px; color: var(--ink-soft); max-width: var(--reading-width); }

/* Layout */
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: var(--section-y) 0; }
.band--warm { background: var(--surface-warm); }
.band--soft { background: var(--primary-soft); }
.reading { max-width: var(--reading-width); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 253, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand-mark {
  font-family: var(--family-display); font-weight: 600; font-size: 21px;
  color: var(--ink); letter-spacing: -0.01em;
}
.brand-mark span { color: var(--primary); }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav { display: none; }
  .nav.is-open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface-card); border-bottom: 1px solid var(--border); padding: 16px var(--gutter); gap: 16px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    background: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1;
  padding: 14px 24px; border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; transition: background var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease), transform var(--duration-fast) var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-deep); color: #fff; }
.btn--secondary { background: var(--surface-card); color: var(--ink); border-color: var(--border-strong); }
.btn--secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn--lg { padding: 16px 28px; font-size: 17px; }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Hero */
.hero { padding: var(--section-y) 0 calc(var(--section-y) * 0.6); }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1.2fr 1fr; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 16px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-art {
  aspect-ratio: 4 / 5; background: var(--primary-soft); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(140deg, #D6ECF8 0%, #DBEEDF 100%);
  position: relative; overflow: hidden;
}
.hero-art .placeholder {
  font-family: var(--family-display); font-size: 18px; color: var(--primary-deep);
  text-align: center; padding: 24px;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

/* Eyebrow */
.eyebrow {
  display: inline-block; font-family: var(--family-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary);
  background: var(--primary-soft); padding: 6px 12px; border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

/* Cards */
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.card h3 { margin-top: 12px; }
.card .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-pill);
  background: var(--primary); color: #fff; font-weight: 600; font-size: 15px;
  font-family: var(--family-body);
}
.card.is-featured { border: 2px solid var(--accent); position: relative; }
.card.is-featured::before {
  content: "Most popular"; position: absolute; top: -12px; left: 24px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-family: var(--family-body); letter-spacing: 0.04em;
}

/* Pricing list */
.price-row { display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
.price-row:last-child { border-bottom: 0; }
.price-row .label { color: var(--ink); }
.price-row .price { font-family: var(--family-display); font-weight: 600; color: var(--primary-deep); }

/* Feature row (alternating image/text) */
.feature-row { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: center; margin-bottom: 64px; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; } }
.feature-row:nth-child(even) > :first-child { order: 2; }
@media (max-width: 860px) { .feature-row:nth-child(even) > :first-child { order: 0; } }
.feature-art {
  aspect-ratio: 4 / 3; background: var(--primary-soft); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; color: var(--primary-deep);
  font-family: var(--family-display); padding: 24px; text-align: center;
}

/* FAQ */
.faq-list { max-width: var(--reading-width); }
.faq-item {
  border-bottom: 1px solid var(--border); padding: 20px 0;
}
.faq-item summary {
  cursor: pointer; font-family: var(--family-display); font-weight: 600; font-size: 18px; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; color: var(--ink-faint); font-weight: 400;
  transition: transform var(--duration-base) var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 12px; color: var(--ink-soft); }

/* Forms (contact) */
.form { max-width: 520px; background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-card); }
.form label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin: 16px 0 6px; }
.form label:first-child { margin-top: 0; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); font-size: 16px; font-family: inherit; color: var(--ink);
  background: var(--surface-card);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.form textarea { min-height: 120px; resize: vertical; }
.form .btn { margin-top: 20px; width: 100%; }

/* Footer */
.site-footer {
  background: #0B1828; color: #C5CFDC; padding: 56px 0 32px; margin-top: 96px;
}
.site-footer a { color: #C5CFDC; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--family-display); font-size: 16px; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid #1F3550;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: #8896A8;
}
.powered { font-size: 13px; }
.powered a { font-weight: 500; }

/* Phase 2 reveal hook */
[data-phase="2"] { display: none; }
.phase-2-on [data-phase="2"] { display: block; }

/* Tiny utility */
.muted { color: var(--ink-faint); font-size: 14px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 32px; }
.flow > * + * { margin-top: 24px; }
