/* ============================================================
   Global Styles — Nimrod Sound
   Fonts, base, nav, footer, buttons, shared utilities
   ============================================================ */

/* ----------------------------------------------------------
   @font-face — self-hosted variable fonts
   ---------------------------------------------------------- */

@font-face {
  font-family: 'Funnel Display';
  src: url('../fonts/FunnelDisplay-VariableFont_wght.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('../fonts/Figtree-VariableFont_wght.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('../fonts/Figtree-Italic-VariableFont_wght.woff2') format('woff2');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}


/* ----------------------------------------------------------
   Base
   ---------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--color-cream);
  color: var(--color-black);
}

/* Offset anchor targets so fixed nav doesn't cover them */
[id] {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}


/* ----------------------------------------------------------
   Layout helpers
   ---------------------------------------------------------- */

/* Content-width inner container — used inside full-bleed sections */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-page-x);
}


/* ----------------------------------------------------------
   Navigation
   ---------------------------------------------------------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-black);
  display: flex;
  align-items: center;
  padding-inline: var(--space-page-x);
  gap: var(--space-lg);
  z-index: var(--z-nav);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo .logo-img {
  height: 26px;
  width: auto;
  display: block;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: 0.9375rem;
  color: var(--color-cream);
}

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

.nav-links a[aria-current="page"] {
  color: var(--color-overdrive);
}

/* Nav CTA button */
.nav-cta {
  flex-shrink: 0;
}

/* Hamburger — hidden on desktop */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
}

/* Mobile overlay — hidden by default */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-black);
  z-index: var(--z-overlay);
  flex-direction: column;
  justify-content: center;
  padding-inline: var(--space-page-x);
  padding-top: var(--nav-height);
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-mobile a {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: clamp(2rem, 10vw, 3.5rem);
  color: var(--color-white);
  line-height: 1;
}

.nav-mobile a:hover {
  color: var(--color-overdrive);
}

.nav-mobile a[aria-current="page"] {
  color: var(--color-overdrive);
}

/* Close button inside mobile overlay */
.nav-mobile-close {
  position: absolute;
  top: calc((var(--nav-height) - 32px) / 2);
  right: var(--space-page-x);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.5rem;
  line-height: 1;
}

/* Mobile nav email + social */
.nav-mobile-footer {
  margin-top: auto;
  padding-bottom: var(--space-xl);
}

.nav-mobile-footer a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-white);
  opacity: 0.6;
}

/* Responsive: switch to hamburger below 768px */
@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    /* Keep the CTA visible on mobile */
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
  }

  .nav-burger {
    display: flex;
    margin-left: var(--space-md);
  }
}


/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */

.site-footer {
  background: var(--color-black);
  color: var(--color-white);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
  padding-inline: var(--space-page-x);
}

.footer-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2xl);
  padding-bottom: var(--space-xl);
}

/* Left: logo, email, socials */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo .logo-img {
  height: 22px;
  width: auto;
  display: block;
}

.footer-email {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-white);
  opacity: 0.7;
}

.footer-email:hover {
  opacity: 1;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xs);
}

.footer-social a {
  color: var(--color-white);
  opacity: 0.7;
  display: flex;
  align-items: center;
}

.footer-social a:hover {
  opacity: 1;
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* Right: nav links */
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: right;
}

.footer-nav a {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--weight-medium);
  color: var(--color-white);
  opacity: 0.7;
}

.footer-nav a:hover {
  opacity: 1;
}

/* Copyright */
.footer-copyright {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.8125rem;
  color: var(--color-white);
  opacity: 0.4;
}

/* Footer responsive */
@media (max-width: 767px) {
  .footer-inner {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .footer-nav {
    text-align: left;
    flex-direction: row;
    gap: var(--space-lg);
  }
}


/* ----------------------------------------------------------
   Button system

   Usage:
     <a href="..." class="btn btn--orange">Label <svg class="btn__arrow">…</svg></a>

   Variants:
     btn--orange      Orange fill, black text     (cream/light bg)
     btn--dark        Black fill, orange text     (dark bg)
     btn--dark-teal   Black fill, teal text+border (teal bg)
     btn--outline     Orange border, orange text  (cream bg, secondary)
   ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: 0.9375rem;
  line-height: 1;
  white-space: nowrap;
  /* No border-radius — rectangular per design */
  border-radius: 0;
  border: 2px solid transparent;
  cursor: pointer;
}

/* Arrow icon inside button */
.btn__arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Orange fill — primary on light backgrounds */
.btn--orange {
  background: var(--color-overdrive);
  border-color: var(--color-overdrive);
  color: var(--color-black-pure);
}

.btn--orange:hover {
  background: #d06b28;
  border-color: #d06b28;
}

/* Dark/black fill with orange text — on dark backgrounds */
.btn--dark {
  background: var(--color-black);
  border-color: var(--color-overdrive);
  color: var(--color-overdrive);
}

.btn--dark:hover {
  background: var(--color-overdrive);
  color: var(--color-black-pure);
}

/* Dark fill, teal text+border — on teal/Tube Streamer backgrounds */
.btn--dark-teal {
  background: var(--color-black);
  border-color: var(--color-tube-streamer);
  color: var(--color-tube-streamer);
}

.btn--dark-teal:hover {
  background: var(--color-tube-streamer);
  color: var(--color-black-pure);
}

/* Outline — orange border, transparent bg */
.btn--outline {
  background: transparent;
  border-color: var(--color-overdrive);
  color: var(--color-overdrive);
}

.btn--outline:hover {
  background: var(--color-overdrive);
  color: var(--color-black-pure);
}

/* Outline cream — transparent bg, cream border+text; for use on coloured backgrounds */
.btn--outline-cream {
  background: transparent;
  border-color: var(--color-cream);
  color: var(--color-cream);
}

.btn--outline-cream:hover {
  background: var(--color-cream);
  color: var(--color-black-pure);
}

/* Cream fill — on dark backgrounds */
.btn--cream {
  background: var(--color-cream);
  border-color: var(--color-cream);
  color: var(--color-black-pure);
}

.btn--cream:hover {
  background: var(--color-white);
  border-color: var(--color-white);
}

/* Size modifier — compact for nav */
.btn--sm {
  padding: 0.4375rem 0.875rem;
  font-size: 0.875rem;
}
.btn--sm .btn__arrow {
  width: 14px;
  height: 14px;
}


/* ----------------------------------------------------------
   Shared section utilities
   ---------------------------------------------------------- */

/* Standard vertical section padding */
.section-pad {
  padding-block: var(--space-section-y);
}

/* Page hero bands (Services / Work / About) */
.page-hero {
  position: relative;
  overflow: hidden;
  height: clamp(180px, 22vw, 280px);
  display: flex;
  align-items: flex-end;
  padding-inline: var(--space-page-x);
  /* Account for fixed nav */
  padding-top: var(--nav-height);
}

.page-hero__title {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  /* Size scales so the word bleeds off the right edge at certain widths */
  font-size: clamp(4rem, 15vw, 13rem);
  line-height: 0.88;
  white-space: nowrap;
  /* Push bottom of letters just below section edge */
  margin-bottom: -0.1em;
  padding-bottom: 0.1em;
  color: currentColor;
}

/* Colour variants for page heroes */
.page-hero--overdrive {
  background: var(--color-overdrive);
  color: var(--color-white);
}

.page-hero--slate {
  background: var(--color-deep-slate);
  color: var(--color-white);
}

.page-hero--teal {
  background: var(--color-tube-streamer);
  color: var(--color-black-pure);
}

/* Section headings — large display style used across all pages */
.section-heading {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: clamp(3.5rem, 12vw, 11rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  /* Prevent parent overflow:hidden from clipping descenders at tight line-height */
  padding-bottom: 0.12em;
}

/* Work tile — used in both carousel (home) and grid (work page) */
.work-tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-deep-slate);
}

.work-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.3) 45%,
    transparent 70%
  );
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

.work-tile:hover .work-tile__overlay,
.work-tile.is-active .work-tile__overlay {
  opacity: 1;
}

.work-tile__accent {
  width: 2.5rem;
  height: 2px;
  background: var(--color-tube-streamer);
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.work-tile__client {
  display: block;
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-white);
  opacity: 0.75;
  margin-bottom: 0.2rem;
}

.work-tile__project {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 1rem;
  color: var(--color-tube-streamer);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.work-tile__type {
  display: block;
  font-size: 0.75rem;
  color: var(--color-white);
  opacity: 0.8;
}
