/* One Happy Jukebox — dark homepage, Aruba flag palette
   Blue #418FDE · Yellow #FBE122 · Red #EF3340 · deep navy base */

:root {
  --page-gutter: max(1em, 20px);
  --aruba-blue: #418fde;
  --aruba-blue-dim: #2a6db5;
  --aruba-blue-glow: rgba(65, 143, 222, 0.35);
  --aruba-yellow: #fbe122;
  --aruba-yellow-dim: #c9b01a;
  --aruba-red: #ef3340;
  --bg-deep: #060a12;
  --bg-mid: #0c1220;
  --bg-card: rgba(14, 22, 38, 0.72);
  --text: #eef3f9;
  --text-muted: #94a3b8;
  --border: rgba(65, 143, 222, 0.2);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .parallax-layer,
  .hero-bg-image,
  .section-panel,
  .parallax-float,
  .section-divider { transform: none !important; }
  .section-panel { opacity: 1 !important; }
}

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

main {
  position: relative;
  z-index: 1;
}

/* ── Fixed parallax backdrop ── */
.parallax-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.parallax-layer {
  position: absolute;
  inset: -25%;
  will-change: transform;
}

.layer-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--aruba-blue-glow), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(239, 51, 64, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 45%, var(--bg-deep) 100%);
}

.layer-stripes {
  opacity: 0.1;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 42%,
    var(--aruba-yellow) 42%,
    var(--aruba-yellow) 44%,
    transparent 44%,
    transparent 56%,
    var(--aruba-yellow) 56%,
    var(--aruba-yellow) 58%,
    transparent 58%
  );
  transform: rotate(-8deg) scale(1.2);
}

.layer-stars .star {
  position: absolute;
  color: var(--aruba-red);
  filter: drop-shadow(0 0 12px rgba(239, 51, 64, 0.4));
  opacity: 0.45;
}

.star svg { display: block; width: 100%; height: 100%; }

.star-1 { width: 48px; height: 48px; top: 12%; left: 8%; }
.star-2 { width: 28px; height: 28px; top: 28%; right: 15%; opacity: 0.3; }
.star-3 { width: 36px; height: 36px; bottom: 30%; left: 18%; opacity: 0.35; }

.layer-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.orb-1 {
  width: 320px; height: 320px;
  top: 10%; right: -5%;
  background: var(--aruba-blue);
  opacity: 0.14;
}

.orb-2 {
  width: 240px; height: 240px;
  bottom: 20%; left: -8%;
  background: var(--aruba-yellow);
  opacity: 0.07;
}

/* ── Section dividers (parallax stripes between sections) ── */
.section-divider {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(280px, 60vw);
  margin: -20px auto;
  will-change: transform;
}

.section-divider span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--aruba-yellow), transparent);
  opacity: 0.55;
}

.section-divider span:last-child {
  width: 70%;
  margin: 0 auto;
  opacity: 0.35;
}

.section-divider--flip span {
  background: linear-gradient(90deg, transparent, var(--aruba-blue), transparent);
}

/* ── Scroll sections & parallax panels ── */
.scroll-section {
  position: relative;
  min-height: min(100vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px var(--page-gutter);
  overflow-x: clip;
}

.section-panel {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  will-change: transform, opacity;
}

.section-accent {
  position: absolute;
  width: min(42vw, 320px);
  height: min(42vw, 320px);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
}

.section-accent--left {
  left: 0;
  top: 20%;
  background: var(--aruba-red);
}

.section-accent--right {
  right: 0;
  bottom: 15%;
  background: var(--aruba-blue);
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  background: rgba(6, 10, 18, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--aruba-blue); }

.lang-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-wrap label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

#langPicker {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 40px;
  padding-bottom: 60px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.95;
  filter: saturate(1.02) brightness(0.96);
  will-change: transform;
}

.hero-bg-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(6, 10, 18, 0.12) 0%,
      rgba(6, 10, 18, 0.22) 50%,
      rgba(6, 10, 18, 0.48) 88%,
      var(--bg-deep) 100%),
    radial-gradient(ellipse 90% 70% at 50% 32%, transparent 0%, rgba(6, 10, 18, 0.28) 100%);
}

.hero .section-panel {
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 24px 16px;
  border-radius: 20px;
  background: rgba(6, 10, 18, 0.35);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(65, 143, 222, 0.12);
}

.hero-logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin: 0 auto 20px;
  display: block;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--aruba-yellow);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--aruba-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--aruba-blue-dim), var(--aruba-blue));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 8px 32px var(--aruba-blue-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--aruba-blue-glow);
}

/* ── Content sections ── */
.section {
  padding: 100px var(--page-gutter);
}

.section-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.section h2,
.closing h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

.section h2::after,
.closing h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--aruba-yellow), var(--aruba-red));
  margin: 12px auto 0;
  border-radius: 2px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--aruba-red), var(--aruba-yellow));
  color: var(--bg-deep);
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 10px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.feature {
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.feature h3 {
  font-size: 1rem;
  color: var(--aruba-blue);
  margin-bottom: 8px;
}

.feature p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── App previews ── */
.previews-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin: -32px auto 36px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
  align-items: start;
}

.preview-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.preview-card:hover {
  border-color: rgba(65, 143, 222, 0.45);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
}

.preview-card:focus-visible {
  outline: 2px solid var(--aruba-blue);
  outline-offset: 3px;
}

.preview-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.preview-card--mobile img {
  max-width: 168px;
}

.preview-card--mobile .preview-label {
  min-height: 2.5em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.preview-card--wide {
  grid-column: 1 / -1;
  max-width: 720px;
  width: 100%;
  justify-self: center;
}

.preview-card--wide img {
  max-width: 100%;
}

.preview-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--aruba-blue);
  line-height: 1.25;
}

.preview-sublabel {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 28rem;
  margin-top: -4px;
}

/* ── Preview lightbox ── */
body.preview-lightbox-open {
  overflow: hidden;
}

.preview-lightbox[hidden] {
  display: none !important;
}

.preview-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1em, 16px);
}

.preview-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 18, 0.88);
  backdrop-filter: blur(8px);
}

.preview-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: min(96vw, 1100px);
  max-height: 92vh;
}

.preview-lightbox__figure {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-height: 92vh;
}

.preview-lightbox__img {
  display: block;
  max-width: min(92vw, 360px);
  max-height: calc(92vh - 48px);
  width: auto;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.preview-lightbox__img--wide {
  max-width: min(92vw, 1031px);
}

.preview-lightbox__caption {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.preview-lightbox__nav,
.preview-lightbox__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(14, 22, 38, 0.92);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.preview-lightbox__nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.preview-lightbox__close {
  position: absolute;
  top: -8px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 2;
}

.preview-lightbox__nav:hover,
.preview-lightbox__close:hover {
  background: rgba(65, 143, 222, 0.18);
  border-color: rgba(65, 143, 222, 0.45);
}

.preview-lightbox__nav:focus-visible,
.preview-lightbox__close:focus-visible {
  outline: 2px solid var(--aruba-blue);
  outline-offset: 2px;
}

/* ── Closing ── */
.closing {
  min-height: 70vh;
  text-align: center;
}

.closing h2 {
  margin-bottom: 20px;
}

.closing p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 12px;
  font-size: 1.05rem;
}

.closing-highlight {
  color: var(--aruba-yellow) !important;
  font-weight: 600;
  margin-top: 8px !important;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 32px var(--page-gutter) 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: rgba(6, 10, 18, 0.6);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--aruba-blue);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover { text-decoration: underline; }

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-nav a { display: none; }
  .site-header { padding-block: 12px; }
  .scroll-section { padding-block: 64px; min-height: auto; }
  .hero { min-height: 100svh; }
  .brand-name { max-width: 42vw; }
  .section-divider { margin: -8px auto; }
  .preview-grid {
    grid-template-columns: 1fr;
    max-width: 220px;
  }
  .preview-card--wide {
    max-width: 100%;
  }
  .preview-lightbox__dialog {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
  }
  .preview-lightbox__nav--prev { order: 2; }
  .preview-lightbox__figure { order: 1; }
  .preview-lightbox__nav--next { order: 3; }
  .preview-lightbox__close {
    position: fixed;
    top: 12px;
    right: 12px;
  }
}
