/* ----------------------------------------------------------------
   1. CSS Custom Properties
---------------------------------------------------------------- */
:root {
  /* Colours */
  --color-bg:          #faf9f6;
  --color-surface:     #ffffff;
  --color-dark-bg:     #00252e;
  --color-dark-surface:#001014;

  --color-text:        #1a1814;
  --color-text-muted:  #6b6560;
  --color-text-inv:    #faf9f6;
  --color-text-inv-muted: #a09890;

  --color-accent:      #00809F;
  --color-accent-light:#00a4ce;
  --color-accent-dark: #005064;

  --color-border:      rgba(26, 24, 20, 0.12);
  --color-border-inv:  rgba(250, 249, 246, 0.12);

  /* Typography */
  --font-display:      'Fraunces', Georgia, serif;
  --font-body:         'DM Sans', system-ui, sans-serif;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.5rem;
  --text-5xl:   3.5rem;
  --text-6xl:   4.5rem;

  --leading-tight:  1.15;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --container-max:  1200px;
  --container-pad:  var(--space-6);
  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --radius-full:    9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);

  /* Motion */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Header */
  --header-height:  68px;

  /* Mobile drawer */
  --drawer-width:   280px;
}


/* ----------------------------------------------------------------
   2. Reset & Base
---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
}

address {
  font-style: normal;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ----------------------------------------------------------------
   3. Typography
---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl)); }

p { max-width: 65ch; }

em {
  font-style: italic;
  color: var(--color-accent);
}

.image-captions{
  font-style: italic;
  color: var(--color-text-muted);
}

/* ----------------------------------------------------------------
   4. Layout Utilities
---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}


/* ----------------------------------------------------------------
   5. Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7em 1.6em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-fast),
              box-shadow var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover  { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0);    box-shadow: var(--shadow-sm); }

/* Primary */
.btn--primary {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn--primary:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

/* Ghost (light bg) */
.btn--ghost {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  background-color: var(--color-text);
  color: var(--color-text-inv);
  border-color: var(--color-text);
}

/* Full-width */
.btn--full { width: 100%; }


/* ----------------------------------------------------------------
   6. Site Header
---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(250, 249, 246, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.logo__mark {
  color: var(--color-accent);
  font-size: 1.4em;
  line-height: 1;
}

.logo--footer .logo__text,
.logo--footer .logo__mark { color: var(--color-text-inv); }
.logo--footer .logo__mark { color: var(--color-accent-light); }


/* ----------------------------------------------------------------
   7. Desktop Navigation
---------------------------------------------------------------- */
.desktop-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.desktop-nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  transition: color var(--transition-fast);
}

.desktop-nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.desktop-nav__link:hover {
  color: var(--color-text);
}

.desktop-nav__link:hover::after {
  width: 100%;
}

/* Hamburger label — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.hamburger:hover {
  background-color: rgba(0,0,0,0.06);
}

.hamburger__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
}


/* ----------------------------------------------------------------
   8. Mobile Nav — pure CSS drawer (checkbox hack)
   -  The hidden <input#menu-toggle> drives all state.
   -  When checked  → drawer slides in, overlay appears.
   -  When unchecked→ everything resets.
---------------------------------------------------------------- */

/* Hide the actual checkbox */
.menu-toggle {
  position: fixed;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Dark overlay behind the drawer */
.menu-overlay {
  display: none;          /* only rendered on mobile via media query */
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(0, 0, 0, 0);
  cursor: pointer;
  pointer-events: none;   /* ← don't intercept clicks when menu is closed */
  transition: background-color var(--transition-slow);
}

/* The drawer panel */
.mobile-nav {
  display: none;  /* only rendered on mobile via media query */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  width: var(--drawer-width);
  height: 100dvh;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  transform: translateX(-100%);
  transition: transform var(--transition-slow) cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

.mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: var(--text-2xl);
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-left: auto;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.mobile-nav__close:hover {
  background-color: rgba(0,0,0,0.06);
  color: var(--color-text);
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-nav__link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.mobile-nav__link:hover {
  background-color: rgba(200, 98, 42, 0.08);
  color: var(--color-accent);
}

/* ---- Open state (checkbox is checked) ---- */

/* Show overlay + drawer */
.menu-toggle:checked ~ .menu-overlay,
.menu-toggle:checked ~ .mobile-nav {
  display: block; /* override display:none */
}

/* Fade overlay in + make it clickable only when open */
.menu-toggle:checked ~ .menu-overlay {
  background-color: rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

/* Slide drawer in */
.menu-toggle:checked ~ .mobile-nav {
  transform: translateX(0);
}

/* Animate hamburger bars into an ✕ when menu is open */
.menu-toggle:checked ~ .site-header .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle:checked ~ .site-header .hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle:checked ~ .site-header .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ----------------------------------------------------------------
   9. Hero Section
---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-bg);
}

/* Decorative background shape */
.hero__bg-shape {
  position: absolute;
  top: -20%;
  right: -10%;
  width: min(70vw, 700px);
  height: min(70vw, 700px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%,
    rgba(42, 153, 200, 0.12) 0%,
    rgba(42, 68, 200, 0.04) 50%,
    transparent 70%
  );
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-16);
  padding-block: var(--space-20);
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero__heading {
  font-size: clamp(var(--text-4xl), 5.5vw, var(--text-6xl));
}

.hero__subtext {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-loose);
  max-width: 48ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

/* Decorative card stack (visual side) */
.hero__visual {
  position: relative;
  height: 420px;
}

.hero__card {
  position: absolute;
  border-radius: var(--radius-xl);
}

.hero__card--1 {
  width: 260px;
  height: 320px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  top: 30px;
  left: 30px;
  box-shadow: var(--shadow-lg);
}

.hero__card--2 {
  width: 220px;
  height: 260px;
  background: var(--color-dark-bg);
  top: 80px;
  left: 110px;
  opacity: .85;
  box-shadow: var(--shadow-lg);
}

.hero__card--3 {
  width: 180px;
  height: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  bottom: 20px;
  right: 20px;
  box-shadow: var(--shadow-md);
}


/* ----------------------------------------------------------------
   10. Sections (shared styles)
---------------------------------------------------------------- */
.section {
  padding-block: var(--space-24);
}

.section--light {
  background-color: var(--color-bg);
  color: var(--color-text);
}

.section--dark {
  background-color: var(--color-dark-bg);
  color: var(--color-text-inv);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-text-inv);
}

.section--dark p {
  color: var(--color-text-inv-muted);
}

.section__header {
  margin-bottom: var(--space-12);
}

.section__eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section--dark .section__eyebrow {
  color: var(--color-accent-light);
}

.section__heading {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
}


/* ----------------------------------------------------------------
   11. About Section
---------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about-grid__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.about-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  position: relative;
}


/* ----------------------------------------------------------------
   12. Services / Cards
---------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.card {
  background-color: var(--color-dark-surface);
  border: 1px solid var(--color-border-inv);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: transform var(--transition-base), box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(200, 98, 42, 0.4);
}

.card__icon {
  font-size: var(--text-2xl);
  color: var(--color-accent-light);
  line-height: 1;
}

.card__title {
  font-size: var(--text-xl);
  color: var(--color-text-inv);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--color-text-inv-muted);
  line-height: var(--leading-loose);
  max-width: none;
}


/* ----------------------------------------------------------------
   13. Contact Section
---------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-16);
  align-items: start;
}

.contact-grid__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-grid__info a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ----------------------------------------------------------------
   14. Site Footer
---------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-dark-bg);
  color: var(--color-text-inv);
  padding-top: var(--space-16);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-border-inv);
}

.site-footer__tagline {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-inv-muted);
  line-height: var(--leading-loose);
  max-width: 30ch;
}

.footer-nav__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-inv-muted);
  margin-bottom: var(--space-4);
}

.footer-nav__list,
.footer-social__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-nav__list a,
.footer-social__list a {
  font-size: var(--text-sm);
  color: var(--color-text-inv-muted);
  transition: color var(--transition-fast);
}

.footer-nav__list a:hover,
.footer-social__list a:hover {
  color: var(--color-accent-light);
}

.site-footer__bottom {
  padding-block: var(--space-6);
}

.site-footer__bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-inv-muted);
  max-width: none;
}


/* ----------------------------------------------------------------
   15. Utilities / Animations
---------------------------------------------------------------- */

/* Scroll-triggered fade-in (driven by JS IntersectionObserver) */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ----------------------------------------------------------------
   16. Media Queries
---------------------------------------------------------------- */

/* ── Large desktop (1200px+) ──────────────────────────── */
@media (min-width: 1200px) {
  :root {
    --container-pad: var(--space-8);
  }
}

/* ── Tablet landscape / small desktop (768px – 1024px) ── */
@media (max-width: 1024px) {
  .hero__inner {
    gap: var(--space-10);
  }

  .hero__card--1 { width: 200px; height: 260px; }
  .hero__card--2 { width: 180px; height: 210px; }
  .hero__card--3 { width: 150px; height: 150px; }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    gap: var(--space-10);
  }

  .contact-grid {
    gap: var(--space-10);
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* ── Tablet portrait (600px – 767px) ────────────────── */
@media (max-width: 767px) {

  /* Show hamburger, hide desktop nav & CTA */
  .hamburger        { display: flex; }
  .desktop-nav      { display: none; }
  .desktop-cta      { display: none; }

  /* Show mobile nav overlay + drawer */
  .menu-overlay,
  .mobile-nav       { display: block; }

  /* Hero stacks to single column */
  .hero__inner {
    grid-template-columns: 1fr;
    padding-block: var(--space-16);
  }

  .hero__visual { display: none; } /* hide decorative cards on mobile */

  /* Sections tighten up */
  .section { padding-block: var(--space-16); }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Footer stacks */
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .site-footer__brand {
    grid-column: auto;
  }
}

/* ── Mobile (below 480px) ────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --container-pad: var(--space-4);
  }

  .hero__heading {
    font-size: var(--text-3xl);
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section { padding-block: var(--space-12); }

  .section__header { margin-bottom: var(--space-8); }
}
