/* ==========================================================================
   UPD8 GROUP — styles.css
   Dark editorial theme · Space Grotesk (headings) + Inter (body)
   ========================================================================== */


/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  /* Colour palette */
  --bg:           #0a0a0b;         /* near-black page background */
  --surface:      #111113;         /* slightly lifted surface */
  --surface-2:    #18181b;         /* deeper raised element */
  --border:       #1e1e22;         /* subtle dividers */
  --text:         #f0f0ef;         /* primary text — near-white */
  --text-2:       #8a8a8a;         /* secondary / supporting text */
  --text-3:       #50505a;         /* muted / label text */

  /* Accent: indigo-400 — restrained, editorial, one colour only */
  --accent:       #818cf8;
  --accent-hover: #6875f5;
  --accent-dim:   rgba(129, 140, 248, 0.10);
  --accent-ring:  rgba(129, 140, 248, 0.28);

  /* Typography */
  --font-heading: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --max-w:        1280px;
  --gutter:       clamp(1.5rem, 5vw, 4rem);
  --section-pad:  clamp(5rem, 10vw, 9rem);

  /* Motion */
  --ease:         cubic-bezier(0.25, 0.1, 0.25, 1);
  --fast:         0.15s;
  --mid:          0.25s;

  /* Misc */
  --radius:       6px;
  --header-h:     68px;
}


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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  line-height: 1;
}

blockquote { font-style: normal; }

figure { margin: 0; }


/* ── Accessibility ───────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

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


/* ── Scroll-reveal ───────────────────────────────────────────────────────── */
/*
  Elements with .reveal start invisible and slide up when they enter
  the viewport. JS adds .is-visible via IntersectionObserver.
  prefers-reduced-motion: skip animation, show immediately.
*/
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity   0.65s var(--ease),
      transform 0.65s var(--ease);
  }

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}


/* ── Base typography ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}


/* ── Wordmark ─────────────────────────────────────────────────────────────── */
/*
  Pure typographic wordmark — no icon, no symbol.
  UPD8 (700 bold) + GROUP (300 light). All caps. Positive letter-spacing.
  The 8 is a standard character — no special treatment.
*/
.wordmark {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  transition: color var(--mid) var(--ease);
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  line-height: 1;
}

.wordmark:hover,
.wordmark:focus-visible { color: var(--accent); }

.wordmark-upd8  { font-weight: 700; }
.wordmark-group { font-weight: 300; }

.wordmark--sm { font-size: 0.875rem; }


/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background-color var(--mid) var(--ease),
    color            var(--mid) var(--ease),
    border-color     var(--mid) var(--ease),
    box-shadow       var(--mid) var(--ease),
    transform        var(--fast) var(--ease);
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}


/* ── Section containers ──────────────────────────────────────────────────── */
.section-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter);
}

.section-header { margin-bottom: 3rem; }

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0;
}

.section-intro {
  max-width: 540px;
  margin-top: 0.875rem;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.7;
}


/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--mid) var(--ease);
}

.header-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Desktop nav */
.main-nav { display: flex; align-items: center; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-2);
  transition: color var(--mid) var(--ease);
  padding: 0.25rem 0;
}

.main-nav a:hover,
.main-nav a:focus-visible { color: var(--text); }

.main-nav .nav-cta { color: var(--accent); font-weight: 500; }
.main-nav .nav-cta:hover { color: var(--accent-hover); }

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  z-index: 201;
  border-radius: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform var(--mid) var(--ease),
    opacity   var(--mid) var(--ease);
}

/* Open state — animates to ✕ */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile nav ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {

  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 11, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 199;
    align-items: center;
    justify-content: center;
  }

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

  .main-nav ul {
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
  }

  .main-nav a {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.02em;
  }
}


/* ==========================================================================
   HERO — static full-bleed background image
   ========================================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background image layer */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Subtle scale for a settled, weighted feel */
  transform: scale(1.01);
}

/* Dark gradient overlay — ensures text is always legible */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 11, 0.42) 0%,
    rgba(10, 10, 11, 0.20) 45%,
    rgba(10, 10, 11, 0.68) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Hero text content — centred, above gradient */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--header-h) var(--gutter) 5rem;
  width: 100%;
}

/* Hero wordmark — statement scale */
.hero-wordmark {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 9vw, 7rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.25rem;
  line-height: 1;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.4);
}

/* Tagline below wordmark */
.hero-manifesto {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.2vw, 1.55rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.hero-ctas {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  justify-content: center;
}


/* ==========================================================================
   MANIFESTO PANELS — Safari-style full-bleed image sections
   ========================================================================== */

/*
  Each panel is a full-viewport-height section with its own background image.
  A ::before overlay darkens the image so the text stays readable.
  .manifesto-inner holds the text and gets the reveal animation.
*/
.manifesto-panel {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Dark overlay — sits between image and text */
.manifesto-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 0;
}

/* Text container — constrained width, above overlay */
.manifesto-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) var(--gutter);
}

/* Statement text */
.manifesto-text {
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 4.2vw, 3.4rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 980px;
  font-style: normal;
}

/* Panel 3: UPD8's defining line — most visual weight */
.manifesto-panel--defining::before {
  /* Slightly lighter overlay — the bolder type carries the weight */
  background: rgba(0, 0, 0, 0.55);
}

.manifesto-panel--defining .manifesto-text {
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 700;
}


/* ==========================================================================
   WORK / PORTFOLIO
   ========================================================================== */
.work { border-top: 1px solid var(--border); }

/* 1px gaps filled with border colour — clean edge-to-edge card layout */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-card {
  background: var(--bg);
  overflow: hidden;
  transition: background var(--mid) var(--ease);
  display: flex;
  flex-direction: column;
}

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

/* Card thumbnail */
.card-thumb-link { display: block; }

.card-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(129,140,248,0.05) 0%, transparent 60%);
}

.card-thumb--dev { opacity: 0.7; }

.card-thumb-label {
  font-family: var(--font-body);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  position: relative;
}

/* Card body */
.card-body {
  padding: 1.5rem 1.5rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

/* Status badges */
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  line-height: 1.4;
}

.badge--live {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-ring);
}

.badge--dev {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
}

/* Tag chips */
.tag {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.tag::before { content: '#'; }

/* Card title */
.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card-title a { color: var(--text); transition: color var(--mid) var(--ease); }
.card-title a:hover { color: var(--accent); }

.link-arrow {
  display: inline-block;
  font-style: normal;
  opacity: 0.45;
  font-size: 0.85em;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.card-title a:hover .link-arrow { opacity: 1; transform: translate(2px, -2px); }

/* Card description */
.card-desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-top: auto;
  padding-top: 0.4rem;
}


/* ==========================================================================
   PHOTOGRAPHY
   ========================================================================== */
.photography { border-top: 1px solid var(--border); }

/* Responsive 3-col grid — collapses on smaller screens */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 2rem;
}

@media (max-width: 760px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .photo-grid { grid-template-columns: 1fr; } }

.photo-item { overflow: hidden; border-radius: 2px; }

/* Aspect ratio modifiers */
.photo-item--tall   { aspect-ratio: 3 / 4; }
.photo-item--wide   { aspect-ratio: 4 / 3; }
.photo-item--square { aspect-ratio: 1 / 1; }

/* Real image (once placeholders are replaced) */
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

/* Placeholder — dark surface */
.photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  transition: transform 0.5s var(--ease);
}

.photo-item:hover img,
.photo-item:hover .photo-placeholder { transform: scale(1.025); }


/* ==========================================================================
   SERVICES
   ========================================================================== */
.services {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 3rem 4rem;
}

.service-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.service-item p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}


/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { border-top: 1px solid var(--border); }

.about-body {
  max-width: 660px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-body p { font-size: 1rem; color: var(--text-2); line-height: 1.8; }
.about-body p:first-child { font-size: 1.1rem; color: var(--text); }


/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Opening statement — fixed copy */
.contact-opener {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 620px;
  color: var(--text);
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

/* Two-column layout: form + aside */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 5rem;
  align-items: start;
}

@media (max-width: 840px) {
  .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
}

/* Honeypot — visually hidden, stays in DOM for Netlify */
.bot-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

/* Form groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.form-group label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.form-group input,
.form-group textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-3); }

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.form-group textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

.btn-submit { width: 100%; padding-top: 0.85rem; padding-bottom: 0.85rem; }

/* Status messages */
.form-success {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid var(--accent-ring);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.9rem;
}

.form-error {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: var(--radius);
  color: #f87171;
  font-size: 0.9rem;
}

/* Contact aside */
.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.25rem;
}

.contact-aside-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.contact-email {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent);
  word-break: break-all;
  transition: color var(--mid) var(--ease);
}
.contact-email:hover { color: var(--accent-hover); }

.contact-location {
  font-size: 0.85rem;
  color: var(--text-3);
  line-height: 1.65;
  margin-top: 0.5rem;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.25rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 1.75rem; flex-wrap: wrap; }

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
  transition: color var(--mid) var(--ease);
}
.footer-links a:hover { color: var(--text-2); }

.footer-copy { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }

@media (max-width: 520px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}
