/* ==========================================================================
   SAM FUTURE AI — Master Stylesheet
   Includes:
   1. Travel Hero Section (Inter font, floating island stadium pill)
   2. Codex Credential Section (ThreeUI SparkBadge Canvas 2D integration)
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/inter-variable.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;
}

:root {
  --fs: min(15.5vh, 8.8vw);
  --bg-page: #ffffff;
  --bg-paper: #f2f2f1;
  --ink: #1d1d1d;
  --ink-secondary: #3a3a3a;
  --rule: #a9a9a6;
  --btn-bg: #1b1b1b;
  --pill-placeholder: #d8d3cf;
  --hairline-color: #b9b9b9;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 720px) {
  :root {
    --fs: min(20.5vw, 11.5vh);
  }
}

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

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--bg-paper);
  font-family: var(--font-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Top Navigation Bar (Fixed with smooth glass transition on scroll)
   ========================================================================== */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(0.14 * var(--fs)) calc(0.27 * var(--fs)) 0 calc(0.27 * var(--fs));
  font-size: max(12px, calc(0.072 * var(--fs)));
  font-weight: 450;
  color: var(--ink);
  z-index: 100;
  transform: translateY(-140%);
  opacity: 0;
  user-select: none;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-bar.nav-scrolled {
  background-color: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px calc(0.27 * var(--fs));
}

.nav-bar.nav-scrolled .nav-link {
  color: #ededed;
}

.nav-bar.nav-scrolled .nav-sep {
  color: #555555;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  list-style: none;
}

.nav-item {
  display: inline-flex;
  align-items: center;
}

.nav-link {
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.25s ease;
  cursor: pointer;
}

.nav-link:hover {
  opacity: 0.65;
}

.nav-sep {
  color: var(--rule);
  margin: 0 calc(0.045 * var(--fs));
  user-select: none;
  font-weight: 400;
  transition: color 0.25s ease;
}

/* ==========================================================================
   Hero Section Fold
   ========================================================================== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 580px;
  overflow: hidden;
  background-color: var(--bg-paper);
}

/* Paper Background Layer with 15 Flowing White S-Curve Strokes */
.paper-layer {
  position: absolute;
  inset: 0;
  background-color: var(--bg-paper);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.paper-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Centered Hero: SAM · pill · FUTURE (43% from top on desktop) */
.hero-container {
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: calc(0.026 * var(--fs));
  font-size: var(--fs);
  line-height: 0.8;
  z-index: 5;
  user-select: none;
  white-space: nowrap;
}

.word-part {
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--ink);
  display: inline-block;
  line-height: 0.8;
}

/* Stadium Pill */
.pill-wrapper {
  position: relative;
  height: 1.81em;
  width: calc(0.012 * var(--fs));
  border-radius: 9999px;
  overflow: hidden;
  background-color: var(--pill-placeholder);
  clip-path: inset(50% 0);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hairline Grey Overlay */
.pill-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--hairline-color);
  z-index: 3;
  pointer-events: none;
  opacity: 1;
}

/* Looping Scene Video */
.pill-video {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  min-width: 4.2em;
  width: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
  opacity: 1;
}

/* Icons Inside the Pill */
.pill-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: calc(0.20 * var(--fs));
  height: calc(0.20 * var(--fs));
  z-index: 4;
  color: #ffffff;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.icon-breeze {
  left: calc(0.22 * var(--fs));
  pointer-events: none;
}

.icon-speaker {
  right: calc(0.22 * var(--fs));
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.pill-icon svg {
  width: 100%;
  height: 100%;
  stroke: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.icon-speaker.waves-off .sound-wave {
  opacity: 0;
}

.sound-wave {
  transition: opacity 0.2s ease;
}

/* Scroll Down Prompt Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: calc(0.14 * var(--fs) + 52px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: max(11px, calc(0.062 * var(--fs)));
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 8;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.25s ease, color 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.hero-scroll-indicator:hover {
  color: var(--ink);
  transform: translateX(-50%) translateY(3px);
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

/* Bottom Footer Bar (Anchored to Hero Section fold) */
.footer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(0.27 * var(--fs)) calc(0.14 * var(--fs)) calc(0.27 * var(--fs));
  z-index: 10;
  transform: translateY(160%);
  opacity: 0;
}

.footer-desc {
  width: calc(1.42 * var(--fs));
  font-size: max(11px, calc(0.066 * var(--fs)));
  line-height: 1.45;
  color: var(--ink-secondary);
  margin: 0;
  flex-shrink: 0;
}

.drop-cap {
  float: left;
  font-size: 2.35em;
  font-weight: 650;
  line-height: 0.8;
  margin-right: 0.08em;
  margin-top: 0.04em;
  color: var(--ink);
}

.footer-rule {
  flex: 1;
  height: 1px;
  background-color: var(--rule);
  margin: 0 calc(0.25 * var(--fs));
  transform: scaleX(0);
  transform-origin: center;
}

.btn-wild {
  background-color: var(--btn-bg);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: calc(0.08 * var(--fs)) calc(0.22 * var(--fs));
  font-size: max(12px, calc(0.072 * var(--fs)));
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-wild:hover {
  transform: scale(1.03);
  background-color: #000000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}

.btn-wild:active {
  transform: scale(0.97);
}

/* ==========================================================================
   SAM FUTURE AI — Codex Credential Section
   Features ThreeUI SparkBadge Canvas 2D Component
   ========================================================================== */
.codex-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: #000000;
  color: #f5f5f7;
  padding: 0 0 100px 0;
  box-sizing: border-box;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.codex-container {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

/* Edge-to-Edge Full Screen Rain Canvas */
.shader-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  margin: 0 0 64px 0;
  border-radius: 0;
  overflow: hidden;
  background: #000000;
  border: none;
  box-shadow: none;
}

.spark-badge {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #000000;
}

.spark-badge__frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
  opacity: 0;
  transition: opacity 220ms ease-out;
}

.spark-badge__frame.is-ready {
  opacity: 1;
}

/* ==========================================================================
   Under Development / Coming Soon Card
   ========================================================================== */
.coming-soon-card {
  width: 100%;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 52px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s ease, transform 0.3s ease;
  margin-bottom: 24px;
}

.coming-soon-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e4e4e7;
  margin-bottom: 20px;
}

.coming-soon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

.coming-soon-heading {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 0 16px 0;
}

.coming-soon-desc {
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.65;
  color: #9ca3af;
  max-width: 540px;
  margin: 0 0 34px 0;
  font-weight: 400;
}

.coming-soon-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-codex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 24px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.btn-codex.primary {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.btn-codex.primary:hover {
  background: #f0f0f0;
  transform: scale(1.02);
}

.btn-codex.secondary {
  background: transparent;
  color: #d4d4d8;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-codex.secondary:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: scale(1.02);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .coming-soon-card {
    padding: 44px 28px;
  }
}

@media (max-width: 600px) {
  .coming-soon-card {
    padding: 36px 20px;
    border-radius: 20px;
  }
  .coming-soon-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .btn-codex {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .nav-bar {
    padding: 16px 20px 0 20px;
    font-size: 12.5px;
  }

  .nav-right {
    display: none;
  }

  .nav-sep {
    margin: 0 5px;
  }

  .hero-container {
    top: 45%;
    flex-direction: column;
    column-gap: 0;
    row-gap: calc(0.03 * var(--fs));
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
  }

  .pill-wrapper {
    width: 100%;
    height: 1.5px;
    clip-path: inset(0 50%);
  }

  .pill-video {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    min-width: 100%;
    height: var(--pill-mobile-h, 160px);
    object-fit: cover;
    object-position: center top;
  }

  .pill-icon {
    width: 20px;
    height: 20px;
  }

  .icon-breeze {
    left: 16px;
  }

  .icon-speaker {
    right: 16px;
  }

  .hero-scroll-indicator {
    bottom: 128px;
    font-size: 11px;
  }

  .footer-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 16px;
    column-gap: 16px;
    padding: 0 20px 20px 20px;
    align-items: center;
  }

  .footer-desc {
    grid-column: 1 / -1;
    width: 100%;
    font-size: 13px;
    line-height: 1.5;
  }

  .footer-rule {
    grid-column: 1;
    margin: 0;
  }

  .btn-wild {
    grid-column: 2;
    height: 38px;
    padding: 0 20px;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .shader-frame {
    height: 85vh;
    min-height: 480px;
    margin-bottom: 40px;
    border-radius: 0;
  }

  .codex-section {
    padding: 0 0 60px 0;
  }

  .codex-container {
    padding: 0 16px;
  }
}

/* ==========================================================================
   Accessibility: Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .paper-layer { opacity: 1 !important; }
  .nav-bar { transform: translateY(0) !important; opacity: 1 !important; }
  .footer-bar { transform: translateY(0) !important; opacity: 1 !important; }
  .footer-rule { transform: scaleX(1) !important; }
  .pill-overlay { opacity: 0 !important; }
  .pill-icon { opacity: 0.85 !important; }
  .pill-wrapper { clip-path: inset(0) !important; }
  .hero-scroll-indicator { opacity: 0.85 !important; }
  .scroll-arrow { animation: none !important; }
  .badge-dot { animation: none !important; }
}
