/* ============================================================
   CHRIS MACKLER — Design System & Global Styles
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  --bg-primary:     #0a0a0a;
  --bg-secondary:   #141414;
  --bg-tertiary:    #1e1e1e;
  --text-primary:   #f0f0f0;
  --text-secondary: #a0a0a0;
  --accent:         #e63946;
  --accent-dim:     #c1121f;
  --border:         #2a2a2a;
  --white:          #ffffff;

  --font-display:  'Bebas Neue', sans-serif;
  --font-body:     'Inter', sans-serif;

  --nav-height:    72px;
  --max-width:     1400px;
  --section-gap:   120px;
  --radius:        4px;

  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul { list-style: none; }

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-bottom 0.4s ease;
}

.site-nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--white);
  transition: color 0.2s;
}
.nav-logo span {
  color: var(--accent);
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(12px);
  padding: 32px 40px;
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  gap: 24px;
  z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.hero-left {
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 80px 80px 80px;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(72px, 8vw, 130px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 0.9s var(--ease-out) 0.35s forwards;
}

.hero-title .accent-line {
  color: var(--accent);
  display: block;
}

.hero-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.8;
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeInUp 0.9s var(--ease-out) 0.5s forwards;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.9s var(--ease-out) 0.65s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.hero-right {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
}

.hero-image-wrap {
  position: absolute;
  inset: 0;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  animation: heroScale 1.4s var(--ease-out) forwards;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg-primary) 0%, transparent 30%);
}

/* Accent bar */
.hero-accent-bar {
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  animation: fadeIn 1s ease 0.8s forwards;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeIn 1s ease 1.2s forwards;
}
.hero-scroll-hint::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
}

/* ============================================================
   DUAL IDENTITY SECTION
   ============================================================ */
.dual-identity {
  padding: var(--section-gap) 0;
}

.dual-identity .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.identity-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  text-decoration: none;
}

.identity-card-bg {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  transition: transform 0.7s var(--ease-out);
}

.identity-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transition: opacity 0.5s ease, transform 0.7s var(--ease-out);
}

.identity-card:hover .identity-card-bg img {
  opacity: 0.6;
  transform: scale(1.04);
}

.identity-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.2) 60%, transparent 100%);
}

.identity-card-content {
  position: relative;
  z-index: 2;
}

.identity-card-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.identity-card-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 72px);
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 16px;
}

.identity-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.identity-card:hover .identity-card-desc {
  opacity: 1;
  transform: translateY(0);
}

.identity-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s;
}
.identity-card-arrow::after {
  content: '→';
  font-size: 16px;
}
.identity-card:hover .identity-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   FEATURED WORK
   ============================================================ */
.featured-work {
  padding: var(--section-gap) 0;
  background: var(--bg-secondary);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
}

.section-header-left {}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 64px);
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--white);
}

.section-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s;
}
.section-link::after { content: '→'; font-size: 16px; }
.section-link:hover { gap: 12px; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.work-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-tertiary);
  cursor: pointer;
}

.work-item--tall { grid-row: span 2; aspect-ratio: unset; }

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), opacity 0.3s ease;
}

.work-item:hover img {
  transform: scale(1.05);
}

.work-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0);
  transition: background 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.work-item:hover .work-item-overlay {
  background: rgba(10,10,10,0.72);
}

.work-item-info {
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.35s ease;
}

.work-item:hover .work-item-info {
  transform: translateY(0);
  opacity: 1;
}

.work-item-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.work-item-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--white);
}

/* ============================================================
   CREDENTIALS
   ============================================================ */
.credentials {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.credentials-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.credentials-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 56px 72px;
}

.credential-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.55;
  transition: opacity 0.25s;
  cursor: default;
}

.credential-item:hover { opacity: 1; }

.credential-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.credential-role {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  padding: var(--section-gap) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: 'COLLABORATE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 220px);
  letter-spacing: 0.04em;
  color: var(--bg-secondary);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.cta-banner .container { position: relative; z-index: 1; }

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 96px);
  letter-spacing: 0.03em;
  color: var(--white);
  margin-bottom: 20px;
}

.cta-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 44px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-logo:hover { color: var(--white); }

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--accent); }

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

.footer-social a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--white); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #444;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

/* ============================================================
   PAGE HEADERS (inner pages)
   ============================================================ */
.page-header {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-header-bg-text {
  position: absolute;
  top: 50%;
  left: -0.03em;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(100px, 18vw, 280px);
  letter-spacing: 0.02em;
  color: var(--bg-secondary);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.page-header .container { position: relative; z-index: 1; }

.page-header-title {
  font-family: var(--font-display);
  font-size: clamp(64px, 9vw, 120px);
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 1;
}

.page-header-sub {
  margin-top: 20px;
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.8;
}

/* ── Page header with full-bleed image background ── */
.page-header-img-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.page-header-img-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.45;
}
.page-header-img-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,10,10,0.97) 0%,
    rgba(10,10,10,0.82) 40%,
    rgba(10,10,10,0.45) 100%
  );
}

/* ── Marketing page email collage ── */
.page-header-collage {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 58%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.page-header-collage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(to right, var(--bg-primary) 0%, rgba(10,10,10,0.15) 55%);
}
.page-header-collage .collage-email {
  position: absolute;
  width: 185px;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  opacity: 0.5;
}
.page-header-collage .collage-email:nth-child(1) {
  top: 8%; left: 4%;
  transform: rotate(-5deg);
}
.page-header-collage .collage-email:nth-child(2) {
  top: 20%; left: 35%;
  transform: rotate(3deg);
  z-index: 2;
}
.page-header-collage .collage-email:nth-child(3) {
  top: 40%; left: 56%;
  transform: rotate(-2deg);
  z-index: 1;
}

/* Ensure text elements layer above image bgs */
.page-header-bg-text { z-index: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --section-gap: 80px; }
  .container { padding: 0 32px; }
  .hero-left { padding: 120px 48px 80px 48px; }
  .hero-scroll-hint { left: 48px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .hero { flex-direction: column; height: auto; min-height: 100vh; }
  .hero-left { flex: none; padding: 120px 20px 48px; }
  .hero-right { flex: none; height: 50vw; min-height: 280px; }
  .hero-right .hero-image-overlay { background: linear-gradient(to bottom, transparent 40%, var(--bg-primary) 100%); }
  .hero-scroll-hint { display: none; }

  .dual-identity .container { grid-template-columns: 1fr; }
  .identity-card { aspect-ratio: 3/2; padding: 32px 24px; }
  .identity-card-desc { opacity: 1; transform: none; }
  .identity-card-arrow { opacity: 1; transform: none; }

  .work-grid { grid-template-columns: 1fr 1fr; }
  .work-item--tall { grid-row: auto; aspect-ratio: 4/3; }
  .work-item-info { opacity: 1; transform: none; }
  .work-item-overlay { background: rgba(10,10,10,0.5); }

  .section-header { flex-direction: column; align-items: flex-start; gap: 16px; }

  .credentials-grid { gap: 36px 48px; }

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

  /* On mobile, hide collage (too busy) and simplify image bg gradient */
  .page-header-collage { display: none; }
  .page-header-img-bg::after {
    background: rgba(10,10,10,0.85);
  }
}

@media (max-width: 480px) {
  .work-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .btn { justify-content: center; }
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes heroScale {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}
