/* Seaside Operations: one-page site styles
   Direction: "coastal editorial", elevated. Warm sand paper, Atlantic navy,
   sea glass, a soft serif for headlines, arch/wave geometry from the mark.
   Luxury rules: big type, generous space, almost no lines, one shadow, slow
   physical motion. GSAP (loaded from a CDN) owns motion when present;
   CSS keyframes and IntersectionObserver are the fallback.
   Layers: tokens → reset → base → header → sections → motion → responsive */

/* ---------- Tokens ---------- */

:root {
  /* Brand */
  --navy: #123B63;
  --navy-deep: #0E2A44;
  --navy-deeper: #0A2137;
  --glass: #85B7AD;        /* decoration + text on navy only */
  --glass-mid: #6FA79D;
  --glass-deep: #2F6B62;   /* the only sea glass that may be text on sand (5.4:1) */
  --glass-tint: #E4EEEA;   /* sea-glass surface for light bands */

  /* Surfaces */
  --sand: #F6F0E5;         /* Warm Sand: page ground */
  --cream: #FBF7F0;        /* raised cards */
  --cream-deep: #F0E8DA;   /* pressed / alternate band */

  /* Ink on light surfaces */
  --ink: #14202C;
  --ink-2: #4A5865;
  --ink-3: #5A6874;

  /* Ink on navy surfaces */
  --sand-ink: #F6F0E5;
  --sand-ink-2: rgb(246 240 229 / 0.74);
  --sand-ink-3: rgb(246 240 229 / 0.52);

  /* Lines */
  --line: #E6DCCB;
  --line-strong: #D6C9B3;
  --line-dark: rgb(246 240 229 / 0.14);

  /* The one shadow on the page */
  --shadow-lift: 0 30px 60px -36px rgb(18 59 99 / 0.32);

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 7rem;

  --radius-sm: 0;
  --radius: 0;
  --radius-lg: 0;
  --pill: 999px;
  --nav-h: 76px;
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.32, 0.72, 0.35, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */

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

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: calc(var(--nav-h) + 24px);
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--sand);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Base typography ---------- */

h1,
h2,
h3 {
  color: var(--ink);
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-variation-settings: "SOFT" 40, "opsz" 144;
}

h1 {
  font-size: clamp(3.4rem, 7.5vw, 6.4rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}

h1 .line {
  display: block;
}

h2 {
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.026em;
  max-width: 18ch;
}

h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.014em;
}

em.accent {
  font-style: italic;
  font-weight: 400;
  color: var(--glass-deep);
}

.on-navy em.accent {
  color: var(--glass);
}

.lead {
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--glass-deep);
  margin-bottom: 1.25rem;
}

/* A short wave, drawn, not a dot and not an emoji. */
.eyebrow::before {
  content: "";
  flex: none;
  width: 22px;
  height: 8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 8'><path d='M1 5.5c2.5 0 2.5-3 5-3s2.5 3 5 3 2.5-3 5-3 2.5 3 5 3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 8'><path d='M1 5.5c2.5 0 2.5-3 5-3s2.5 3 5 3 2.5-3 5-3 2.5 3 5 3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>") center / contain no-repeat;
}

.on-navy .eyebrow {
  color: var(--glass);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--sand-ink);
  border-radius: var(--pill);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* ---------- Header ---------- */

/* Fixed so it can sit transparently over the dark hero, then turn into a
   sand glass bar once the hero has scrolled past. JS toggles the states;
   without JS it simply stays at the top of the page. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgb(246 240 229 / 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transform: translateY(0);
  will-change: transform;
  transition: background-color 320ms var(--ease), border-color 320ms var(--ease),
    transform 320ms var(--ease-out), backdrop-filter 320ms var(--ease);
}

html:not(.js) .site-header {
  position: absolute;
}

.site-header.is-scrolled:not(.is-over-dark) {
  border-bottom-color: var(--line);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header.is-over-dark:not(.is-open) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header.is-open {
  background: var(--sand);
  border-bottom-color: var(--line);
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* Brand lockup: raster mark, live wordmark. Two marks, one per ground. */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: var(--radius-sm);
}

.brand-mark {
  width: auto;
  height: 38px;
}

.brand-mark-light {
  display: none;
}

.site-header.is-over-dark:not(.is-open) .brand-mark-dark {
  display: none;
}

.site-header.is-over-dark:not(.is-open) .brand-mark-light {
  display: block;
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-transform: uppercase;
}

.wordmark-1 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--navy);
  transition: color 320ms var(--ease);
}

/* Tracked out so the second line optically matches the width of the first. */
.wordmark-2 {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.27em;
  color: var(--glass-deep);
  transition: color 320ms var(--ease);
}

.site-header.is-over-dark:not(.is-open) .wordmark-1 {
  color: var(--sand-ink);
}

.site-header.is-over-dark:not(.is-open) .wordmark-2 {
  color: var(--glass);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  margin: 0;
}

.nav-links a {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--pill);
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--navy);
  background: var(--cream-deep);
}

.site-header.is-over-dark:not(.is-open) .nav-links a {
  color: var(--sand-ink-2);
}

.site-header.is-over-dark:not(.is-open) .nav-links a:hover,
.site-header.is-over-dark:not(.is-open) .nav-links a:focus-visible {
  color: var(--sand-ink);
  background: rgb(246 240 229 / 0.1);
}

/* Mobile disclosure */

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border-radius: var(--pill);
  cursor: pointer;
}

.nav-toggle-bars {
  display: grid;
  gap: 5px;
  width: 20px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 260ms var(--ease-out), background-color 320ms var(--ease);
}

.site-header.is-over-dark:not(.is-open) .nav-toggle-bars span {
  background: var(--sand-ink);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav {
  border-top: 1px solid var(--line);
  padding: 0.5rem var(--gutter) 1.25rem;
  background: var(--sand);
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.mobile-nav li:last-child a {
  border-bottom: 0;
}

.mobile-nav-cta {
  width: 100%;
  margin-top: 0.85rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transform: scale(1);
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out),
    color 300ms var(--ease-out), transform 300ms var(--ease-out);
}

.btn:hover,
.btn:focus-visible {
  transform: scale(1.02);
}

.btn:active {
  transform: scale(0.98);
  transition-duration: 120ms;
}

.btn-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--sand-ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}

/* Sand on navy: 12.9:1 for the label. */
.btn-sand {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--navy-deep);
}

.btn-sand:hover,
.btn-sand:focus-visible {
  background: #fff;
  border-color: #fff;
}

.site-header.is-over-dark:not(.is-open) .btn-primary {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--navy-deep);
}

/* Sea glass on navy: 5.1:1 for the navy label. */
.btn-glass {
  background: var(--glass);
  border-color: var(--glass);
  color: var(--navy-deep);
}

.btn-glass:hover,
.btn-glass:focus-visible {
  background: var(--sand);
  border-color: var(--sand);
}

.btn-sm {
  min-height: 42px;
  padding: 0.7rem 1.2rem;
  font-size: 0.925rem;
}

/* Text link with a drawn underline and a nudging arrow. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}

.link-text {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  padding-bottom: 2px;
  transition: background-size 380ms var(--ease-out);
}

.link-arrow:hover .link-text,
.link-arrow:focus-visible .link-text {
  background-size: 100% 1.5px;
}

.link-arrow svg {
  width: 18px;
  height: 18px;
  color: var(--glass-deep);
  transition: transform 300ms var(--ease-out);
}

.link-arrow:hover svg,
.link-arrow:focus-visible svg {
  transform: translateX(4px);
}

.on-navy .link-arrow {
  color: var(--sand-ink);
}

.on-navy .link-arrow svg {
  color: var(--glass);
}

/* ---------- Hero (dark) ---------- */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--sand-ink-2);
  isolation: isolate;
  overflow: hidden;
}

/* Sea-glass light behind the arch, like late sun on water. */
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% -10%;
  z-index: -1;
  background:
    radial-gradient(720px 520px at 82% 60%, rgb(133 183 173 / 0.28), transparent 66%),
    radial-gradient(560px 400px at 0% 0%, rgb(246 240 229 / 0.06), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  color: var(--sand-ink);
}

.hero .lead {
  max-width: 34ch;
  margin-top: var(--space-5);
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  color: var(--sand-ink-2);
}

.hero-cta {
  margin-top: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* The arch: the logo's window, re-drawn at hero scale, at dusk. */
.hero-art {
  position: relative;
  width: min(100%, 440px);
  margin-inline: auto;
  will-change: transform;
}

.hero-art svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ---------- Section scaffolding ---------- */

section {
  padding-block: clamp(6rem, 12vw, 10rem);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.section-head .lead {
  margin-top: var(--space-4);
  max-width: 48ch;
}

/* Two-column: heading left, body right. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.split-sticky .split-head {
  position: sticky;
  top: calc(var(--nav-h) + 2.5rem);
}

/* ---------- Approach band ---------- */

.approach {
  background: var(--glass-tint);
}

.approach h2 {
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
}

.approach .split-body p {
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 54ch;
}

.pillars {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.pillar {
  border-top: 1.5px solid var(--glass-mid);
  padding-top: 1rem;
}

.pillar strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.pillar span {
  font-size: 0.95rem;
  color: var(--ink-2);
}

/* ---------- Services ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin: 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 3.4vw, 3rem);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

/* Big serif numeral, faded into the corner like a tide line. */
.card-num {
  position: absolute;
  top: 1rem;
  right: 1.6rem;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  color: var(--glass);
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}

.card:hover .card-num {
  opacity: 0.75;
  transform: translateY(-3px);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 1.75rem;
  border-radius: 50%;
  background: var(--glass-tint);
  color: var(--navy);
  transition: background-color 320ms var(--ease-out), color 320ms var(--ease-out);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card:hover .card-icon {
  background: var(--navy);
  color: var(--glass);
}

.card h3 {
  margin-bottom: 0.6rem;
}

/* Whole card is the link: the heading anchor stretches over the card. */
.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card h3 a:focus-visible {
  outline: none;
}

.card:focus-within {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.card-more {
  margin-top: auto;
  padding-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.card-more svg {
  width: 16px;
  height: 16px;
  color: var(--glass-deep);
  transition: transform 300ms var(--ease-out);
}

.card:hover .card-more svg {
  transform: translateX(4px);
}

.card p {
  font-size: 1.02rem;
  max-width: 44ch;
}

/* ---------- Featured audit ---------- */

.audit {
  padding-top: 0;
}

.audit-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5.5vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}

/* Deep-water glow that drifts slowly across the corner. */
.audit-panel::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(560px 360px at 90% 90%, rgb(133 183 173 / 0.3), transparent 65%),
    radial-gradient(420px 300px at 10% 10%, rgb(255 255 255 / 0.05), transparent 60%);
  animation: glow-drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes glow-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-4%, -5%);
  }
}

.audit-panel h2 {
  color: var(--sand-ink);
}

.audit-lead {
  margin-top: var(--space-4);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--sand-ink-2);
  max-width: 48ch;
}

.audit-aside {
  background: rgb(246 240 229 / 0.07);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.25rem);
}

.audit-aside-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--glass);
  margin-bottom: 1.1rem;
}

.audit-list {
  margin: 0 0 var(--space-5);
  display: grid;
  gap: 0.9rem;
  font-size: 1rem;
  color: var(--sand-ink);
}

.audit-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.audit-list svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  color: var(--glass);
}

.audit-aside .btn {
  width: 100%;
}

/* ---------- Process ---------- */

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

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  margin: 0;
}

/* One dotted track across the row, with a solid sea-glass fill that GSAP
   scrubs as the section scrolls through. Hidden on stacked layouts. */
.steps-track {
  position: absolute;
  top: 28px;
  left: 64px;
  right: 64px;
  height: 2px;
  background-image: linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 8px);
  background-size: 8px 2px;
  pointer-events: none;
}

.steps-fill {
  position: absolute;
  inset: 0;
  background: var(--glass-mid);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.step {
  position: relative;
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.4rem;
  border-radius: 50%;
  background: var(--sand);
  border: 1.5px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy);
  transition: background-color 400ms var(--ease-out), color 400ms var(--ease-out),
    border-color 400ms var(--ease-out);
}

.step.is-reached .step-number {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--sand-ink);
}

.step h3 {
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 1.02rem;
  max-width: 34ch;
}

/* ---------- Proof placeholder ---------- */

.proof-panel {
  position: relative;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5.5vw, 4rem);
}

.proof-panel .split-head {
  margin-bottom: 0;
}

.proof-panel .split-body p {
  font-size: 1.2rem;
  line-height: 1.5;
  max-width: 54ch;
}

.proof-panel .link-arrow {
  margin-top: var(--space-4);
}

/* ---------- FAQ ---------- */

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

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:first-of-type {
  border-top: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 1.5rem 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-q {
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 200ms var(--ease);
}

/* Plus that becomes a minus on open: two bars in a sea-glass circle. */
.faq-icon {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--glass-tint);
  transition: background-color 300ms var(--ease-out);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transform: translate(-50%, -50%);
  transition: transform 320ms var(--ease-out);
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open]:not(.is-closing) .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-item summary:hover .faq-icon,
.faq-item[open]:not(.is-closing) .faq-icon {
  background: var(--glass);
}

.faq-item summary:hover .faq-q,
.faq-item[open]:not(.is-closing) .faq-q {
  color: var(--navy);
}

.faq-a {
  overflow: hidden;
  padding: 0 3rem 1.6rem 0;
}

.faq-a p {
  max-width: 62ch;
  font-size: 1.05rem;
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--sand-ink-2);
  padding-top: clamp(7rem, 13vw, 11rem);
  isolation: isolate;
  overflow: hidden;
}

/* Tide line across the top edge: twice the width, drifting slowly. */
.contact-wave {
  position: absolute;
  top: -1px;
  left: 0;
  width: 200%;
  max-width: none;
  height: clamp(36px, 6vw, 72px);
  color: var(--cream);
  pointer-events: none;
  animation: tide-line 22s linear infinite;
}

@keyframes tide-line {
  to {
    transform: translateX(-50%);
  }
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(760px 460px at 50% 115%, rgb(133 183 173 / 0.3), transparent 65%);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact h2 {
  color: var(--sand-ink);
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
}

.contact .lead {
  margin-top: var(--space-4);
  color: var(--sand-ink-2);
  max-width: 40ch;
}

.contact-alt {
  margin-top: var(--space-5);
  color: var(--sand-ink-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
}

/* Form: one quiet panel on the navy ground, square like everything else. */
.contact-form {
  background: rgb(246 240 229 / 0.06);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-ink-2);
}

.field .optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--sand-ink-3);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--sand-ink);
  background: rgb(246 240 229 / 0.08);
  border: 1px solid rgb(246 240 229 / 0.26);
  border-radius: 0;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.55;
}

.field input:hover,
.field textarea:hover {
  border-color: rgb(246 240 229 / 0.45);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--glass);
  outline-offset: 2px;
  border-color: var(--glass);
  background: rgb(246 240 229 / 0.11);
}

/* Native validation state, shown only once the visitor has left the field. */
.field input:not(:placeholder-shown):not(:focus):invalid,
.field textarea:not(:placeholder-shown):not(:focus):invalid {
  border-color: #E8A79B;
}

.contact-form .btn {
  width: 100%;
  margin-top: 0.25rem;
}

.form-note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--sand-ink-3);
}

.form-note a {
  color: var(--sand-ink-2);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.form-note a:hover,
.form-note a:focus-visible {
  color: var(--sand-ink);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deeper);
  color: var(--sand-ink-3);
  padding-block: var(--space-8) var(--space-5);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-5) var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line-dark);
}

.brand-footer .wordmark-1 {
  color: var(--sand-ink);
}

.brand-footer .wordmark-2 {
  color: var(--glass);
}

.footer-tagline {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--glass);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem var(--space-3);
  margin: 0;
}

.footer-links a {
  display: inline-block;
  padding: 0.5rem 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sand-ink-2);
  text-decoration: none;
  transition: color 200ms var(--ease);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--sand-ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem var(--space-4);
  padding-top: var(--space-4);
}

.footer-legal {
  font-size: 0.82rem;
  color: var(--sand-ink-3);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.footer-legal a {
  color: var(--sand-ink-2);
  text-decoration: none;
  transition: color 200ms var(--ease);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--sand-ink);
}

/* ---------- Focus ---------- */

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

.btn:focus-visible,
.nav-links a:focus-visible,
.nav-toggle:focus-visible {
  border-radius: var(--pill);
}

.hero :focus-visible,
.site-header.is-over-dark:not(.is-open) :focus-visible,
.audit-panel :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--glass);
}

/* ---------- Motion: CSS fallback for the hero load ---------- */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-copy > * {
  animation: rise-in 800ms var(--ease-out) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 90ms;
}

.hero-copy > :nth-child(3) {
  animation-delay: 180ms;
}

.hero-copy > :nth-child(4) {
  animation-delay: 270ms;
}

.hero-art {
  animation: rise-in 1000ms var(--ease-out) 140ms both;
}

/* Tide: the two wave layers drift in opposite directions on a seamless
   240-unit period. Sun eases up into place once. */
@keyframes tide-a {
  to {
    transform: translateX(240px);
  }
}

@keyframes tide-b {
  to {
    transform: translateX(-240px);
  }
}

@keyframes sunrise {
  from {
    transform: translateY(22px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes drift {
  from {
    transform: translateX(-6px);
  }
  to {
    transform: translateX(6px);
  }
}

.wave-back {
  animation: tide-a 11s linear infinite;
}

.wave-front {
  animation: tide-b 16s linear infinite;
}

.sun {
  animation: sunrise 1400ms var(--ease-out) 350ms both;
}

.boat {
  animation: drift 6s ease-in-out infinite alternate;
}

/* When GSAP is driving, hand it the hero load and the sun. */
html.gsap .hero-copy > *,
html.gsap .hero-art,
html.gsap .sun {
  animation: none;
}

/* ---------- Motion: scroll reveals (fallback path) ---------- */

/* Hidden state exists only when JS is running (html.js set inline in <head>),
   so content is never hidden for no-JS visitors. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

/* Failsafe: if the inline script ran but main.js never booted (html.io absent),
   auto-reveal everything after 2.5s so content can't stay hidden. */
html.js:not(.io) .reveal {
  animation: rise-in 350ms var(--ease) 2.5s both;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  animation: none;
}

/* With GSAP present the section itself is visible and GSAP staggers the
   [data-reveal] children instead. */
html.gsap .reveal {
  opacity: 1;
  transform: none;
  transition: none;
  animation: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    /* .01ms (not `none`) so animation-fill-mode still lands end states. */
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  .steps-fill {
    transform: none;
  }

  .site-header.is-hidden {
    transform: none;
  }
}

/* ---------- Responsive (desktop-first) ---------- */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  }
}

@media (max-width: 900px) {
  .split,
  .audit-panel,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split-sticky .split-head {
    position: static;
  }

  .pillars {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .steps-track {
    display: none;
  }

  .step {
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: var(--space-4);
  }

  .step-number {
    margin-bottom: 0;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-art {
    width: min(100%, 340px);
    margin-inline: 0;
  }

  .primary-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .brand-mark {
    height: 32px;
  }

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

  .faq-a {
    padding-right: 1.5rem;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-h: 64px;
  }

  body {
    font-size: 1rem;
  }

  .wordmark-1 {
    font-size: 0.9rem;
  }

  .wordmark-2 {
    font-size: 0.58rem;
  }

  .hero-art {
    width: min(100%, 300px);
  }

  .hero-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-cta .link-arrow {
    justify-content: center;
  }

  .card-num {
    font-size: 4rem;
  }
}

/* ---------- Journal ---------- */

/* Light page head for inner pages: the fixed header sits over sand here,
   so the top padding clears it. */
.page-head {
  padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.page-head h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  line-height: 1.02;
  max-width: 16ch;
}

.page-head .lead {
  margin-top: var(--space-4);
  max-width: 48ch;
}

.page-head .eyebrow a {
  color: inherit;
  text-decoration: none;
}

.page-head .eyebrow a:hover,
.page-head .eyebrow a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.journal-list {
  padding-top: clamp(1rem, 2vw, 2rem);
}

.entries {
  display: grid;
  gap: var(--space-4);
  max-width: 820px;
  margin: 0;
}

.entry {
  background: var(--cream);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transform: translateY(0);
  transition: transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out);
}

.entry:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.entry-meta,
.post-meta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.entry-meta {
  margin-bottom: 0.8rem;
}

.entry h2,
.entry h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "SOFT" 40, "opsz" 144;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: none;
}

.entry h2 a,
.entry h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms var(--ease);
}

.entry h2 a:hover,
.entry h3 a:hover,
.entry h2 a:focus-visible,
.entry h3 a:focus-visible {
  color: var(--navy);
}

.entry > p {
  margin-top: 0.7rem;
  max-width: 60ch;
}

.entry .link-arrow {
  margin-top: 0.9rem;
}

/* Post */

.post-head {
  padding-bottom: 0;
}

.post-head h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  max-width: 20ch;
}

.post-meta {
  margin-top: var(--space-4);
}

.post-body {
  max-width: 68ch;
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem);
}

.prose {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2,
.prose h3 {
  color: var(--ink);
  max-width: none;
}

.prose h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  margin-top: 2em;
}

.prose h3 {
  font-size: 1.3rem;
  margin-top: 1.75em;
}

.prose a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--glass);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 200ms var(--ease);
}

.prose a:hover,
.prose a:focus-visible {
  text-decoration-color: var(--navy);
}

.prose strong {
  color: var(--ink);
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.45em;
}

.prose blockquote {
  border-left: 3px solid var(--glass);
  padding: 0.25em 0 0.25em 1.25em;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 40, "opsz" 32;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--navy);
}

.prose blockquote p + p {
  margin-top: 0.75em;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--cream-deep);
  padding: 0.1em 0.4em;
}

.prose pre {
  background: var(--navy-deep);
  color: var(--sand-ink);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.prose img {
  width: 100%;
}

.prose figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 2.5em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.6em 0.75em;
  border-bottom: 1px solid var(--line);
}

.prose th {
  color: var(--ink);
}

/* End-of-post call to action, same surface as the audit panel */

.post-cta {
  padding-top: 0;
}

.cta-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: clamp(2.5rem, 5.5vw, 4.5rem);
  overflow: hidden;
  isolation: isolate;
}

.cta-panel::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: radial-gradient(560px 360px at 90% 90%, rgb(133 183 173 / 0.3), transparent 65%);
  pointer-events: none;
}

.cta-panel h2 {
  color: var(--sand-ink);
}

.cta-panel p:not(.eyebrow) {
  margin-top: var(--space-3);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--sand-ink-2);
  max-width: 46ch;
}

.cta-panel .btn {
  justify-self: end;
}

.post-more {
  background: var(--cream);
}

.post-more .entries {
  max-width: none;
  grid-template-columns: repeat(2, 1fr);
}

.post-more .entry {
  background: var(--sand);
}

.post-more .entries-3 {
  grid-template-columns: repeat(3, 1fr);
}

.services-nav .entry-meta {
  color: var(--glass-deep);
}

@media (max-width: 1024px) {
  .post-more .entries-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cta-panel,
  .post-more .entries,
  .post-more .entries-3 {
    grid-template-columns: 1fr;
  }

  .cta-panel .btn {
    justify-self: start;
  }
}

/* ---------- Inner pages (legal, thank-you, 404) ---------- */

.page-body {
  max-width: 68ch;
  padding-block: clamp(2rem, 4vw, 3rem) clamp(5rem, 9vw, 7rem);
}

.page-updated {
  margin-top: var(--space-3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.page-actions {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  align-items: center;
}
