/* ============================================================
   Case Study Page Styles
   Shared across all /portfolio/*.html pages
   ============================================================ */

/* Self-hosted fonts — latin + latin-ext subsets only */
@font-face {
  font-family: 'Grenze';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/grenze-latin-ext-italic-300.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grenze';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/grenze-latin-italic-300.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Grenze';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/grenze-latin-ext-normal-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grenze';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/grenze-latin-normal-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Grenze';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/grenze-latin-ext-normal-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grenze';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/grenze-latin-normal-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-normal-300.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/inter-latin-normal-300.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-normal-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-normal-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-normal-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin-normal-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-normal-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-normal-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Variables, reset, base
   ============================================================ */
:root {
  --bg:          #010612;
  --bg-deep:     #000308;
  --ink:         #f0faff;
  --muted:       rgba(210,240,255,.75);
  --cyan:        #9ffcff;
  --ice:         #dff7ff;
  --border:      rgba(255,255,255,.1);
  --font-serif:  'Grenze', serif;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg-deep);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Static aurora gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(159,252,255,0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 25%, rgba(100,180,230,0.08), transparent 60%),
    radial-gradient(ellipse 80% 40% at 50% 85%, rgba(60,140,200,0.06), transparent 60%),
    linear-gradient(180deg, #010612 0%, #020a1a 50%, #010815 100%);
  z-index: -2;
  pointer-events: none;
}

/* Subtle starfield */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(159,252,255,0.6), transparent),
    radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 10% 60%, rgba(159,252,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 45% 45%, rgba(255,255,255,0.4), transparent);
  background-size: 1200px 1200px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

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

::selection { background: var(--cyan); color: var(--bg); }

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--cyan);
  color: var(--bg);
  padding: 8px 16px;
  z-index: 9999;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-radius: 4px;
}
.skip-link:focus { top: 8px; }

/* ============================================================
   Navigation
   ============================================================ */
.nav-header {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-container {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1100px, calc(100vw - 60px));
  padding: 14px 28px;
  background: rgba(1,6,18,0.75);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-brand { display: block; line-height: 0; }
.nav-logo { height: 44px; width: auto; }
.nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-link { color: var(--muted); transition: color 0.3s; }
.nav-link:hover { color: var(--cyan); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ice);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ============================================================
   Case study layout
   ============================================================ */
.case-study {
  max-width: 960px;
  margin: 0 auto;
  padding: 140px 32px 80px;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 0;
  margin-bottom: 48px;
  transition: color 0.3s, gap 0.3s;
}
.case-back:hover { color: var(--cyan); gap: 14px; }
.case-back svg { width: 14px; height: 14px; }

.case-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
  opacity: 0.9;
}

.case-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ice);
  margin-bottom: 48px;
}

.case-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 56px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
  aspect-ratio: 16 / 9;
  background: #01050f;
}
.case-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video hero — YouTube embed link */
.case-hero-video {
  position: relative;
  display: block;
  cursor: pointer;
}
.case-hero-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(1,6,18,0.6) 100%);
  pointer-events: none;
}
.case-hero-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--ice);
}
.case-hero-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(159,252,255,0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(159,252,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.case-hero-video:hover .case-hero-play-btn {
  background: var(--cyan);
  transform: scale(1.1);
}
.case-hero-play-btn svg {
  width: 28px;
  height: 28px;
  fill: var(--ice);
  margin-left: 4px;
  transition: fill 0.3s;
}
.case-hero-video:hover .case-hero-play-btn svg { fill: var(--bg); }
.case-hero-play-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.9;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 28px 0;
  margin-bottom: 48px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.case-meta-item { display: flex; flex-direction: column; gap: 6px; }
.case-meta-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.8;
}
.case-meta-value {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ice);
  line-height: 1.4;
}

.case-desc {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 56px;
}
.case-desc p + p { margin-top: 1.1em; }

.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 80px;
}
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid rgba(159,252,255,0.25);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ice);
  background: rgba(159,252,255,0.04);
  transition: all 0.3s;
}
.case-link:hover {
  background: rgba(159,252,255,0.12);
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}
.case-link svg { width: 14px; height: 14px; }

/* Prev / Next navigation */
.case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.case-nav-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(1,6,18,0.35);
  transition: all 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.case-nav-link:hover {
  background: rgba(159,252,255,0.05);
  border-color: rgba(159,252,255,0.3);
  transform: translateY(-3px);
}
.case-nav-link.next { text-align: right; align-items: flex-end; }
.case-nav-direction {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.85;
}
.case-nav-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ice);
  line-height: 1.25;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 32px 60px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  max-width: 960px;
  margin: 0 auto;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 0.6rem;
}
.footer-logo { height: 22px; width: auto; opacity: 0.6; }
.back-to-top {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  transition: color 0.3s;
}
.back-to-top:hover { color: var(--cyan); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .case-study { padding: 120px 20px 60px; }
  .case-back { margin-bottom: 32px; }
  .case-title { margin-bottom: 36px; }
  .case-hero { margin-bottom: 40px; border-radius: 12px; }
  .case-meta { gap: 24px; padding: 22px 0; margin-bottom: 36px; }
  .case-desc { margin-bottom: 40px; }
  .case-links { margin-bottom: 60px; }
  .case-nav { grid-template-columns: 1fr; padding-top: 36px; }
  .case-nav-link.next { text-align: left; align-items: flex-start; }
  .nav-links { display: none; }
  .nav-container { width: calc(100vw - 32px); padding: 10px 20px; }
  .nav-logo { height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
