/* ==========================================================================
   Skyridge Consulting — shared styles
   Everything that appears on every page: design tokens, reset, nav, footer,
   and accessibility helpers. Page-specific rules stay in each page's own
   <style> block so this file never needs to know what a page contains.
   ========================================================================== */

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

/* --- Design tokens ------------------------------------------------------ */
:root {
  --sky: #0a0f1e;
  --ridge: #0d1528;
  --slate: #1a2440;
  --steel: #253357;
  --ice: #c8dff5;
  --glow: #4a9edd;
  --peak: #e8f4ff;
  --gold: #c9a96e;
  --mist: rgba(200, 223, 245, 0.07);
  --deep: #2d6fa3;
}

html { scroll-behavior: smooth; }

body {
  background: var(--sky);
  color: var(--ice);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}

/* Ambient glow behind all page content */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(74,158,221,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(201,169,110,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* --- Navigation --------------------------------------------------------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 4rem;
  background: rgba(10,15,30,0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200,223,245,0.06);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--peak);
  text-decoration: none;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-mark {
  width: 44px;
  height: auto;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 0 8px rgba(74,158,221,0.25));
  transition: transform 0.3s ease;
}
.nav-logo:hover .logo-mark { transform: translateY(-1px); }
.logo-mark .ridge-fill { fill: url(#ridgeGradient); }
.logo-mark .ridge-line { stroke: var(--peak); stroke-width: 0.5; fill: none; opacity: 0.6; stroke-linejoin: round; }
.logo-mark .summit-dot { fill: var(--gold); }

/* The wordmark is one continuous gradient, so its second half inherits
   rather than taking a colour of its own. */
.nav-logo .logo-accent { color: inherit; }
.logo-text { color: var(--peak); }

nav ul { list-style: none; display: flex; gap: 2.5rem; }
nav ul a {
  color: var(--ice);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s;
}
nav ul a:hover { opacity: 1; }

/* Hamburger — mobile only, hidden at desktop widths */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--peak);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
nav.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- Footer ------------------------------------------------------------- */
footer {
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(200,223,245,0.06);
  position: relative;
  z-index: 1;
}
footer p { font-size: 0.75rem; color: var(--ice); opacity: 0.55; letter-spacing: 0.05em; }
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--peak);
  opacity: 0.6;
}
.footer-meta { display: flex; align-items: center; gap: 1.5rem; }
.footer-meta a {
  font-size: 0.75rem;
  color: var(--ice);
  opacity: 0.6;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s, color 0.2s;
}
.footer-meta a:hover { opacity: 1; color: var(--glow); }

/* --- Accessibility ------------------------------------------------------ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--glow);
  color: var(--sky);
  padding: 0.7rem 1.2rem;
  z-index: 200;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* Focus rings for keyboard users only, not mouse clicks */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: 2px;
}
/* The skip-link target is focused programmatically; no ring needed there. */
#main:focus { outline: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Mobile chrome ------------------------------------------------------ */
@media (max-width: 900px) {
  nav { padding: 1.2rem 2rem; }
  .nav-toggle { display: flex; }
  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10,15,30,0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(200,223,245,0.06);
    padding: 0.5rem 2rem 1.5rem;
    margin: 0;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  nav ul li { width: 100%; }
  nav ul a {
    display: block;
    padding: 1rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(200,223,245,0.06);
  }
  nav.open ul {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  footer { padding: 2rem 2rem; flex-direction: column; gap: 1rem; text-align: center; }
}

/* --- Gradient text ------------------------------------------------------
   These elements clip a gradient to their glyphs, which requires setting the
   text fill to transparent. Declared last so they win over the solid colours
   above, and wrapped in @supports so those colours remain the fallback —
   without the guard, unsupported browsers render the text invisible.
   Page-specific gradient text (hero, section titles, policy headers) is
   declared the same way in each page's own <style> block.
   ------------------------------------------------------------------------ */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo-text,
  .footer-logo {
    background-image: linear-gradient(to bottom, var(--peak) 0%, var(--glow) 70%, var(--deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  /* Nav links use a shorter two-stop ramp */
  nav ul a {
    background-image: linear-gradient(to bottom, var(--peak) 0%, var(--glow) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
