/* Edgewater site styles. Brand colors and Sora come from the brand page of the Fowler packet. */
:root {
  --night: #0E2433;
  --pool: #1F7A8C;
  --shallow: #D5E9EC;
  --signal: #F28C28;
  --ground: #F4F7F6;
  --ripple: #5BBCCB;       /* light teal from the reversed logo, for use on Night Water */
  --ink-soft: #4A5D69;     /* secondary text on Ground */
  --on-night-soft: #A9C3CC;
  --hairline: #C9D6D9;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--night);
  font-family: "Sora", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pool); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 62ch; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--signal); color: var(--night); padding: 8px 14px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 999px;
  font: 600 16px/1 "Sora", sans-serif; text-decoration: none; border: 2px solid transparent;
}
.btn-signal { background: var(--signal); color: var(--night); }
.btn-signal:hover { background: #ff9d3d; }
.btn-ghost-light { border-color: rgba(213,233,236,.5); color: var(--ground); }
.btn-ghost-light:hover { border-color: var(--ground); }
.btn-ghost-dark { border-color: rgba(14,36,51,.35); color: var(--night); }
.btn-ghost-dark:hover { border-color: var(--night); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Header */
.site-header { padding: 20px 0; position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 32px; width: auto; }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--night); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--pool); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--signal); }
.site-header nav .btn { padding: 10px 18px; font-size: 15px; }
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .menu-toggle {
    display: block; font: 600 15px "Sora", sans-serif; color: var(--night);
    background: none; border: 2px solid rgba(14,36,51,.35); border-radius: 999px; padding: 8px 16px; cursor: pointer;
  }
  .site-header nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ground); border-bottom: 2px solid var(--night); padding: 8px var(--gutter) 24px;
  }
  .site-header.nav-open nav { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { font-size: 18px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--hairline); color: var(--pool); font-weight: 600; }
  .site-header nav .btn { margin-top: 20px; text-align: center; padding: 14px; }
}

/* Home hero: headline above the waterline, explanation below it */
.hero-air { padding: clamp(40px, 8vw, 104px) 0 0; }
.hero h1 { font-size: clamp(40px, 7.2vw, 88px); line-height: 1.02; letter-spacing: -0.035em; max-width: 13ch; }
.hero-spacer { height: clamp(150px, 20vw, 220px); }
.waterline { position: relative; height: 0; z-index: 2; }
.waterline svg {
  position: absolute; overflow: visible; pointer-events: none;
  width: clamp(190px, 22vw, 290px); aspect-ratio: 1; transform: translateY(-50%);
  right: max(var(--gutter), calc(50% - 560px + 120px));
}
.hero-water { background: var(--night); color: var(--ground); padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); }
@media (max-width: 760px) { .hero-water { padding-top: 130px; } }
.lede { font-size: clamp(18px, 2vw, 21px); font-weight: 300; max-width: 42ch; }
.hero-water .lede, .page-water .lede { color: var(--shallow); }
.status { font-size: 14px; color: var(--on-night-soft); margin-top: 20px; }
.status strong { color: var(--signal); font-weight: 600; }

.rings-up path, .rings-down path { fill: none; stroke-width: 7; }
.rings-up path { stroke: var(--night); }
.rings-down path { stroke: var(--ripple); }
@media (prefers-reduced-motion: no-preference) {
  .drop { animation: drop .7s cubic-bezier(.55,0,.9,.4) .3s both; }
  .rings-up path, .rings-down path { animation: ring 1.1s cubic-bezier(.2,.7,.2,1) both; transform-box: fill-box; transform-origin: 50% 100%; }
  .rings-down path { transform-origin: 50% 0%; }
  .rings-up path:nth-child(1), .rings-down path:nth-child(1) { animation-delay: 1.0s; }
  .rings-up path:nth-child(2), .rings-down path:nth-child(2) { animation-delay: 1.15s; }
  .rings-up path:nth-child(3), .rings-down path:nth-child(3) { animation-delay: 1.3s; }
}
@keyframes drop { from { transform: translateY(-130px); opacity: 0; } 20% { opacity: 1; } to { transform: none; } }
@keyframes ring { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }

/* Interior page header: the same waterline, quieter. The orange dot sits on the line. */
.page-air { padding: clamp(36px, 6vw, 80px) 0 clamp(32px, 4vw, 48px); }
.page-air h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -0.03em; max-width: 18ch; }
.page-water { background: var(--night); color: var(--ground); padding: 56px 0 clamp(56px, 7vw, 80px); }
.page-water .wrap { position: relative; }
.page-water .wrap::before {
  content: ""; position: absolute; top: -66px; left: var(--gutter);
  width: 18px; height: 18px; border-radius: 50%; background: var(--signal);
}
.page-water .lede { margin: 0; max-width: 52ch; }

/* Sections */
section { padding: clamp(72px, 10vw, 120px) 0; }
.night { background: var(--night); color: var(--ground); }
.night p, .night dd { color: var(--on-night-soft); }
.tint { background: var(--shallow); }
.section-head { margin-bottom: clamp(32px, 5vw, 52px); }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; max-width: 22ch; }
.section-head p { color: var(--ink-soft); margin: 16px 0 0; }
.night .section-head p { color: var(--on-night-soft); }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.split .section-head { margin-bottom: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.prose > * { max-width: 66ch; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 56px 0 16px; line-height: 1.15; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--night); }
.more { display: inline-block; margin-top: 8px; font-weight: 600; }

/* Icons: Material Symbols, the set Stitch uses. Any element with data-icon="name" gets an icon chip. */
.ms, [data-icon]::before {
  font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none;
  white-space: nowrap; direction: ltr; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased;
}
[data-icon]::before {
  content: attr(data-icon); display: grid; place-items: center; overflow: hidden;
  width: 46px; height: 46px; border-radius: 14px; background: var(--shallow); color: var(--pool);
  margin-bottom: 18px;
}
.night [data-icon]::before { background: rgba(91,188,203,.14); color: var(--ripple); }
.tint [data-icon]::before { background: #E6F2F4; }

/* Cards */
:root {
  --card-radius: 18px;
  --card-shadow: 0 1px 2px rgba(14,36,51,.05), 0 10px 30px -12px rgba(14,36,51,.16);
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

/* Hero badge */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--shallow); color: var(--pool); font-size: 14px; font-weight: 600; margin-bottom: 22px;
}
.chip .ms { font-size: 18px; }
.page-water .chip, .night .chip { background: rgba(91,188,203,.14); color: var(--ripple); }

/* Big statement with its source */
.fact { font-size: clamp(26px, 3.6vw, 42px); line-height: 1.2; font-weight: 300; letter-spacing: -0.02em; max-width: 26ch; }
.fact strong { font-weight: 600; color: var(--pool); }
.fact-source { font-size: 14px; color: var(--ink-soft); margin-top: 18px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.facts p { margin: 0; color: var(--ink-soft); font-size: 16px; background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 26px 28px; }
.facts b { display: block; color: var(--night); font-size: 21px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

/* First three seconds timeline */
.axis { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 56px; }
.axis::before { content: ""; position: absolute; top: 20px; left: 0; right: 0; height: 2px; background: var(--pool); }
.step {
  position: relative; background: rgba(255,255,255,.04); border: 1px solid rgba(213,233,236,.12);
  border-radius: var(--card-radius); padding: 26px 26px 10px;
}
.step::before { content: ""; position: absolute; top: -42px; left: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 6px rgba(242,140,40,.18); }
.step .when { position: absolute; top: -80px; left: 24px; font-size: 14px; color: var(--ripple); font-weight: 600; }
.step h3 { font-size: 21px; margin-bottom: 10px; }
.step p { font-size: 16px; }
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.outcome { background: rgba(255,255,255,.06); border-radius: var(--card-radius); padding: 26px 28px; border: 1px solid rgba(213,233,236,.12); }
.outcome h3 { font-size: 19px; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.outcome p { font-size: 16px; margin: 0; }
.outcome.alert { border-color: rgba(242,140,40,.45); background: rgba(242,140,40,.08); }
.outcome.alert h3 { color: var(--signal); }
.outcome.quiet h3 { color: var(--ripple); }
.rule {
  margin: 20px 0 0; font-size: clamp(19px, 2.2vw, 24px); font-weight: 300; max-width: none;
  background: var(--pool); color: #fff; border-radius: var(--card-radius); padding: 26px 30px;
}
.night .rule { color: #fff; }
.rule strong { font-weight: 600; }
@media (max-width: 760px) {
  .axis { grid-template-columns: 1fr; padding: 0 0 0 30px; gap: 20px; }
  .axis::before { top: 10px; bottom: 10px; left: 6px; right: auto; width: 2px; height: auto; }
  .step::before { top: 30px; left: -30px; }
  .step .when { position: static; display: block; margin-bottom: 6px; }
  .outcomes { grid-template-columns: 1fr; }
}

/* Feature cards (formerly problem → answer rows) */
.rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.row { background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 28px; }
.row h3 { font-size: 20px; line-height: 1.3; margin-bottom: 10px; }
.row p { color: var(--ink-soft); margin: 0; }
.row p + p { margin-top: 10px; }
.row strong { color: var(--pool); font-weight: 600; }
.night .row { background: rgba(255,255,255,.05); box-shadow: none; border: 1px solid rgba(213,233,236,.12); }
.night .row p { color: var(--on-night-soft); }

/* Spec / comparison cards */
.pairs { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.pairs div { background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 28px; }
.pairs dt { font-weight: 600; font-size: 19px; margin-bottom: 8px; }
.pairs dd { margin: 0; color: var(--ink-soft); }
.night .pairs div { background: rgba(255,255,255,.05); box-shadow: none; }

/* List of small cards; data-icon puts an icon on the left, otherwise a ring bullet */
.ringlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ringlist li { background: #fff; border-radius: 14px; box-shadow: var(--card-shadow); padding: 18px 22px 18px 64px; position: relative; color: var(--ink-soft); }
.ringlist li strong { font-weight: 600; color: var(--night); }
.ringlist li:not([data-icon])::before { content: ""; position: absolute; left: 24px; top: 25px; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--pool); }
.ringlist li[data-icon]::before { position: absolute; left: 14px; top: 13px; width: 36px; height: 36px; border-radius: 10px; font-size: 20px; margin: 0; }
.night .ringlist li { background: rgba(255,255,255,.05); box-shadow: none; border: 1px solid rgba(213,233,236,.12); color: var(--on-night-soft); }
.night .ringlist li strong { color: var(--ground); }

/* Two audiences */
.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.route { background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 32px; }
.route h3 { font-size: 24px; margin-bottom: 12px; }
.route p { color: var(--ink-soft); }
.route .ringlist li { box-shadow: none; background: var(--ground); }
@media (max-width: 760px) { .routes { grid-template-columns: 1fr; } }

/* Numbered how-to steps (real sequences only) */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; position: relative; display: grid; gap: 16px; }
.steps::before { content: ""; position: absolute; left: 18px; top: 20px; bottom: 20px; width: 2px; background: var(--hairline); }
.steps li { counter-increment: s; position: relative; margin-left: 58px; background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 22px 26px; }
.steps li::before {
  content: counter(s); position: absolute; left: -58px; top: 18px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--pool); color: #fff; font-weight: 600; display: grid; place-items: center; font-size: 16px;
}
.steps h3 { font-size: 19px; margin-bottom: 4px; }
.steps p { color: var(--ink-soft); margin: 0; }
.night .steps::before { background: rgba(213,233,236,.18); }
.night .steps li { background: rgba(255,255,255,.05); box-shadow: none; border: 1px solid rgba(213,233,236,.12); }
.night .steps li::before { background: var(--ripple); color: var(--night); }
.night .steps p, .night .roadmap p { color: var(--on-night-soft); }
.night .roadmap .when { color: var(--ground); }

/* Roadmap */
.roadmap { list-style: none; padding: 0; margin: 0; position: relative; }
.roadmap::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--hairline); }
.roadmap li { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 0 0 36px 40px; position: relative; }
.roadmap li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--night); border: 2px solid var(--ripple); }
.roadmap li.now::before { background: var(--signal); border-color: var(--signal); box-shadow: 0 0 0 6px rgba(242,140,40,.2); }
.roadmap .when { font-weight: 600; }
.roadmap .now .when { color: var(--signal); }
.roadmap .now .when::after {
  content: "We're here"; display: inline-block; margin-left: 10px; font-size: 12px; color: var(--signal); font-weight: 600;
  background: rgba(242,140,40,.15); border-radius: 999px; padding: 2px 10px; vertical-align: 2px;
}
.roadmap p { margin: 0; color: var(--ink-soft); }
@media (max-width: 640px) { .roadmap li { grid-template-columns: 1fr; gap: 4px; } }

/* FAQ */
.faq-group { max-width: 76ch; }
.faq-group + .faq-group { margin-top: 56px; }
.faq-group h2 { font-size: 26px; margin-bottom: 16px; }
.faq details { background: #fff; border-radius: 14px; box-shadow: var(--card-shadow); margin-bottom: 10px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; position: relative;
  font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 26px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--pool); border-bottom: 2px solid var(--pool); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 24px 22px; color: var(--ink-soft); max-width: 70ch; }
.faq details > div p:last-child { margin: 0; }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.person { background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 30px; }
.person-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 600; font-size: 20px; color: #fff; background: var(--pool); }
.avatar.alt { background: #3E5566; }
.person h3 { font-size: 22px; }
.person .role { color: var(--pool); font-weight: 600; font-size: 15px; margin: 2px 0 0; }
.person p { color: var(--ink-soft); }
.person a { display: inline-flex; align-items: center; gap: 6px; }
.person a .ms { font-size: 18px; }
@media (max-width: 760px) { .team { grid-template-columns: 1fr; } }

/* Contact */
.contact-list { display: grid; gap: 16px; }
.contact-item { display: grid; grid-template-columns: 4fr 8fr; gap: 40px; background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 30px; scroll-margin-top: 24px; }
.contact-item[data-icon] { grid-template-columns: 46px 4fr 8fr; gap: 20px 28px; }
.contact-item[data-icon]::before { margin: 0; }
.contact-item h2 { font-size: 20px; }
.contact-item p { color: var(--ink-soft); }
@media (max-width: 760px) {
  .contact-item, .contact-item[data-icon] { grid-template-columns: 1fr; gap: 8px; }
}

/* Closing call to action */
.cta-band { background: var(--night); color: var(--ground); }
.cta-band h2 { font-size: clamp(28px, 3.6vw, 40px); max-width: 24ch; line-height: 1.15; }
.cta-band p { color: var(--on-night-soft); margin-top: 14px; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--hairline); padding: 56px 0 64px; font-size: 15px; color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h2 { font-size: 15px; color: var(--night); margin-bottom: 12px; letter-spacing: 0; }
.footer-grid a { display: block; color: var(--ink-soft); text-decoration: none; padding: 4px 0; }
.footer-grid a:hover { color: var(--pool); }
.footer-brand img { height: 28px; width: auto; margin-bottom: 12px; }
.footer-brand p { max-width: 34ch; }
.tagline { color: var(--pool); font-weight: 600; margin-bottom: 8px; }
.safety {
  display: flex; gap: 14px; align-items: flex-start; background: #FEF4EA; border: 1px solid #F7D3AE;
  border-radius: 14px; padding: 18px 22px; color: var(--night); max-width: 80ch; font-size: 14px; margin: 0;
}
.safety .ms { color: var(--signal); font-size: 22px; flex: none; }
.copyright { font-size: 14px; margin: 24px 0 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Sources */
.sources { font-size: 14px; color: var(--ink-soft); }
.sources summary { cursor: pointer; font-weight: 600; color: var(--pool); }
.sources ol { padding-left: 20px; margin: 12px 0 0; }
.sources li { margin-bottom: 6px; }

/* Plain prose sections get a card so they don't float */
.prose-card { background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: clamp(28px, 4vw, 48px); max-width: 76ch; }
.prose-card > * { max-width: none; }
.callout { border-left: 4px solid var(--pool); background: var(--ground); border-radius: 0 12px 12px 0; padding: 18px 22px; color: var(--night) !important; }

/* Four cards: one row on wide screens, two by two below that, never 3 + 1 */
.rows.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .rows.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .rows.four { grid-template-columns: 1fr; } }
