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

:root {
  color-scheme: light;
  /* ── Theme tokens (light = default) ── */
  --bg:      #ffffff;   /* page background */
  --surface: #F5F6F8;   /* alt sections */
  --card:    #ffffff;   /* cards */
  --ink:     #16191C;   /* primary text */
  --ink2:    #3A4148;   /* secondary text */
  --grey:    #5E6A74;   /* muted text */
  --bronze:  #7A6A52;   /* accent */
  --sand:    #D4C9B4;   /* accent on dark */
  --line:    #E6E8EC;   /* borders */
  --band:      #16191C; /* dark section bands (dark in both themes) */
  --band-ink:  #ffffff;
  --band-line: rgba(255,255,255,0.12);
  --band-soft: rgba(255,255,255,0.06);
  --marquee-bg:    #F5F6F8;  /* logo strip stays light in both themes */
  --marquee-label: #5E6A74;
  --wheel-1: #16191C; --wheel-2: #2A313A; --wheel-num: #D4C9B4;
  --wheel-center: #ffffff; --wheel-label: #16191C; --wheel-sub: #5E6A74; --wheel-star: #7A6A52;

  /* Compatibility aliases (existing selectors) */
  --navy:   var(--ink);
  --ink2c:  var(--ink2);
  --gold:   var(--bronze);
  --gold2:  var(--sand);
  --light:  var(--bg);
  --paper2: var(--surface);
  --white:  var(--card);
  --border: var(--line);

  /* Type */
  --font-display: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-ui: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  /* Type scale — ~1.3 ratio, fluid at the top end */
  --text-xs:  0.8125rem;
  --text-sm:  0.9375rem;
  --text-md:  1.0625rem;
  --text-lg:  1.375rem;
  --text-xl:  clamp(1.7rem, 1.2rem + 1.9vw, 2.3rem);
  --text-2xl: clamp(2.3rem, 1.5rem + 3vw, 3.4rem);

  /* Z-scale */
  --z-nav: 10;
  --z-skip: 40;
  --z-notice: 50;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:      #121417;
  --surface: #181B1F;
  --card:    #1C2025;
  --ink:     #E9EBEE;
  --ink2:    #B7BDC3;
  --grey:    #98A1A9;
  --bronze:  #C6AC80;
  --sand:    #D8CCB2;
  --line:    #2A3037;
  --band:      #1C2025;
  --band-ink:  #E9EBEE;
  --band-line: rgba(255,255,255,0.10);
  --band-soft: rgba(255,255,255,0.05);
  --marquee-bg:    #EEF0F2;
  --marquee-label: #5E6A74;
  --wheel-1: #262C33; --wheel-2: #333B44; --wheel-num: #D8CCB2;
  --wheel-center: #1C2025; --wheel-label: #E9EBEE; --wheel-sub: #98A1A9; --wheel-star: #C6AC80;
}

html { scroll-behavior: smooth; }

/* ── Skip link (accessibility) ── */
#skip-to-content {
  position: absolute; top: 0; left: 0;
  transform: translateY(-140%);
  background: var(--band); color: var(--sand);
  padding: 10px 18px; font-family: var(--font-ui);
  font-weight: 600; font-size: var(--text-sm);
  z-index: var(--z-skip); text-decoration: none; border-radius: 0 0 8px 0;
  transition: transform 0.2s;
}
#skip-to-content:focus { transform: translateY(0); }

body {
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-size: var(--text-md);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; }

/* Italic accent — one emphasis word per headline, same family for flow */
h1 em, h2 em, h3 em,
.page-hero h1 em, h2.section-title em {
  font-style: italic;
  color: var(--gold);
}
/* Eyebrow label */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

/* Visible keyboard focus, everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.cta-band :focus-visible,
#contact :focus-visible, .newsletter-band :focus-visible {
  outline-color: var(--gold2);
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAV ── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  width: 100%;
  position: relative;
  z-index: var(--z-nav);
  font-family: var(--font-ui);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-logo svg {
  width: 26px; height: 26px;
  color: var(--gold);
  flex-shrink: 0;
}

/* ── BRAND LOCKUP ── */
.brand-star { flex-shrink: 0; fill: currentColor; }
.nav-logo .brand-star { width: 26px; height: 26px; color: inherit; }
.footer-logo .brand-star { width: 21px; height: 21px; color: inherit; }
.brand-wordmark { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 800; letter-spacing: 0.05em; color: inherit; }
.nav-logo .brand-name { font-size: 1rem; }
.footer-logo .brand-name { font-size: 0.9rem; }
.brand-sub {
  font-weight: 600; text-transform: uppercase;
  color: var(--gold); letter-spacing: 0.3em;
}
.nav-logo .brand-sub { font-size: 0.6rem; margin-top: 4px; }
.footer-logo .brand-sub { font-size: 0.55rem; margin-top: 3px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-links li a {
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--grey);
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.2s;
}
.nav-links li a:hover,
.nav-links li a.active { color: var(--navy); }
.btn-book {
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-ui);
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.btn-book:hover { opacity: 0.85; }

/* ── Nav dropdown (Our Services) ── */
.has-dropdown { position: relative; }
.has-dropdown > a::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px); vertical-align: middle; opacity: 0.55;
}
.dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(4px);
  min-width: 268px; margin: 0; padding: 8px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.14);
  opacity: 0; visibility: hidden; transition: opacity 0.18s ease, transform 0.18s ease; z-index: 60;
}
.dropdown::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; } /* hover bridge */
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(1px);
}
.dropdown li a {
  display: block; padding: 11px 14px; border-radius: 8px;
  font-size: var(--text-sm); font-weight: 500; color: var(--ink2); white-space: nowrap;
}
.dropdown li a:hover { background: var(--surface); color: var(--bronze); }

/* ── PAGE HERO (inner pages) — warm paper ── */
.page-hero {
  position: relative;
  padding: 92px 0 68px;
  margin-bottom: 68px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(78% 92% at 96% -12%, rgba(212,201,180,0.5), transparent 55%);
}
.page-hero .wrap { position: relative; }
.page-hero h1 {
  font-size: 2.7rem; /* fallback for engines without clamp() */
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--navy);
  line-height: 1.02;
  max-width: 18ch;
}
.page-hero p {
  margin-top: 20px;
  font-size: var(--text-md);
  color: var(--grey);
  max-width: 58ch;
  line-height: 1.65;
  text-wrap: pretty;
}

/* ── SECTION HEADINGS ── */
h2.section-title {
  font-size: 1.9rem; /* fallback for engines without clamp() */
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 14px;
}
p.section-sub {
  font-size: var(--text-md);
  color: var(--grey);
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: 48px;
  text-wrap: pretty;
}

/* ── CARDS (used sparingly) ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(17,21,24,0.1);
}
.card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.card p {
  font-size: var(--text-sm);
  color: var(--grey);
  line-height: 1.7;
}

/* ── RULED LIST (service index, focus areas) ── */
.ruled-list { border-top: 1px solid var(--border); }
.ruled-row {
  display: grid;
  grid-template-columns: minmax(200px, 0.85fr) 1.6fr;
  gap: 16px 48px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}
.ruled-row h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.ruled-row p {
  font-size: var(--text-md);
  color: var(--grey);
  line-height: 1.7;
  max-width: 62ch;
  margin: 0;
  text-wrap: pretty;
}
@media (max-width: 720px) {
  .ruled-row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
}

/* ── GRID HELPERS ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: none; cursor: pointer;
  font-family: var(--font-ui);
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-outline {
  display: inline-flex; align-items: center;
  background: transparent;
  color: var(--navy);
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--text-sm);
  border: 1.5px solid var(--navy);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-ui);
  transition: background 0.2s, transform 0.15s;
}
.btn-outline:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }
.btn-gold {
  display: inline-block;
  background: var(--sand);
  color: #16191C;
  padding: 16px 36px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  border: none; cursor: pointer;
  text-decoration: none;
  font-family: var(--font-ui);
  transition: background 0.2s, transform 0.15s;
}
.btn-gold:hover { background: #c4b89f; transform: translateY(-2px); }

/* ── THEME TOGGLE ── */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  background: transparent; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.theme-toggle:hover { border-color: var(--bronze); color: var(--bronze); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

/* ── CTA BAND ── */
.cta-band {
  background: var(--band);
  border-radius: 20px;
  padding: 72px 48px;
  text-align: center;
  margin: 0 0 80px;
}
.cta-band h2 {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 14px;
}
.cta-band h2 em { color: var(--gold2); }
.cta-band p {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.78);
  margin-bottom: 36px;
}

/* ── FOOTER ── */
footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 28px 32px 48px;
  max-width: 1280px;
  margin: 0 auto;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--grey);
  flex-wrap: wrap;
  gap: 16px;
  text-align: right;
}

/* ── NORTH STAR MOTIF (hero visual) ── */
.starfield { width: 100%; height: auto; display: block; overflow: visible; }
.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-visual .starfield { max-width: 460px; animation: sf-drift 16s ease-in-out infinite alternate; }
.page-hero .starfield { max-width: 300px; }
.starfield .tw { animation: sf-tw 3.4s ease-in-out infinite alternate; }
.starfield .tw:nth-of-type(2n){ animation-duration: 4.3s; animation-delay: .7s; }
.starfield .tw:nth-of-type(3n){ animation-duration: 5.1s; animation-delay: 1.4s; }
.starfield .tw:nth-of-type(4n){ animation-duration: 3.8s; animation-delay: .3s; }
.starfield .north { animation: sf-north 4.6s ease-in-out infinite; }
.starfield .glow  { animation: sf-glow 4.6s ease-in-out infinite; }
@keyframes sf-drift { from { transform: translateY(7px); } to { transform: translateY(-7px); } }
@keyframes sf-tw    { from { opacity: .35; } to { opacity: 1; } }
@keyframes sf-north { 0%,100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes sf-glow  { 0%,100% { opacity: .45; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .starfield, .starfield * { animation: none !important; }
}
.footer-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem;
  color: var(--navy); text-decoration: none;
}
.footer-logo svg { width: 20px; height: 20px; color: var(--gold); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--grey); text-decoration: none;
  font-size: var(--text-xs); font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--navy); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .cta-band { padding: 56px 24px; }
}
/* Stack the nav once links would crowd the logo / CTA */
@media (max-width: 1080px) {
  nav { flex-wrap: wrap; row-gap: 14px; justify-content: center; }
  .nav-logo { margin-right: auto; }
  .nav-links { order: 3; flex-basis: 100%; gap: 8px 20px; }
  /* When the nav stacks, collapse the Services sub-menu — the "Our Services"
     link still reaches the hub, so the chips just add clutter on small screens. */
  .has-dropdown > a::after { display: none; }
  .dropdown { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  nav { padding: 20px 16px; }
  footer { flex-direction: column; align-items: flex-start; text-align: left; padding: 0 18px 40px; }
  .page-hero { padding: 60px 0 52px; margin-bottom: 56px; }
  .cta-band { padding: 48px 22px; }
  p.section-sub { margin-bottom: 36px; }
  .card { padding: 28px; }
}

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