/* ═══════════════════════════════════════════════════════════════
   Bingy — Landing page
   css/style.css
   Design: Cinematic dark — matching the tvOS app aesthetic
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────────── */
:root {
  /* Cinema (dark) — default */
  --bg:          #0d0d1a;
  --surface:     #0f1018;
  --border:      rgba(255,255,255,0.07);
  --border-mid:  rgba(255,255,255,0.12);
  --fg:          #f2f2f7;
  --muted:       rgba(242,242,247,0.45);
  --faint:       rgba(242,242,247,0.20);
  --gold:        #C9A84C;
  --gold-bright: #e4c06e;
  --gold-dim:    rgba(201,168,76,0.18);
  --gold-glow:   rgba(201,168,76,0.32);
  --font:        'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-title:  'Boldonse', sans-serif;
  --max-w:       1200px;
  --nav-h:       64px;

  /* Scrim & overlay colours (RGB triplets) */
  --scrim-rgb:         13,13,26;
  --nav-bg:            rgba(13,13,26,0.88);
  --card-bg:           rgba(255,255,255,0.03);
  --card-bg-hover:     rgba(255,255,255,0.05);
  --chevron-bg:        rgba(0,0,0,0.55);
  --chevron-border:    rgba(255,255,255,0.15);
  --chevron-color:     rgba(255,255,255,0.85);
  --chevron-hover-bg:  rgba(255,255,255,0.12);
  --chevron-hover-border: rgba(255,255,255,0.3);
  --ribbon-border:     rgba(255,255,255,0.08);
  --hero-inset:        rgba(255,255,255,0.15);
  --hero-inset-hover:  rgba(255,255,255,0.3);
  --cta-bg:            rgba(15,16,24,0.90);
  --cta-shadow:        rgba(0,0,0,0.5);
  --cta-inset-highlight: rgba(255,255,255,0.06);
  --btn-primary-fg:    #09090f;
}

/* Première (light) */
@media (prefers-color-scheme: light) {
  :root {
    --bg:          #ffffff;
    --surface:     #efefef;
    --border:      rgba(13,13,26,0.14);
    --border-mid:  rgba(13,13,26,0.20);
    --fg:          #0d0d1a;
    --muted:       rgba(13,13,26,0.55);
    --faint:       rgba(13,13,26,0.30);
    --gold:        #a07820;
    --gold-bright: #8a6418;
    --gold-dim:    rgba(160,120,32,0.10);
    --gold-glow:   rgba(160,120,32,0.20);

    --scrim-rgb:         255,255,255;
    --nav-bg:            rgba(255,255,255,0.88);
    --card-bg:           #f2f2f7;
    --card-bg-hover:     #e8e8ed;
    --chevron-bg:        rgba(255,255,255,0.75);
    --chevron-border:    rgba(13,13,26,0.15);
    --chevron-color:     rgba(13,13,26,0.85);
    --chevron-hover-bg:  rgba(13,13,26,0.08);
    --chevron-hover-border: rgba(13,13,26,0.3);
    --ribbon-border:     rgba(13,13,26,0.08);
    --hero-inset:        rgba(13,13,26,0.12);
    --hero-inset-hover:  rgba(13,13,26,0.25);
    --cta-bg:            rgba(255,255,255,0.90);
    --cta-shadow:        rgba(0,0,0,0.12);
    --cta-inset-highlight: rgba(0,0,0,0.04);
    --btn-primary-fg:    #ffffff;
  }
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
img  { display: block; max-width: 100%; }
a    { text-decoration: none; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0;
}

/* ── Nav ──────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.site-nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
}
.nav-icon {
  height: 36px;
  width: 36px;
  border-radius: 8px;
  transition: opacity 0.15s;
}
.nav-brand:hover .nav-icon { opacity: 0.85; }

.nav-cta {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  padding: 7px 18px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-cta:hover {
  color: var(--fg);
  border-color: var(--gold-dim);
  background: var(--gold-dim);
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100dvh;
  display: flex;
  align-items: flex-end;   /* text sits at the bottom */
  overflow: hidden;
}

/* The mockup — fills the hero section */
.hero-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;        /* keep aspect ratio, no crop */
  object-position: center 40%;
  animation: heroFloat 7s ease-in-out infinite;
  /* scale up slightly so it fills more of the frame */
  transform-origin: center center;
  scale: 1.08;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* Gradient scrim — transparent at top, smooth dark at bottom */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* bottom fade — eased with many stops for no hard banding */
    linear-gradient(to top,
      rgba(var(--scrim-rgb),1)    0%,
      rgba(var(--scrim-rgb),0.97) 10%,
      rgba(var(--scrim-rgb),0.88) 22%,
      rgba(var(--scrim-rgb),0.65) 36%,
      rgba(var(--scrim-rgb),0.35) 52%,
      rgba(var(--scrim-rgb),0.10) 68%,
      transparent       82%
    ),
    /* subtle top edge so nav reads */
    linear-gradient(to bottom,
      rgba(var(--scrim-rgb),0.55) 0%,
      transparent 20%
    );
}

/* Text — on top of scrim, anchored bottom-left */
.hero-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  padding: 0 clamp(48px, 8vw, 120px) clamp(72px, 12vh, 140px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 3.8vw, 4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 28px;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  max-width: 680px;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 44px;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.4;
  animation: hintBob 2.2s ease-in-out infinite;
}
.hero-scroll-hint svg {
  width: 20px;
  height: 20px;
  color: var(--fg);
}
@keyframes hintBob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50%       { transform: translateX(-50%) translateY(5px); opacity: 0.7; }
}

/* Features section snaps into view */

/* Mobile */
@media (max-width: 600px) {
  .hero { height: 100dvh; }
  .hero-body { align-items: center; text-align: center; }
  .hero-body .hero-sub { max-width: 100%; }
  .hero-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
}

/* ── Primary Button ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--btn-primary-fg);
  background: var(--gold);
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 0 0 0 var(--gold-glow);
}
.btn-primary:hover {
  background: var(--gold-bright);
  box-shadow: 0 4px 24px var(--gold-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* ── Feature Carousel (tvOS ZStack: Fixed Hero + Sliding Ribbon) ── */
.features {
  padding: clamp(60px, 8vw, 120px) 0 0;
}

.feat-row-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 auto 20px;
  max-width: min(820px, 60vw);
  padding-left: 20px;
}

/* Stage: ZStack container — hero on top of ribbon */
.feat-stage {
  --card-w: min(820px, 60vw);
  --card-h: calc(var(--card-w) * 9 / 16);
  --card-gap: 28px;
  --left-pad: calc(50% - var(--card-w) / 2);
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  height: var(--card-h);
  overflow: hidden;
}

/* Inner mask layer — fades edges without affecting chevrons */
.feat-stage-mask {
  position: absolute;
  inset: 0;
  mask-image: linear-gradient(to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%);
}

/* Edge fades handled by mask-image above */
.feat-stage::before,
.feat-stage::after { display: none; }

/* Chevron navigation buttons */
.feat-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--chevron-border);
  background: var(--chevron-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--chevron-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, opacity 0.3s, transform 0.2s;
  padding: 0;
}
.feat-nav svg {
  width: 22px;
  height: 22px;
}
.feat-nav:hover {
  background: var(--chevron-hover-bg);
  border-color: var(--chevron-hover-border);
  transform: translateY(-50%) scale(1.08);
}
.feat-nav--left {
  left: 12px;
}
.feat-nav--right {
  right: 12px;
  left: auto;
}
.feat-nav.hidden {
  opacity: 0;
  pointer-events: none;
}

/* BOTTOM LAYER: Sliding ribbon of all cards */
.feat-ribbon {
  position: absolute;
  top: 0;
  left: var(--left-pad);
  display: flex;
  gap: var(--card-gap);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Ribbon card — same size as hero, 16:9 */
.feat-rcard {
  flex: 0 0 var(--card-w);
  height: var(--card-h);
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--ribbon-border);
  transition: opacity 0.35s ease, border-color 0.25s, transform 0.25s;
}
.feat-rcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feat-rcard-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--scrim-rgb),0.4) 0%, transparent 50%);
  pointer-events: none;
}
.feat-rcard.under-hero {
  opacity: 0;
  pointer-events: none;
}
.feat-rcard:not(.under-hero) {
  opacity: 0.35;
  border-color: var(--ribbon-border);
}

/* TOP LAYER: Fixed hero window — sits at left-pad, on top of ribbon */
.feat-hero {
  position: absolute;
  top: 0;
  left: var(--left-pad);
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 20px;
  overflow: hidden;
  z-index: 2;
  cursor: pointer;
}

.feat-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.feat-hero-img.active { opacity: 1; }

.feat-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top,
      rgba(var(--scrim-rgb),0.7)  0%,
      rgba(var(--scrim-rgb),0.25) 40%,
      transparent        65%
    ),
    linear-gradient(to right,
      rgba(var(--scrim-rgb),0.2)  0%,
      transparent        45%
    );
}

.feat-hero-info {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: clamp(16px, 2.5vw, 28px);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.feat-hero-info.fading {
  opacity: 0;
  transform: translateY(8px);
}

.feat-tag {
  display: block;
  font-size: clamp(0.8rem, 1vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.feat-hero-title {
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--fg);
  overflow-wrap: break-word;
  word-break: break-word;
  text-shadow: 0 2px 10px rgba(var(--scrim-rgb),0.6);
}

/* Gradient border on hero (box-shadow fallback — border-image doesn't support border-radius) */
.feat-hero-border {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 20px;
  border: none;
  box-shadow: inset 0 0 0 2px var(--hero-inset);
  transition: box-shadow 0.3s;
  pointer-events: none;
}
.feat-hero:hover .feat-hero-border {
  box-shadow: inset 0 0 0 2px var(--hero-inset-hover);
}

/* Description below stage */
.feat-desc-wrap {
  max-width: 1400px;
  margin: 0 auto;
}

.feat-desc-area {
  margin: 0 auto;
  max-width: min(820px, 60vw);
  padding: 24px 20px clamp(40px, 5vw, 60px);
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.feat-desc-area.fading-right {
  opacity: 0;
  transform: translateX(-40px);
}
.feat-desc-area.fading-left {
  opacity: 0;
  transform: translateX(40px);
}

.feat-desc {
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  line-height: 1.72;
  color: var(--muted);
}

/* ── Secondary features grid ──────────────────────────────────── */
.features-grid {
  border-top: 1px solid var(--border);
  padding: clamp(48px, 6vw, 80px) 0;
}

.features-grid-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px) 36px;
}

.features-grid-title {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.grid-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 64px);
}

.grid-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  transition: border-color 0.25s, background 0.25s;
}
.grid-card:hover {
  border-color: var(--border-mid);
  background: var(--card-bg-hover);
}

.grid-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gold-dim);
  color: var(--gold);
  margin-bottom: 20px;
}

.grid-title {
  font-size: 1.05rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 10px;
}

.grid-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ── Security Section ────────────────────────────────────────── */
.security-section {
  border-top: 1px solid var(--border);
  padding: clamp(64px, 8vw, 120px) clamp(20px, 4vw, 64px);
}

.security-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.security-header {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.security-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--gold-dim);
  color: var(--gold);
  margin-bottom: 20px;
}

.security-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.security-title {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--fg);
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .security-title { white-space: normal; font-size: clamp(1.4rem, 6vw, 1.8rem); }
}

.security-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

.security-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.security-pillar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  transition: border-color 0.25s, background 0.25s;
}
.security-pillar:hover {
  border-color: var(--border-mid);
  background: var(--card-bg-hover);
}

.security-pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gold-dim);
  color: var(--gold);
  margin-bottom: 16px;
}

.security-pillar-title {
  font-size: 0.95rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 10px;
}

.security-pillar-desc {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ── CTA Section ──────────────────────────────────────────────── */
.cta-section {
  padding: clamp(60px, 8vw, 120px) clamp(20px, 4vw, 64px);
  display: flex;
  justify-content: center;
}

.cta-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 720px;
  background: var(--cta-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border-mid);
  border-radius: 28px;
  padding: clamp(40px, 6vw, 80px) clamp(32px, 5vw, 72px);
  text-align: center;
  box-shadow: 0 32px 80px var(--cta-shadow), inset 0 1px 0 var(--cta-inset-highlight);
}

.cta-glow {
  position: absolute;
  bottom: -80px; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 200px;
  background: radial-gradient(ellipse, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 20px;
}

.cta-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 36px;
}
.cta-body strong { color: var(--fg); font-weight: 500; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.footer-icon {
  height: 24px;
  width: 24px;
  border-radius: 5px;
}
.footer-sep  { color: var(--faint); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .feat-stage { --card-w: 75vw; }
  .feat-hero-title { font-size: 1.15rem; }
  .feat-row-title { max-width: 75vw; }
  .feat-desc-area { max-width: 100%; padding: 20px 16px 40px; }
  .grid-inner { grid-template-columns: 1fr; }
  .grid-card { padding: 24px 20px; }
  .security-pillars { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .feat-stage { --card-w: min(540px, 50vw); }
  .feat-row-title { max-width: min(540px, 50vw); }
  .grid-inner { grid-template-columns: repeat(2, 1fr); }
  .security-pillars { grid-template-columns: repeat(2, 1fr); }
}

/* Hide edge gradients on mobile — no overflow to fade */
@media (max-width: 768px) {
  .feat-stage::before,
  .feat-stage::after { display: none; }
}
