/* ============================================================
   GLOBAL STYLES  —  css/global.css
   Shared across every page: reset, nav, footer, buttons,
   preloader, cursor, color-bar, marquee, reveals.
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 200;
  letter-spacing: 0.08em;
  overflow-x: hidden;
  cursor: none;
}

/* noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9998;
}

/* ── PRELOADER ─────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.preloader-icon {
  width: 48px;
  height: 48px;
  animation: preloaderPulse 1.5s ease-in-out infinite;
}
.preloader-text {
  font-size: 9px;
  letter-spacing: 0.55em;
  color: var(--pastel-cyan);
  text-transform: uppercase;
}
.preloader-bar-wrap {
  width: 120px;
  height: 1px;
  background: rgba(106, 176, 176, 0.15);
  overflow: hidden;
}
.preloader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--cyan), var(--coral));
  animation: preloaderFill 0.75s ease forwards;
}

@keyframes preloaderPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50%       { opacity: 1;   transform: scale(1.05); }
}
@keyframes preloaderFill {
  to { width: 100%; }
}

/* ── CUSTOM CURSOR (hidden on touch via responsive.css) ───── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
  opacity: 0.6;
}

/* ── NAVIGATION ────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--section-x);
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,0.7), transparent);
  pointer-events: none;
}
nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
nav.scrolled::after { display: none; }

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}
.nav-logo-img {
  height: 30px;
  width: auto;
  filter: invert(1);
  display: block;
  max-width: 260px;
}
/* Legacy SVG icon (still used in preloader) */
.nav-logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 48px;
  list-style: none;
  position: relative;
  z-index: 1;
}
.nav-links a {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--pastel-cyan);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--coral);
  transition: width 0.4s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 601;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--white);
  transition: transform 0.4s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav backdrop */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 499;
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Mobile nav slide panel */
.nav-mobile-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--dark-mid);
  border-left: 1px solid var(--border-cyan);
  z-index: 600;
  padding: 96px 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.nav-mobile-panel.open { transform: translateX(0); }

.nav-panel-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.nav-panel-links a {
  font-size: 28px;
  font-weight: 100;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-panel-links a:hover { color: var(--cyan); }

.nav-panel-divider {
  height: 1px;
  background: var(--border-cyan);
}

.nav-panel-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-panel-contact a {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 245, 242, 0.4);
  text-decoration: none;
  transition: color 0.3s;
  word-break: break-all;
}
.nav-panel-contact a:hover { color: var(--cyan); }

.nav-panel-social {
  display: flex;
  gap: 20px;
  margin-top: auto;
}
.nav-panel-social a {
  font-size: 8px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(245, 245, 242, 0.35);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-panel-social a:hover { color: var(--cyan); }

/* ── COLOR BAR ─────────────────────────────────────────────── */
.color-bar {
  height: 3px;
  background: linear-gradient(
    to right,
    var(--cyan)        0%,
    var(--pastel-cyan) 40%,
    var(--coral)       70%,
    #c0695a            100%
  );
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn-primary {
  padding: 14px 40px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 200;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  transition: color 0.4s;
  position: relative;
  overflow: hidden;
  display: inline-block;
  cursor: pointer;
  background: none;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cyan);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn-primary:hover { color: var(--black); }
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary span { position: relative; z-index: 1; }

.btn-coral {
  padding: 14px 40px;
  border: 1px solid var(--coral);
  color: var(--coral);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 200;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  transition: color 0.4s;
  position: relative;
  overflow: hidden;
  display: inline-block;
  cursor: pointer;
  background: none;
}
.btn-coral::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--coral);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn-coral:hover { color: var(--black); }
.btn-coral:hover::before { transform: translateX(0); }
.btn-coral span { position: relative; z-index: 1; }

.btn-ghost {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 200;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.3s;
  cursor: pointer;
  background: none;
  border: none;
}
.btn-ghost:hover { opacity: 1; }

/* ── SECTION LABELS & TITLES ───────────────────────────────── */
.section-label {
  font-size: 8px;
  letter-spacing: 0.5em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.section-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--coral);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 100;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  max-width: 600px;
  margin-bottom: 80px;
}
.section-title em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--cyan);
}

/* Inner page hero (work, about, contact, case studies) */
.page-hero {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-height) + 80px) var(--section-x) 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-cyan);
}
.page-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(106,176,176,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106,176,176,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.page-hero-eyebrow {
  font-size: 9px;
  letter-spacing: 0.5em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
}
.page-hero-title {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 100;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 0.95;
  position: relative;
}
.page-hero-title em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--cyan);
}
.page-hero-sub {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(245, 245, 242, 0.4);
  margin-top: 28px;
  max-width: 480px;
  line-height: 1.8;
  position: relative;
}

/* ── MARQUEE ───────────────────────────────────────────────── */
.marquee-section {
  overflow: hidden;
  border-top: 1px solid var(--border-cyan);
  border-bottom: 1px solid var(--border-cyan);
  padding: 20px 0;
  background: rgba(106, 176, 176, 0.03);
}
.marquee-track {
  display: flex;
  gap: 80px;
  animation: marqueeScroll 25s linear infinite;
  white-space: nowrap;
}
.marquee-item {
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--pastel-cyan);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-shrink: 0;
}
.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
}
@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  padding: 80px var(--section-x) 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
  justify-items: center;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border-cyan);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.footer-logo-img {
  height: 28px;
  width: auto;
  max-width: 200px;
  filter: invert(1);
  opacity: 0.65;
  display: block;
  transition: opacity 0.3s;
}
.footer-logo-wrap:hover .footer-logo-img { opacity: 1; }
/* Legacy SVG (still used in case studies until updated) */
.footer-logo-icon { width: 24px; height: 24px; flex-shrink: 0; }
.footer-logo-text {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--pastel-cyan);
  text-transform: uppercase;
}
.footer-tagline {
  font-size: 11px;
  line-height: 1.9;
  color: rgba(245, 245, 242, 0.28);
  letter-spacing: 0.04em;
  max-width: 260px;
}
.footer-col-title {
  font-size: 8px;
  letter-spacing: 0.45em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.footer-col-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-col-links a {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(245, 245, 242, 0.32);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}
.footer-col-links a:hover { color: var(--cyan); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
}
.footer-copy {
  font-size: 8px;
  letter-spacing: 0.25em;
  color: rgba(245, 245, 242, 0.18);
}
.footer-social {
  display: flex;
  gap: 28px;
  list-style: none;
}
.footer-social a {
  font-size: 8px;
  letter-spacing: 0.35em;
  color: rgba(245, 245, 242, 0.28);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}
.footer-social a:hover { color: var(--cyan); }

/* ── SCROLL REVEAL ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ── SHARED SECTION PADDING ────────────────────────────────── */
section {
  padding: var(--section-y) var(--section-x);
}
