/* ---------- Tokens ---------- */
:root {
  --space-1:.5rem; --space-2:1rem; --space-3:1.5rem; --space-4:2rem; --space-6:3rem;
  --maxw:1100px;

  --gold:#ffdd57; 
  --pink:#b06cff;   /* slightly bluer magenta for the new scheme */
  --teal:#6fd3ff;   /* cooler accent pairs well with blues/purples */

  /* deep indigo + purple-black (used by sub-hero/footer) */
  --ink:#0e0a3a;    /* was #0d0d2b */
  --space:#120024;  /* was #000010 */
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background:
    radial-gradient(1000px 600px at 25% 10%, rgba(90,110,255,0.5) 0%, rgba(30,20,120,0.1) 60%),
    radial-gradient(900px 700px at 75% 80%, rgba(140,90,255,0.35) 0%, rgba(40,0,100,0.05) 65%),
    linear-gradient(to bottom, #1a1448 0%, #0d0a2b 100%);
  background-attachment: fixed, fixed, fixed;
}

/* Page wrapper: footer sits at bottom only when content is short */
.page { min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: .6rem; }
.logo { font-weight: 800; color: var(--gold); text-decoration: none; text-shadow: 0 0 8px var(--gold); }
.nav-links { display: flex; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 700; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

/* ---------- Hero (content-driven; no vh/min-height) ---------- */

/* ---------- Sub-hero for detail pages ---------- */
.sub-hero {
  position: relative;
  padding: 2rem 0 2.5rem;
  background: linear-gradient(180deg, rgba(13,13,43,.9), rgba(0,0,16,.95));
}
.sub-hero-content h1 {
  margin: .25rem 0 .5rem;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold);
}
.crumbs { margin: 0; color: #b8c7ff; opacity: .9; }
.crumbs a { color: #e8f0ff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Machine detail layout ---------- */
.machine-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;  /* gallery a bit wider */
  gap: 2.5rem;
  align-items: start;
}

/* Gallery */
.gallery-stage {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(255,221,87,.25);
  background: rgba(255,255,255,.04);
}
.gallery-stage img {
  display: block; width: 100%; height: 420px; object-fit: cover;
}
.thumbs {
  margin-top: .75rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
}
.thumbs img {
  width: 100%; height: 90px; object-fit: cover; display: block; border-radius: 10px;
  opacity: .9; cursor: pointer; transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.thumbs img:hover { transform: translateY(-2px); opacity: 1; }
.thumbs img.active { outline: 2px solid var(--teal); box-shadow: 0 0 12px rgba(0,230,255,.6); }

/* Details block */
.machine-details p { line-height: 1.7; }
.badges { display: flex; gap: .5rem; margin-bottom: .75rem; }
.badge {
  display: inline-block; padding: .35rem .6rem; border-radius: 999px; font-weight: 700;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
}
.badge-teal { background: rgba(0,230,255,.15); border-color: rgba(0,230,255,.35); }

.specs { margin: 1rem 0; padding-left: 1.1rem; }
.specs li { margin: .4rem 0; }

.callouts { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1.25rem; }
.pill {
  display: inline-block; padding: .45rem .75rem; border-radius: 999px;
  background: rgba(255,119,255,.15); border: 1px solid rgba(255,119,255,.35);
}

/* Align CTA neatly */
.cta-row { margin-top: .5rem; }

/* Responsive */
@media (max-width: 992px) {
  .machine-grid { grid-template-columns: 1fr; }
  .gallery-stage img { height: 360px; }
}
@media (max-width: 600px) {
  .thumbs img { height: 78px; }
  .gallery-stage img { height: 300px; }
}

.hero {
  position: relative;
  padding: 2rem 0 1rem;      /* adjust this to raise/lower the block slightly */
  overflow: hidden;          /* canvas stays clipped to hero */
}
.hero #stars {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero-content { margin-top: 1rem; }
.hero-title {
  font-size: clamp(1.9rem, 4vw + 1rem, 3.1rem);
  line-height: 1.15; margin: 0 0 var(--space-2);
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold), 0 0 30px var(--pink);
}
.hero-sub { max-width: 48ch; color: #cce7ff; margin: 0; }

.cta-btn {
  display: inline-block; margin-top: var(--space-3); padding: .85rem 1.4rem; border-radius: 999px;
  font-weight: 800; color: #fff; text-decoration: none;
  background: linear-gradient(90deg, var(--pink), var(--teal));
  box-shadow: 0 0 18px rgba(255,119,255,.6);
  transition: transform .2s, box-shadow .2s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 0 28px rgba(0,230,255,.9); }
.cta-small { padding: .7rem 1.1rem; font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-6); }
.section h2 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.6rem, 1rem + 2vw, 2.2rem);
  color: var(--gold); line-height: 1.2; text-shadow: 0 0 10px var(--gold);
}

/* ---------- About grid ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-text p { line-height: 1.7; max-width: 60ch; margin: 0; }
.about-media, .card-media { border-radius: 14px; overflow: hidden; box-shadow: 0 10px 35px rgba(255,221,87,.25); }
.about-media img, .card-media img { display: block; width: 100%; height: auto; object-fit: cover; }

/* Ensure cards align neatly in rows */
/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

/* Card layout */
.card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: 1rem;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 22px rgba(255, 221, 87, .5);
}

/* Constrain images */
.card-media {
  flex: 0 0 260px; /* fixed height for uniformity */
  overflow: hidden;
  border-radius: 12px;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text grows to fill space */
.card h3 {
  margin: 0.75rem 0 0.5rem;
}

.card p {
  flex-grow: 1; /* fills vertical space so buttons align at bottom */
  margin: 0 0 1rem;
}

/* Read More button */
.card-btn {
  display: inline-block;
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg, var(--pink), var(--teal));
  box-shadow: 0 0 12px rgba(255,119,255,.6);
  transition: transform .2s, box-shadow .2s;
}

.card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0,230,255,.9);
}

/* Multi-image card slideshow support */
.card-media {
  position: relative;
  overflow: hidden;
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.card-media img.active {
  opacity: 1;
  z-index: 1;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 420px;
  border-radius: 15px;
  object-fit: cover;
  box-shadow:
    0 0 15px rgba(160, 90, 255, 0.4),
    0 0 30px rgba(90, 150, 255, 0.2),
    0 0 45px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.4s ease-in-out, transform 0.4s ease-in-out;
}

/* Optional: slight glow intensifies on hover */
.about-image img:hover {
  box-shadow:
    0 0 25px rgba(160, 90, 255, 0.6),
    0 0 50px rgba(90, 150, 255, 0.4),
    0 0 70px rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}
/* ---------- Footer ---------- */
.footer { background: linear-gradient(180deg, var(--ink), var(--space)); padding-block: var(--space-4); color: #aaa; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .about-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: .75rem; }
  .cards { grid-template-columns: 1fr; }
}

/* ---------- Lightbox (image fullscreen) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;             /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

