/* ==========================================================================
   Coastal Breeze 8 - design system
   Palette sampled from a Christian Fletcher Dunsborough coastal photograph.
   Zero-JS, accessible (WCAG AA), tuned for a near-perfect Lighthouse score.
   ========================================================================== */

:root {
  /* Brand palette */
  --ocean:      #0F2A43; /* primary / deep water */
  --bay:        #2C5F8A; /* buttons / links */
  --bay-dark:   #234c6f; /* button hover */
  --turquoise:  #6BAEB2; /* light accent */
  --ochre:      #B07A3C; /* signature warm accent (~10% of the page) */
  --stone:      #7A6040; /* warm secondary */
  --sand:       #E8E2D5; /* warm neutral background */
  --mist:       #F5F3EE; /* page background (used instead of pure white) */
  --charcoal:   #1E2125; /* body text */
  --white:      #ffffff;

  /* Derived */
  --ink-muted:  #4a5560;
  --line:       #dcd6c8;
  --shadow-sm:  0 1px 2px rgba(15, 42, 67, .06), 0 2px 8px rgba(15, 42, 67, .05);
  --shadow-md:  0 6px 24px rgba(15, 42, 67, .10);

  /* Type: Lora for headings, Inter for body. System fallbacks render instantly
     with zero network cost. Drop self-hosted woff2 into /assets/fonts and
     enable the @font-face block below to switch to the exact brand fonts. */
  --font-head: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
}

/* --- Optional: self-hosted brand fonts. Add the woff2 files, then uncomment.
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("/assets/fonts/inter-var.woff2") format("woff2");
}
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 500 700;
  font-display: swap; src: url("/assets/fonts/lora-var.woff2") format("woff2");
}
--- */

/* --------------------------------------------------------- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--ocean);
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.8vw, 3.15rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.45rem); }
p { margin: 0 0 1rem; }
a { color: var(--bay); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--bay-dark); }
img, svg { max-width: 100%; height: auto; display: block; }
strong { color: var(--ocean); }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--ocean); color: #fff; padding: .7rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------------------------------------------------------------- Layout --- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section--sand { background: var(--sand); }
.section--mist { background: var(--mist); }
.section--ocean { background: var(--ocean); color: #e9eef3; }
.section--ocean h2, .section--ocean h3 { color: #fff; }
.narrow { max-width: 72ch; }
.center { text-align: center; }
.eyebrow {
  font-family: var(--font-body); font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; font-size: .8rem; color: var(--ochre); margin: 0 0 .6rem;
}
.lead { font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.28rem); color: var(--ink-muted); }
.section--ocean .lead { color: #cdd8e2; }

/* ---------------------------------------------------------------- Buttons -- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .05s;
  line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--bay); color: #fff; }
.btn--primary:hover { background: var(--bay-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ocean); border-color: var(--ocean); }
.btn--ghost:hover { background: var(--ocean); color: #fff; }
.btn--light { background: #fff; color: var(--ocean); }
.btn--light:hover { background: var(--sand); color: var(--ocean); }
.btn--on-dark { border-color: rgba(255,255,255,.6); color: #fff; }
.btn--on-dark:hover { background: #fff; color: var(--ocean); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-row.center { justify-content: center; }

/* ----------------------------------------------------------------- Header -- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 243, 238, .92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 1rem; min-height: 70px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--ocean); line-height: 1; }
.brand__sub { display: block; font-family: var(--font-body); font-weight: 500; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ochre); margin-top: 3px; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  color: var(--ocean); text-decoration: none; font-weight: 500; font-size: .96rem;
  padding: .5rem .7rem; border-radius: 8px;
}
.nav a:hover { background: rgba(44, 95, 138, .1); color: var(--bay-dark); }
.nav a[aria-current="page"] { color: var(--bay); box-shadow: inset 0 -2px 0 var(--ochre); border-radius: 0; }
.nav .btn { margin-left: .5rem; padding: .55rem 1.1rem; }

/* Mobile nav (pure CSS, no JS) */
@media (max-width: 900px) {
  .nav-toggle-label {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: auto; cursor: pointer;
    border: 1px solid var(--line); border-radius: 8px; background: #fff;
  }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--ocean); position: relative;
  }
  .nav-toggle-label span::before { position: absolute; top: -6px; }
  .nav-toggle-label span::after { position: absolute; top: 6px; }
  .nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--mist); border-bottom: 1px solid var(--line);
    padding: .6rem clamp(1.1rem, 4vw, 2rem) 1.2rem; box-shadow: var(--shadow-md);
    transform: translateY(-120%); transition: transform .22s ease; max-height: calc(100vh - 70px); overflow:auto;
  }
  .nav a { padding: .85rem .4rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin: .8rem 0 0; justify-content: center; }
  .nav-toggle:checked ~ .nav { transform: translateY(0); }
}

/* ------------------------------------------------------------------- Hero -- */
.hero { position: relative; overflow: hidden; color: #eaf1f7; background: var(--ocean); }
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(107,174,178,.38), transparent 60%),
    radial-gradient(760px 420px at 8% 8%, rgba(44,95,138,.55), transparent 55%),
    linear-gradient(160deg, #0c2338 0%, #0F2A43 45%, #123a5c 100%);
}
.hero__bg::after {
  /* granite-ochre signature glow, kept subtle */
  content: ""; position: absolute; right: -8%; bottom: -30%; width: 55%; height: 90%;
  background: radial-gradient(closest-side, rgba(176,122,60,.28), transparent 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero__inner { padding-block: clamp(3.5rem, 9vw, 7rem); max-width: 42rem; }
.hero h1 { color: #fff; }
.hero p { color: #d3dfea; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); }
.hero .eyebrow { color: var(--turquoise); }
.hero__points { list-style: none; margin: 1.4rem 0 2rem; padding: 0; display: grid; gap: .55rem; }
.hero__points li { display: flex; gap: .6rem; align-items: flex-start; color: #e7eef4; }
.hero__points svg { flex: none; margin-top: 3px; color: var(--turquoise); }
.wave { display: block; width: 100%; height: auto; color: var(--mist); position: relative; z-index: 1; margin-top: -1px; }

/* ------------------------------------------------------------------ Cards -- */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.card--link { text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--turquoise); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-muted); margin-bottom: 1rem; }
.card__icon {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(107,174,178,.16); color: var(--bay); margin-bottom: 1rem;
}
.card__more { margin-top: auto; font-weight: 600; color: var(--bay); display: inline-flex; align-items: center; gap: .35rem; }
.card--link:hover .card__more { gap: .6rem; }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--stone); background: var(--sand);
  padding: .25rem .6rem; border-radius: 999px; margin-bottom: .8rem; align-self: flex-start;
}

/* --------------------------------------------------------------- Features -- */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.feature-list li { display: flex; gap: .8rem; align-items: flex-start; }
.feature-list .tick {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(44,95,138,.12);
  color: var(--bay); display: grid; place-items: center; margin-top: 2px;
}
.section--ocean .feature-list .tick { background: rgba(107,174,178,.22); color: var(--turquoise); }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem; margin-top: 1.5rem; }
.stat b { font-family: var(--font-head); font-size: 2rem; color: var(--ocean); display: block; line-height: 1; }
.section--ocean .stat b { color: #fff; }
.stat span { font-size: .9rem; color: var(--ink-muted); }
.section--ocean .stat span { color: #b9c7d4; }

/* Panel (info boxes, aside) */
.panel { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ochre); border-radius: var(--radius-sm); padding: 1.3rem 1.5rem; box-shadow: var(--shadow-sm); }
.panel h3 { margin-top: 0; }

/* Prose (long-form pages) */
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* --------------------------------------------------------------- CTA band -- */
.cta-band { background: linear-gradient(135deg, var(--bay) 0%, var(--ocean) 100%); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d3dfea; max-width: 60ch; margin-inline: auto; }

/* ----------------------------------------------------------------- Footer -- */
.site-footer { background: var(--ocean); color: #b9c7d4; padding-block: 3rem 1.5rem; font-size: .95rem; }
.site-footer a { color: #dbe6f0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .9rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-brand .brand__name { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .85rem; color: #90a2b3; }
.footer-bottom a { color: #90a2b3; }

/* --------------------------------------------------------------- Contact --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-methods { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.contact-methods li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-methods .ci { flex: none; width: 42px; height: 42px; border-radius: 10px; background: rgba(44,95,138,.12); color: var(--bay); display: grid; place-items: center; }
.contact-methods b { display: block; color: var(--ocean); }
.contact-methods a { font-size: 1.05rem; }

.form { display: grid; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.form label { font-weight: 600; color: var(--ocean); font-size: .92rem; display: block; margin-bottom: .35rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; padding: .7rem .85rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--mist); color: var(--charcoal);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--bay); box-shadow: 0 0 0 3px rgba(44,95,138,.15); background: #fff; }
.form textarea { min-height: 130px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--ink-muted); padding-top: 1.2rem; }
.breadcrumb a { color: var(--bay); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin-inline: .4rem; color: var(--line); }

/* Utility */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-ochre { color: var(--ochre); }
.hide { display: none; }
