/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
  /* Brand colours */
  --color-bg: #0d1b2a;
  --color-text: #fafaf8;
  --color-accent: #7fd8be;

  /* Semi-transparent surface overlays */
  --surface-card: rgba(13, 27, 42, 0.86);
  --surface-card-hover: rgba(27, 38, 59, 1);
  --surface-nav: rgba(13, 27, 42, 0.75);
  --surface-mobile-menu: rgba(13, 27, 42, 0.92);
  --surface-testimonial: rgba(27, 38, 59, 0.65);
  --surface-input: rgba(13, 27, 42, 0.75);
  --surface-contact: rgba(13, 27, 42, 0.95);

  /* Borders */
  --border-faint: rgba(127, 216, 190, 0.07);
  --border-subtle: rgba(127, 216, 190, 0.09);
  --border-default: rgba(127, 216, 190, 0.1);
  --border-input: rgba(127, 216, 190, 0.18);
  --border-focus: rgba(127, 216, 190, 0.62);

  /* Typography */
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Open Sans", sans-serif;

  /* Layout */
  --nav-height: 78px;
  --section-space: clamp(72px, 9vw, 112px);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-bg);
}

body {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  padding-top: var(--nav-height);
}

body.menu-open {
  overflow: hidden;
}

/* ==========================================================================
   Page Transitions
   Managed by page-transition.js — classes applied to <html> and <body>
   ========================================================================== */

/* Full-screen overlay that fades in during navigation */
.page-transition-canvas {
  position: fixed;
  inset: 0;
  z-index: 1200;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

/* Show the canvas overlay when a transition is active */
body.is-transitioning .page-transition-canvas {
  opacity: 1;
}

body.is-transitioning {
  cursor: progress;
}

/* Blank the page content before the transition canvas renders */
html.transition-pending body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: var(--color-bg);
  pointer-events: none;
}

html.transition-pending body > :not(.page-transition-canvas) {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Background Scene
   Three.js canvas rendered behind all page content
   ========================================================================== */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

main {
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border-faint);
  backdrop-filter: blur(14px);
  background: var(--surface-nav);
}

/* Logo lockup */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.nav-logo-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 36px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(250, 250, 248, 0.58);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s;
}

.nav-links a:hover {
  color: var(--color-text);
}

/* CTA button group on the right */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 24px;
}

/* Dropdown nav item */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: rgba(250, 250, 248, 0.58);
  cursor: pointer;
  transition: color 0.18s;
}

.nav-dropdown-toggle:hover {
  color: var(--color-text);
}

.nav-chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.18s;
}

.nav-dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: rgba(13, 27, 42, 0.96);
  border: 1px solid rgba(127, 216, 190, 0.12);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(4, 10, 18, 0.4);
  list-style: none;
  padding: 6px;
  z-index: 300;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(250, 250, 248, 0.72);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(127, 216, 190, 0.1);
  color: var(--color-text);
}

/* Hamburger toggle — hidden on desktop */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  background: transparent;
  border: 1px solid rgba(250, 250, 248, 0.22);
  border-radius: 8px;
  cursor: pointer;
}

.menu-toggle span {
  width: 16px;
  height: 1.5px;
  background: var(--color-text);
  transition:
    transform 0.2s,
    opacity 0.2s;
}

/* Animate hamburger bars into an × when open */
.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   Mobile Menu
   Slides down from below the nav bar on small screens
   ========================================================================== */

.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 180;
  padding: 10px 24px 20px;
  border-bottom: 1px solid rgba(127, 216, 190, 0.14);
  background: var(--surface-mobile-menu);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-menu-inner {
  display: grid;
  gap: 2px;
  max-width: 1120px;
  margin: 0 auto;
}

/* Section labels inside the mobile menu */
.mobile-menu-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  padding: 14px 2px 4px;
}

/* Nav links inside the mobile menu */
.mobile-menu a:not(.mobile-menu-cta) {
  font-size: 15px;
  font-weight: 500;
  color: rgba(250, 250, 248, 0.8);
  text-decoration: none;
  padding: 12px 2px;
}

.mobile-menu a:not(.mobile-menu-cta):hover {
  color: var(--color-accent);
}

/* CTA button inside the mobile menu — slightly larger than the base .btn */
.mobile-menu-cta {
  width: fit-content;
  margin-top: 8px;
  padding: 12px 24px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--color-bg); /* dark text on teal button */
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition:
    transform 0.14s,
    opacity 0.14s,
    box-shadow 0.14s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

/* Filled teal */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 0 28px rgba(127, 216, 190, 0.4);
}

/* Ghost / outline */
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(250, 250, 248, 0.22);
}

.btn-outline:hover {
  border-color: rgba(127, 216, 190, 0.5);
  color: var(--color-accent);
}

/* Size modifier */
.btn-lg {
  padding: 14px 34px;
  font-size: 15px;
}

/* ==========================================================================
   Layout Primitives
   ========================================================================== */

/* Full-width section with vertical rhythm */
.section {
  position: relative;
  width: 100%;
  z-index: 10;
  pointer-events: none; /* pass clicks through to 3D canvas by default */
  padding: var(--section-space) 0;
}

/* First section sits directly under the nav — no extra top padding */
.section:first-of-type {
  padding-top: 0;
}

/* Offset anchor scroll targets so they aren't hidden under the fixed nav */
section[id] {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

/* Re-enable pointer events on actual content */
.section > * {
  pointer-events: all;
}

/* Centred content wrapper with horizontal gutters */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Horizontal divider with a faded green glow */
.rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(127, 216, 190, 0.18),
    transparent
  );
}

/* Utility width caps */
.max-w-460 {
  max-width: 460px;
}
.max-w-500 {
  max-width: 500px;
}

.text-center {
  text-align: center;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/* Small all-caps label above headings */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
  display: block;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 76px);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.032em;
  color: var(--color-text);
  margin-bottom: 22px;
  text-shadow: 0 2px 24px rgba(13, 27, 42, 0.8);
}

/* Highlighted word inside h1 */
h1 em {
  font-style: normal;
  color: var(--color-accent);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin-bottom: 14px;
}

h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
}

/* Large intro paragraph below h1 */
.lead {
  font-size: clamp(16px, 1.15vw, 19px);
  color: rgba(250, 250, 248, 0.82);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 36px;
  text-shadow: 0 1px 16px rgba(13, 27, 42, 0.9);
}

p {
  font-size: 15px;
  color: rgba(250, 250, 248, 0.58);
  line-height: 1.7;
}

/* Section header block — eyebrow + heading + optional body copy */
.section-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Override default bottom margins when inside section-intro */
.section-intro .eyebrow,
.section-intro h2 {
  margin-bottom: 0;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 24px 0 28px;
}

.hero-text {
  max-width: min(640px, 58%);
}

/* CTA button row */
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Services Grid  (#what)
   2-column grid of feature cards separated by hairline gaps
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 38px;
  background: rgba(127, 216, 190, 0.07); /* gap colour bleeds through */
  border-radius: 14px;
  overflow: hidden;
}

.service-card {
  background: var(--surface-card);
  padding: 36px 32px;
  transition: background 0.2s;
}

.service-card:hover {
  background: var(--surface-card-hover);
}

/* Icon badge inside each service card */
.svc-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(127, 216, 190, 0.1);
  border-radius: 10px;
  padding: 9px;
}

.svc-icon svg {
  width: 22px;
  height: 22px;
}

.service-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

/* ==========================================================================
   Process Steps  (#how)
   Numbered step-by-step list
   ========================================================================== */

.steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 38px;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 28px;
  align-items: start;
  padding: 32px 36px;
  background: var(--surface-card);
  border-radius: 11px;
  border: 1px solid var(--border-faint);
}

/* Large faded step number */
.step-num {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: rgba(127, 216, 190, 0.2);
  line-height: 1;
  padding-top: 3px;
}

/* ==========================================================================
   Stats  (#results)
   3-column metrics bar
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 38px;
  background: rgba(127, 216, 190, 0.1); /* gap colour */
  border-radius: 12px;
  overflow: hidden;
}

.stat {
  background: rgba(13, 27, 42, 0.97);
  padding: 36px 28px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(32px, 3vw, 50px);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 10px;
}

.stat p {
  font-size: 13px;
  color: rgba(250, 250, 248, 0.45);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.testimonial {
  padding: 32px;
  background: var(--surface-testimonial);
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
}

.testimonial blockquote {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 15px;
  color: rgba(250, 250, 248, 0.72);
  line-height: 1.7;
  margin-bottom: 18px;
}

/* Attribution */
.t-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
}

.t-role {
  font-size: 12px;
  color: rgba(250, 250, 248, 0.36);
  margin-top: 2px;
}

/* ==========================================================================
   CTA Block  (#about)
   Centred call-to-action card above the footer
   ========================================================================== */

.cta-block {
  text-align: center;
  max-width: 760px;
  margin: 34px auto 0;
  padding: 52px clamp(24px, 5vw, 48px) 40px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(4, 10, 18, 0.35);
}

.cta-block h2 {
  margin-bottom: 16px;
}

.cta-block p {
  max-width: 420px;
  margin: 0 auto 30px;
}

/* Fine-print disclaimer below the CTA button */
.cta-sub {
  font-size: 12px !important;
  color: rgba(250, 250, 248, 0.28) !important;
  margin-top: 14px !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-brand a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1;
  text-decoration: none;
  color: inherit;
}

.footer-brand img {
  height: 24px;
  object-fit: contain;
}

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}

.footer-meta {
  font-size: 12px;
  color: rgba(250, 250, 248, 0.28);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: rgba(250, 250, 248, 0.36);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-accent);
}

/* ==========================================================================
   Contact Page
   ========================================================================== */

.contact-main {
  position: relative;
  z-index: 10;
}

.contact-section {
  padding: clamp(80px, 10vw, 120px) 0 var(--section-space);
}

.contact-section:first-of-type {
  padding-top: clamp(28px, 5vw, 56px);
}

/* Card shell wrapping the contact form */
.contact-shell {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px clamp(22px, 4vw, 42px);
  background: var(--surface-contact);
  border: 1px solid rgba(127, 216, 190, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(4, 10, 18, 0.34);
}

.contact-shell .section-intro {
  gap: 10px;
}

.contact-shell .section-intro p {
  max-width: 620px;
}

.success-actions {
  margin-top: 20px;
}

/* Form layout */
.contact-form {
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

/* Two-column row for paired fields (e.g. first name / last name) */
.contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.68);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border-input);
  border-radius: 10px;
  background: var(--surface-input);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  padding: 12px 14px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(250, 250, 248, 0.38);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(127, 216, 190, 0.12);
}

.form-field textarea {
  min-height: 144px;
  resize: vertical;
}

.contact-submit {
  margin-top: 6px;
  width: fit-content;
}

.contact-note {
  font-size: 12px;
  color: rgba(250, 250, 248, 0.36);
  margin-top: 4px;
}

/* Hidden honeypot field — keeps bots from submitting the form */
.contact-honeypot {
  display: none !important;
}

/* ==========================================================================
   Contact Page — h1 scoped to match section heading size
   ========================================================================== */

.contact-shell h1 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

/* ==========================================================================
   Terms / Privacy Pages
   ========================================================================== */

.terms-main {
  position: relative;
  z-index: 10;
}

.terms-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 24px 72px;
}

.terms-content h1 {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.terms-content .meta {
  margin: 10px 0 28px;
  color: rgba(250, 250, 248, 0.68);
  font-size: 14px;
}

.terms-content section {
  margin-top: 24px;
}

.terms-content h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.2;
}

.terms-content h3 {
  margin: 14px 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.terms-content p {
  margin: 0;
  color: rgba(250, 250, 248, 0.88);
}

.terms-content p + p {
  margin-top: 10px;
}

.terms-content ul {
  margin: 10px 0 0 22px;
  padding: 0;
}

.terms-content li {
  margin: 6px 0;
  color: rgba(250, 250, 248, 0.88);
}

.terms-content a {
  color: var(--color-accent);
}

.terms-footer-wrap {
  margin-top: 56px;
}

/* ==========================================================================
   Form Error Messages
   ========================================================================== */

.form-error {
  font-size: 13px;
  color: #ff6b6b;
  padding: 10px 14px;
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.08);
  display: none;
}

.form-error.visible {
  display: block;
}

/* ==========================================================================
   Responsive — Tablet  (≤ 768px)
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --nav-height: 72px;
    --section-space: 64px;
  }

  nav {
    padding: 16px 24px;
  }

  /* Hide desktop links and CTA; show hamburger */
  .nav-links,
  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-actions {
    margin-left: auto;
  }

  .container {
    padding: 0 24px;
  }

  /* Hero text fills full width on mobile */
  .hero-text {
    max-width: 100%;
  }

  /* Stack grids to single column */
  .services-grid,
  .stats,
  .testimonials {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 40px 1fr;
    gap: 18px;
    padding: 24px 20px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-block {
    margin-top: 28px;
    padding: 40px 22px 30px;
  }

  .contact-shell {
    padding: 30px 22px;
  }

  /* Stack paired form fields vertically */
  .contact-row {
    grid-template-columns: 1fr;
  }

  .terms-wrap {
    padding: 30px 24px 64px;
  }
}

/* ==========================================================================
   Responsive — Mobile  (≤ 480px)
   ========================================================================== */

@media (max-width: 480px) {
  :root {
    --nav-height: 68px;
    --section-space: 56px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 14px;
  }

  .step-num {
    font-size: 28px;
  }

  .terms-wrap {
    padding: 24px 20px 56px;
  }
}
