/* ============================================================
   SEAVIEW ACCOUNTING — SHARED THEME
   ------------------------------------------------------------
   This is the design system used across EVERY page of the site.
   Link it in the <head> of every page BEFORE the page-specific
   stylesheet, e.g.:

     <link rel="stylesheet" href="/css/theme.css">
     <link rel="stylesheet" href="/css/home.css">

   Change a colour, font, button or the nav/footer here once and
   it updates everywhere. Page-specific layout lives in its own
   file (e.g. css/home.css).

   Fonts (Sora for headings, DM Sans for body) are loaded with a
   <link> tag in each page's <head>.
   ============================================================ */

/* ── DESIGN TOKENS ──
   Brand colours and shared values. Edit these to re-skin the site. */
:root {
  --green:      #65ff91;   /* primary accent — headings, highlights */
  --orange:     #ff6b2b;   /* CTA buttons, secondary accent */
  --navy-deep:  #03152c;   /* darkest background */
  --navy:       #082140;   /* section backgrounds */
  --navy-mid:   #0d2d52;   /* card backgrounds */
  --navy-light: #1a3a5c;   /* lighter card / hover states */
  --white:      #ffffff;
  --grey:       #a8b8cc;   /* body text on dark backgrounds */

  --maxw:       1200px;    /* shared content max-width */
  --radius:     16px;      /* default card corner radius */
  --nav-h:      68px;      /* nav height (used for scroll offsets) */
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--white);
  overflow-x: hidden;
  /* Page-wide background — every section sits on top of this so the page
     reads as ONE continuous surface. A solid dark base (never white) plus
     a single, gentle top-to-bottom gradient: smooth and consistent, with
     no harsh colour bands between sections. (No fixed attachment — it
     misbehaves on iOS and in full-page renders.) */
  background-color: #03152c;
  background-image: linear-gradient(180deg, #04192f 0%, #03152c 55%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4, h5 { font-family: 'Sora', sans-serif; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* Visible keyboard focus for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip-to-content link (revealed on keyboard focus) */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--green); color: var(--navy-deep);
  padding: 10px 18px; border-radius: 8px;
  font-weight: 600; font-size: 14px; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ── SHARED BUTTONS ── */
.btn-primary {
  background: var(--orange); color: var(--white);
  padding: 14px 28px; border-radius: 8px;
  font-weight: 600; font-size: 15px;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,43,0.35);
}
.btn-secondary {
  background: transparent; color: var(--white);
  padding: 14px 28px; border-radius: 8px;
  font-weight: 500; font-size: 15px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif;
}
.btn-secondary:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
}

/* ── SHARED SECTION LABELS / TITLES ── */
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--green);
  margin-bottom: 12px; display: block;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 700; line-height: 1.15; margin-bottom: 16px;
  color: var(--white);
}
.section-title .green { color: var(--green); }
.section-subtitle {
  font-size: 16px; color: rgba(255,255,255,0.55);
  max-width: 520px; line-height: 1.7;
}
.section-header { text-align: center; margin-bottom: 64px; }
.section-header .section-subtitle { margin: 0 auto; }

/* ── SHARED SCROLL ARROW BUTTONS (carousels) ── */
.scroll-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent; color: var(--white);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.scroll-btn:hover {
  background: rgba(101,255,145,0.1);
  border-color: var(--green);
  color: var(--green);
}

/* ── SCROLL-REVEAL ANIMATION ──
   Elements with class "reveal" fade up into view as you scroll.
   Add "reveal-delay-1" … "reveal-delay-4" to stagger siblings.
   Driven by js/main.js. */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible  { opacity: 1; transform: translateY(0); }
.reveal-delay-1  { transition-delay: 0.1s; }
.reveal-delay-2  { transition-delay: 0.2s; }
.reveal-delay-3  { transition-delay: 0.3s; }
.reveal-delay-4  { transition-delay: 0.4s; }

/* ============================================================
   NAV  (shared across all pages)
   ------------------------------------------------------------
   To swap the text logo for an image, replace the .logo-icon
   and .logo-text markup with:
     <img src="/assets/logo.svg" alt="Seaview Accounting" height="36">
   ============================================================ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 60px; height: var(--nav-h);
  background: rgba(3,21,44,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px;
  text-decoration: none; color: var(--white); letter-spacing: 0.02em;
}
.logo-icon {
  width: 36px; height: 36px;
  border-radius: 8px; flex-shrink: 0;
}
.logo-text .accent { color: var(--green); }

.nav-links {
  display: flex; align-items: center; gap: 36px; list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.7); text-decoration: none;
  font-size: 14px; font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--white); }
.nav-cta {
  background: var(--orange); color: var(--white) !important;
  padding: 10px 22px; border-radius: 6px;
  font-weight: 500;
}
.nav-cta:hover { box-shadow: 0 6px 18px rgba(255,107,43,0.3); }

/* Mobile menu toggle — hidden on desktop, shown on small screens */
.nav-toggle {
  display: none;
  width: 42px; height: 42px; border-radius: 8px;
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: ''; display: block;
  width: 18px; height: 2px; border-radius: 2px;
  background: var(--white); transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   FOOTER  (shared across all pages)
   ============================================================ */
.site-footer {
  background: rgba(2,10,22,0.99);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 60px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  position: relative;
}
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13px; color: rgba(255,255,255,0.38);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.7); }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.28); }

/* ── SHARED DIVIDER UTILITY ──
   A diagonal "wedge" at the top of a section. Add .divider-top. */
.divider-top { position: relative; }
.divider-top::before {
  content: '';
  position: absolute; top: -40px; left: 0; right: 0;
  height: 80px; z-index: 1; pointer-events: none;
  background: inherit;
  clip-path: polygon(0 100%, 100% 0%, 100% 100%);
}

/* ============================================================
   RESPONSIVE — nav, footer, buttons
   (Page sections handle their own breakpoints in their own CSS.)
   ============================================================ */
@media (max-width: 900px) {
  .site-nav { padding: 0 24px; }

  .nav-toggle { display: flex; }

  /* Slide-down mobile menu */
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(3,21,44,0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 8px 0 16px;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { padding: 14px 24px; font-size: 15px; }
  .nav-cta { margin: 8px 24px 0; text-align: center; }

  .site-footer { padding: 24px; flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   REDUCED MOTION — respect the user's OS setting.
   Disables entrance animations and reveals content immediately.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
