/* ═══════════════════════════════════════════════════════
   CAROLINA LORETO — SHARED STYLES
   Font: Syne (400/600/700/800) — no italics
═══════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --bg:    #0E0E0D;
  --bg2:   #171716;
  --bg3:   #1E1E1D;
  --txt:   #F2F0EC;
  --mid:   #7C7A76;
  --dim:   #3A3937;
  --bdr:   #252523;
  --acid:  #D4FF00;
  --font:  'Syne', Arial, sans-serif;

  --nav-h: 72px;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  cursor: none;
  overflow-x: hidden;
}
/* Force all elements to hide native cursor — custom JS cursor takes over */
*, *::before, *::after { cursor: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── GRAIN ──────────────────────────────────────────── */
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .025;
}

/* ── PROGRESS ───────────────────────────────────────── */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--acid);
  z-index: 10001;
}

/* ── CURSOR ─────────────────────────────────────────── */
#cur-dot {
  position: fixed;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acid);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
}
#cur-ring {
  position: fixed;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(242,240,236,.28);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .18s, height .18s, opacity .18s;
}
body.ch #cur-ring { width: 50px; height: 50px; opacity: .5; }

/* ── NAV ────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--nav-h);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .35s, border-color .35s;
}
nav.scrolled {
  background: rgba(14,14,13,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bdr);
}
.nav-logo {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color .2s;
}
.nav-links a:hover { color: var(--txt); }

/* ── SECTION LABEL ──────────────────────────────────── */
.label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--acid);
  flex-shrink: 0;
}

/* ── PLACEHOLDER BLOCK ──────────────────────────────── */
.ph {
  width: 100%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── BUTTON — PRIMARY ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--txt);
  color: var(--bg);
  font-family: var(--font);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 15px 30px;
  border: none;
  cursor: none;
  transition: background .2s, transform .25s;
}
.btn:hover { background: var(--acid); transform: translateY(-2px); }

/* ── BUTTON — GHOST ─────────────────────────────────── */
.btn-ghost {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mid);
  border-bottom: 1px solid var(--bdr);
  padding-bottom: 3px;
  transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--txt); border-color: var(--dim); }

.about-cta { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }

/* ── REVEAL ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .75s ease, transform .75s ease;
}
.reveal.on { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }

/* ── MARQUEE ────────────────────────────────────────── */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── FOOTER ─────────────────────────────────────────── */
footer {
  background: var(--acid);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bg); }
.footer-copy { font-size: .72rem; font-weight: 500; letter-spacing: .1em; color: rgba(14,14,13,.55); }


/* ══════════════════════════════════════════════════════
   CASE STUDY PAGE STYLES
══════════════════════════════════════════════════════ */

/* ── CS HERO ─────────────────────────────────────────── */
.cs-hero {
  padding-top: var(--nav-h);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 80px;
  padding-left: 48px;
  padding-right: 48px;
  position: relative;
  border-bottom: 1px solid var(--bdr);
}
.cs-hero-ph {
  position: absolute;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-back {
  position: absolute;
  top: calc(var(--nav-h) + 24px);
  left: 48px;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mid);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color .2s;
  z-index: 10;
}
.cs-back:hover { color: var(--txt); }
.cs-hero-content { position: relative; z-index: 10; }
.cs-num {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 20px;
}
.cs-hero h1 {
  font-size: clamp(2.6rem, 6vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -.02em;
  max-width: 900px;
  margin-bottom: 32px;
}
.cs-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.cs-meta-item { }
.cs-meta-key {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 4px;
}

/* ── CS META BAR (below hero) ───────────────────────── */
.cs-meta-bar {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--bdr);
}
.cs-meta-bar .cs-meta-item {
  padding: 32px 48px;
  border-right: 1px solid var(--bdr);
  flex: 1;
}
.cs-meta-bar .cs-meta-key {
  color: var(--acid);
  margin-bottom: 6px;
}
.cs-meta-bar .cs-meta-val {
  font-size: .88rem;
}
.cs-meta-val {
  font-size: .92rem;
  font-weight: 500;
  color: var(--txt);
}

/* ── CS OVERVIEW ────────────────────────────────────── */
.cs-overview {
  padding: 80px 48px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 80px;
  border-bottom: 1px solid var(--bdr);
}
.cs-overview-body {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--mid);
}
.cs-overview-body p + p { margin-top: 20px; }
.cs-sidebar { }
.cs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs-list li {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--mid);
  padding: 14px 18px;
  background: var(--bg2);
  border-left: 2px solid var(--bdr);
  transition: border-color .2s, color .2s;
}
.cs-list li:hover { border-color: var(--acid); color: var(--txt); }

/* ── CS SECTION HEADING ──────────────────────────────── */
.cs-section { padding: 80px 48px; border-bottom: 1px solid var(--bdr); }
.cs-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 40px;
}

/* ── CS DELIVERABLES GRID ────────────────────────────── */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.cs-grid .ph { aspect-ratio: 4/3; }

.cs-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.cs-grid-2col .ph { aspect-ratio: 16/9; }

/* ── CS CHALLENGE / SOLUTION ─────────────────────────── */
.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.cs-two-col h3 {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 16px;
}
.cs-two-col p {
  font-size: .9rem;
  font-weight: 400;
  color: var(--mid);
  line-height: 1.8;
}

/* ── CS RESULTS ──────────────────────────────────────── */
.cs-results {
  padding: 80px 48px;
  border-bottom: 1px solid var(--bdr);
}
.cs-results h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 48px;
}
.cs-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.cs-result-cell {
  background: var(--bg2);
  padding: 44px 36px;
}
.cs-result-num {
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 10px;
  color: var(--acid);
}
.cs-result-label {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ── CS NEXT PROJECT ─────────────────────────────────── */
.cs-next {
  padding: 80px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cs-next-label {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 12px;
}
.cs-next-title {
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
}
.cs-next-arrow {
  width: 56px; height: 56px;
  border: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.cs-next:hover .cs-next-arrow { border-color: var(--txt); background: var(--bg3); }
.cs-next-arrow svg { width: 18px; height: 18px; fill: none; stroke: var(--txt); stroke-width: 1.5; }


/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */

/* ── TOUCH DEVICES: restore cursor, hide custom one ──── */
@media (pointer: coarse) {
  body, *, *::before, *::after { cursor: auto !important; }
  #cur-dot, #cur-ring { display: none !important; }
}

/* ── HAMBURGER BUTTON (hidden on desktop) ────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--txt);
  transition: transform .3s, opacity .3s;
  pointer-events: none;
}
nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── TABLET — 1024px ─────────────────────────────────── */
@media (max-width: 1024px) {
  nav { padding: 0 24px; }
  .nav-links { gap: 20px; }
  footer { padding: 24px; }

  /* Case study pages */
  .cs-hero { padding-left: 24px; padding-right: 24px; }
  .cs-back { left: 24px; }
  .cs-meta-bar .cs-meta-item { padding: 24px; }
  .cs-overview { padding: 60px 24px; gap: 48px; }
  .cs-section { padding: 60px 24px; }
  .cs-results { padding: 60px 24px; }
  .cs-next { padding: 60px 24px; }
  .cs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── MOBILE — 768px ──────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav hamburger */
  .nav-toggle { display: flex; }
  nav { padding: 0 20px; }
  .nav-links {
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0 20px;
    background: rgba(14,14,13,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bdr);
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height .42s cubic-bezier(.23,1,.32,1), padding .42s;
  }
  nav.nav-open .nav-links {
    max-height: 500px;
    padding: 12px 20px 28px;
    pointer-events: all;
  }
  .nav-links li { border-bottom: 1px solid var(--bdr); }
  .nav-links a { display: block; padding: 14px 0; font-size: .86rem; }
  .nav-links .nav-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    border-bottom: none;
  }

  /* Footer */
  footer { flex-direction: column; gap: 8px; text-align: center; padding: 20px; }

  /* Case study pages */
  .cs-hero { min-height: 56vh; padding-left: 20px; padding-right: 20px; padding-bottom: 60px; }
  .cs-back { left: 20px; }
  .cs-meta-bar { flex-direction: column; }
  .cs-meta-bar .cs-meta-item {
    padding: 20px;
    border-right: none;
    border-bottom: 1px solid var(--bdr);
    flex: none;
  }
  .cs-overview { padding: 48px 20px; grid-template-columns: 1fr; gap: 40px; }
  .cs-section { padding: 48px 20px; }
  .cs-two-col { grid-template-columns: 1fr; gap: 32px; }
  .cs-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-results { padding: 48px 20px; }
  .cs-results-grid { grid-template-columns: 1fr; }
  .cs-next { padding: 48px 20px; flex-direction: column; align-items: flex-start; gap: 24px; }
  .cs-next-title { font-size: clamp(1.2rem, 6vw, 1.8rem); }
}

/* ── SMALL MOBILE — 480px ────────────────────────────── */
@media (max-width: 480px) {
  .cs-grid { grid-template-columns: 1fr; }
}

/* ── BROCHURE VIEWER (PDF flip-through) ──────────────── */
[data-brochure] { cursor: none; }
.bv {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.bv.open { opacity: 1; pointer-events: all; }
.bv-bg {
  position: absolute;
  inset: 0;
  background: rgba(8,8,7,.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.bv-content {
  position: relative;
  z-index: 1;
  width: min(92vw, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.bv-stage {
  position: relative;
  width: 100%;
  height: min(72vh, 780px);
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bv-canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  opacity: 0;
  transition: opacity .25s ease;
}
.bv-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mid);
  transition: opacity .25s ease;
}
.bv-info { text-align: center; }
.bv-title {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--txt);
}
.bv-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bv-btn {
  width: 44px; height: 44px;
  border: 1px solid var(--bdr);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, opacity .2s;
}
.bv-btn:hover { border-color: var(--txt); background: var(--bg2); }
.bv-btn:disabled { opacity: .3; pointer-events: none; }
.bv-btn svg { width: 14px; height: 14px; fill:none; stroke:var(--txt); stroke-width:1.5; }
.bv-counter {
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--dim);
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.bv-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: var(--dim);
  font-family: var(--font);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px;
  transition: color .2s;
}
.bv-close:hover { color: var(--txt); }

@media (max-width: 640px) {
  .bv-stage { height: 60vh; }
  .bv-close { top: -40px; }
}
