/* ============================
   Global Styles
============================ */
:root {
  --page-pad: clamp(12px, 3vmin, 32px);
  --content-max: 1200px;
  --img-max-w: 92vw;
  --img-max-h: 88vh;
  --radius: 16px;
  --bg-main: #18051f;
  --text-color: #f8f6ff;
  --accent: #29052d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-color);
  font-family: 'Orbitron', 'Rajdhani', 'Exo 2', sans-serif;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Intro */
#intro h1 {
  font-size: clamp(4rem, 10vw, 12rem);
  line-height: 1;
  font-weight: 900;
  text-align: center;
}

/* Section */
.section {
  padding: var(--page-pad);
  display: grid;
  place-items: center;
  min-height: 100vh;
}

/* Hero Images */
img.fit-window {
  display: block;
  max-width: min(var(--content-max), var(--img-max-w));
  max-height: var(--img-max-h);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
}

/* Framed hero */
.frame {
  width: min(var(--content-max), var(--img-max-w));
  height: var(--img-max-h);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 auto;
}

.frame > img.cover-window {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Navigation */
#site-nav {
  position: sticky;
  top: 0;
  background: rgba(19, 1, 28, 0.8);
  backdrop-filter: blur(8px);
  z-index: 10;
}

#site-nav nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 12px var(--page-pad);
}

a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--accent);
}

/* About section */
.section--about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(12px, 3vmin, 32px);
  align-items: center;
  max-width: min(var(--content-max), 96vw);
}

.section--about .about__text {
  max-width: 60ch;
}

.section--about .about__photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .section--about {
    grid-template-columns: 1fr;
  }
}

/* ============================
   Illustrations Grid
============================ */
.section--illustrations {
  width: 100%;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.section--illustrations h2 {
  margin-bottom: 2rem;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

/* Responsive Grid */
.illustrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  width: min(90vw, 1200px);
  margin: 0 auto;
}

.illustrations-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: #120217;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image scaling */
.illustrations-grid img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--radius);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.illustrations-grid img:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

/* Responsive columns */
@media (max-width: 900px) {
  .illustrations-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 600px) {
  .illustrations-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

/* ============================
   Videos carousel styles
   (moved from sections/videos.html)
============================ */
.section--videos { padding: 2rem 1rem; }
.section--videos .container { max-width: 1100px; margin: 0 auto; }
.section--videos h2 { margin: 0 0 0.75rem 0; font-size: 1.6rem; }

.carousel { position: relative; overflow: hidden; }
.carousel-track { display: flex; transition: transform 400ms cubic-bezier(.22,.96,.36,1); will-change: transform; }
.carousel-slide { min-width: 100%; box-sizing: border-box; padding: 0 0.5rem; }

.video-wrap { position: relative; width: 100%; padding-top: 56.25%; background: #000; overflow: hidden; border-radius: 6px; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.carousel-controls { position: absolute; top: 50%; left: 0; right: 0; display:flex; justify-content: space-between; transform: translateY(-50%); pointer-events:none; }
.carousel-button { pointer-events: all; background: rgba(255,255,255,0.9); border: 0; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin: 0 6px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.carousel-button svg { width: 18px; height: 18px; }

.carousel-caption { margin-top: 0.5rem; font-size: 0.95rem; color: #333; text-align: center; }

.carousel-dots { display:flex; gap:8px; justify-content:center; margin-top:0.75rem; }
.carousel-dot { width:10px; height:10px; border-radius:50%; background:#ddd; border:0; }
.carousel-dot.active { background:#333; }

@media (min-width: 700px) {
  .carousel-slide { min-width: 50%; }
}
@media (max-width: 420px) {
  .section--videos { padding: 1.2rem 0.6rem; }
  .section--videos h2 { font-size: 1.25rem; }
  .carousel-button { width:34px; height:34px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track { transition: none; }
}

/* DIGITALCALIPER font for intro title */
@font-face {
  font-family: 'DIGITALCALIPER';
  src: url('../fonts/DIGITALCALIPER.woff2') format('woff2'),
       url('../fonts/DIGITALCALIPER.woff') format('woff'),
       url('../fonts/DIGITALCALIPER.ttf') format('truetype'),
       url('../fonts/DIGITALCALIPER.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Apply only to the intro hero title */
#intro .hero-title {
  font-family: 'DIGITALCALIPER', 'Orbitron', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  letter-spacing: 0.04em;
}
