/* ==========================================================================
   SEKOAN — global.css
   Tokens · Reset · Typography · Nav · Footer · Utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colours */
  --bg-deep:        #050506;
  --bg-core:        #101012;
  --bg-surface:     #161618;
  --bg-raised:      #1c1c1f;
  --fg-primary:     #EAEAEA;
  --fg-secondary:   #B0B0B8;
  --fg-muted:       #6B6B75;
  --fg-faint:       #2A2A30;
  --accent:         #D9711C;
  --accent-dim:     rgba(217, 113, 28, 0.12);
  --accent-mid:     rgba(217, 113, 28, 0.25);
  --accent-glow:    rgba(217, 113, 28, 0.40);
  --line:           #1A1A1E;
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-accent:  rgba(217, 113, 28, 0.22);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --nav-h:       72px;
  --max-w:       1400px;
  --pad-h:       5vw;
  --section-gap: 7rem;

  /* Transitions */
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:    180ms;
  --t-mid:     380ms;
  --t-slow:    650ms;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-deep);
  background-image: radial-gradient(circle at 50% 30%, var(--bg-core) 0%, var(--bg-deep) 65%);
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.018;
  pointer-events: none;
  z-index: 1000;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY UTILITIES
   -------------------------------------------------------------------------- */
.serif { font-family: var(--font-serif); }
.sans  { font-family: var(--font-sans); }

.label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.label--accent { color: var(--accent); }

.display-xl {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 7.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.display-lg {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 5.5rem);
  font-weight: 300;
  line-height: 1.08;
}
.display-md {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
}
.display-sm {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
}

.body-lg  { font-size: 1.0625rem; line-height: 1.8; color: var(--fg-secondary); }
.body-md  { font-size: 0.9375rem; line-height: 1.75; color: var(--fg-secondary); }
.body-sm  { font-size: 0.8125rem; line-height: 1.7; color: var(--fg-muted); }

em { font-style: italic; color: var(--accent); }

/* --------------------------------------------------------------------------
   4. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-h);
}

.section { padding-block: var(--section-gap); }
.section--sm { padding-block: 4rem; }
.section--lg { padding-block: 10rem; }

.divider {
  height: 1px;
  background: var(--border-subtle);
  margin-block: 0;
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border: 1px solid transparent;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: transparent;
  color: var(--accent);
}

.btn--outline {
  background: transparent;
  color: var(--fg-primary);
  border-color: var(--border-subtle);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-accent);
  padding: 0.75rem 1.5rem;
}
.btn--ghost:hover {
  background: var(--accent-dim);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--t-fast) var(--ease);
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. NAVIGATION
   -------------------------------------------------------------------------- */

/* NAV: sync with _nav-component.html when updating */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding-inline: var(--pad-h);
  background: rgba(5, 5, 6, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--t-mid) var(--ease),
              border-color var(--t-mid) var(--ease);
}

.site-nav.scrolled {
  background: rgba(5, 5, 6, 0.96);
  border-bottom-color: var(--line);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}
.nav-logo__mark { width: 32px; height: 32px; }
.nav-logo__wordmark {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--fg-primary);
}
.nav-logo__wordmark em {
  font-style: italic;
  color: var(--accent);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-left: auto;
  margin-right: 2rem;
}

.nav-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  transition: color var(--t-fast);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: var(--fg-primary); }

/* Dropdown */
.nav-item { position: relative; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--bg-core);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown__item {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-dropdown__item:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Dropdown arrow indicator */
.nav-link--has-dropdown::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 3px solid currentColor;
  margin-left: 0.4rem;
  vertical-align: middle;
  transition: transform var(--t-fast);
}
.nav-item:hover .nav-link--has-dropdown::after { transform: rotate(180deg); }

/* Nav CTA */
.nav-cta { flex-shrink: 0; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--fg-primary);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast);
  transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(5, 5, 6, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 490;
  flex-direction: column;
  padding: 2rem var(--pad-h);
  gap: 0;
  overflow-y: auto;
  transform: translateY(-10px);
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
  pointer-events: none;
}
.nav-mobile-overlay.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.nav-mobile-link {
  display: block;
  padding: 1.1rem 0;
  font-size: 1.5rem;
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--fg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--t-fast);
}
.nav-mobile-link:hover { color: var(--accent); }

.nav-mobile-sub {
  padding: 0.5rem 0 0.5rem 1.5rem;
}
.nav-mobile-sub li { padding-block: 0.4rem; }
.nav-mobile-sub a {
  font-size: 0.85rem;
  font-family: var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--t-fast);
}
.nav-mobile-sub a:hover { color: var(--accent); }

@media (max-width: 1023px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}

/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  padding-block: 4rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.footer-brand__mark { width: 28px; height: 28px; }
.footer-brand__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--fg-primary);
}
.footer-brand__name em { font-style: italic; color: var(--accent); }

.footer-brand__tagline {
  font-size: 0.8125rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
  max-width: 240px;
  line-height: 1.6;
}

.footer-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.footer-col__heading {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a {
  font-size: 0.8125rem;
  color: var(--fg-muted);
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--fg-primary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.6875rem;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
}

.footer-back-top {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color var(--t-fast);
  background: none;
  border: none;
}
.footer-back-top:hover { color: var(--accent); }

/* Service page footer banner */
.service-banner {
  border-top: 1px solid var(--border-subtle);
  padding-block: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.service-banner__location {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .service-banner { justify-content: center; text-align: center; }
}

/* --------------------------------------------------------------------------
   8. SHARED SECTION COMPONENTS
   -------------------------------------------------------------------------- */

/* Section header */
.section-header { margin-bottom: 3.5rem; }
.section-header--center { text-align: center; }

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-eyebrow::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.section-header--center .section-eyebrow {
  justify-content: center;
}
.section-header--center .section-eyebrow::after { display: none; }

/* Amber accent rule (left border) */
.amber-rule {
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
}

/* Highlight text */
.text-accent { color: var(--accent); }
.text-muted   { color: var(--fg-muted); }
.text-primary { color: var(--fg-primary); }

/* Page top spacer (accounts for fixed nav) */
.nav-offset { padding-top: var(--nav-h); }

/* Scroll-to-top utility */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-mid), color var(--t-fast), border-color var(--t-fast);
  z-index: 200;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}
#back-to-top:hover {
  color: var(--accent);
  border-color: var(--border-accent);
}
