/* Pacific Scuba Repair — shared design system for every page.
   Page-specific layout lives in each page's own <style>. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FFFFFF;
  --surface: #F7F9FB;
  --surface-2: #FBFCFD;
  --border: #E3E8EE;
  --text: #14202E;
  --text-muted: #5B6875;
  --accent: #0C6FA8;
  --cyan: #0C6FA8;            /* legacy token name — same accent blue */
  --cyan-dim: rgba(12,111,168,0.07);
  /* Brand navy, sampled from the original site's masthead. Chrome only
     (nav, footer) so the body stays white. */
  --navy: #031464;
  --navy-deep: #020F4A;
  --on-navy: rgba(255,255,255,0.82);
  /* Height of the fixed top nav; anything that pads content clear of it uses this. */
  --nav-h: 80px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─── */
/* Scoped to the top-level nav so the footer's <nav> isn't pinned too. */
body > nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--navy);
  padding: 0 2rem; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: .85rem; font-size: 1.3rem; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: -.01em; }
.nav-logo img { height: 56px; width: auto; display: block; flex-shrink: 0; object-fit: contain; }
.nav-logo-text { white-space: nowrap; }
.nav-logo-text span { color: #8FB8E8; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
.nav-links a { color: var(--on-navy); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
/* Current page: white with a light-blue underline, in the desktop and mobile menus. */
.nav-links a[aria-current="page"], .mobile-menu a[aria-current="page"] {
  color: #fff; text-decoration: underline; text-decoration-color: #8FB8E8;
  text-decoration-thickness: 2px; text-underline-offset: 8px;
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; transition: all .3s; }
/* z-index above the fixed nav (100), or the nav covers the close button. */
.mobile-menu { display: none; position: fixed; inset: 0; background: var(--navy); z-index: 110; flex-direction: column; align-items: center; justify-content: center; gap: 1.75rem; }
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--on-navy); text-decoration: none; font-size: 1.35rem; font-weight: 500; }
.mobile-menu a:hover { color: #fff; }
.mobile-menu .close-btn { position: absolute; top: 1.25rem; right: 2rem; background: none; border: none; color: var(--on-navy); font-size: 2rem; cursor: pointer; }

/* ─── BUTTONS ─── */
.btn-primary, .btn-outline {
  display: inline-block; padding: .8rem 1.6rem; border-radius: 4px; font-weight: 600; font-size: .9rem;
  text-decoration: none; cursor: pointer; transition: all .2s;
}
.btn-primary { background: var(--navy); color: #fff; border: none; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-outline { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ─── PAGE SHELL ─── */
.page { max-width: 1080px; margin: 0 auto; padding: calc(var(--nav-h) + 3.5rem) 2rem 4rem; }
.page-narrow { max-width: 800px; }
.page-label { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .85rem; }
.page-title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin-bottom: .9rem; }
.page-title span { color: var(--accent); }
.rule { width: 40px; height: 2px; background: var(--accent); margin: .9rem 0 1.75rem; }
.page-intro { color: var(--text-muted); max-width: 680px; font-size: 1.02rem; line-height: 1.75; margin-bottom: 2.25rem; }

h2.sec-head { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; margin: 2.5rem 0 .9rem; }
h3.sub-head { font-size: .95rem; font-weight: 700; color: var(--text); margin: 1.5rem 0 .4rem; }

/* ─── SECTIONS ─── */
section { padding: 5.5rem 2rem; }
/* The nav is fixed, so the first section on a page starts below it. */
main > section:first-child { padding-top: calc(var(--nav-h) + 5.5rem); }
.container { max-width: 1120px; margin: 0 auto; }
.section-label { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .85rem; }
.section-heading { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -.02em; color: var(--text); margin-bottom: .9rem; }
.sub-head-inline { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; margin: 3.5rem 0 .5rem; }
.sub-head-inline + p { font-size: .9rem; color: var(--text-muted); max-width: 640px; }

/* ─── FIGURES ─── */
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; background: #fff; }
figcaption { font-size: .8rem; color: var(--text-muted); line-height: 1.6; margin-top: .7rem; }

/* ─── SCROLL REVEAL (site.js adds .visible) ─── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── CURRENT TURNAROUND (site.js fills it in) ─── */
/* It loads after the page, so a .turnaround block keeps its space but stays invisible until
   the value is in, then fades in. */
.turnaround { opacity: 0; transition: opacity .4s; }
.turnaround.loaded { opacity: 1; }

/* ─── FOOTER ─── */
footer { background: var(--navy); padding: 3rem 2rem; }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.footer-logo { height: 58px; width: auto; display: block; flex-shrink: 0; object-fit: contain; margin-bottom: 1rem; }
.footer-brand { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: .4rem; }
.footer-brand span { color: #8FB8E8; }
.footer-tagline { font-size: .82rem; color: var(--on-navy); }
.footer-copy { font-size: .76rem; color: rgba(255,255,255,.6); margin-top: .5rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; max-width: 560px; }
.footer-links a { font-size: .82rem; color: var(--on-navy); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: #fff; }

/* ─── RESPONSIVE ─── */
/* The bigger nav doesn't fit its links below 1024px, so the hamburger takes over there. */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  :root { --nav-h: 68px; }
  .nav-logo { font-size: 1.1rem; gap: .65rem; }
  .nav-logo img { height: 46px; }
  .page { padding: calc(var(--nav-h) + 2rem) 1.25rem 3rem; }
}
@media (max-width: 480px) {
  section { padding: 3.5rem 1.25rem; }
  main > section:first-child { padding-top: calc(var(--nav-h) + 3.5rem); }
}
