:root {
  --bg-base: #0F0F11;
  --bg-surface: #18181B;
  --bg-surface-2: #222226;
  --bg-surface-hover: #2E2E33;
  --text-primary: #F4F4F5;
  --text-muted: #A1A1AA;
  --text-dim: #71717A;
  --accent: #FF8A5B;
  --accent-hover: #E6744A;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-frame: rgba(255, 255, 255, 0.14);
  --font-serif: 'Fraunces', 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
}

html, body {
  width: 100%;
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-color: transparent;
  isolation: isolate;
}

/* Corner Bracket Frame Marks in Viewport Corners */
.corner-bracket {
  position: fixed;
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 60;
  border-color: var(--border-frame);
  border-style: solid;
}

.corner-tl {
  top: 14px;
  left: 14px;
  border-width: 1px 0 0 1px;
}

.corner-tr {
  top: 14px;
  right: 14px;
  border-width: 1px 1px 0 0;
}

.corner-bl {
  bottom: 14px;
  left: 14px;
  border-width: 0 0 1px 1px;
}

.corner-br {
  bottom: 14px;
  right: 14px;
  border-width: 0 1px 1px 0;
}

@media (min-width: 768px) {
  .corner-bracket {
    width: 18px;
    height: 18px;
  }
  .corner-tl { top: 22px; left: 22px; }
  .corner-tr { top: 22px; right: 22px; }
  .corner-bl { bottom: 22px; left: 22px; }
  .corner-br { bottom: 22px; right: 22px; }
}

/* Fixed Three.js Background Canvas Container */
.canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at 60% 25%, rgba(255, 138, 91, 0.06) 0%, rgba(15, 15, 17, 0) 70%), linear-gradient(180deg, #0F0F11 0%, #0B0B0D 100%);
}

.three-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.canvas-container.fallback-gradient {
  background: radial-gradient(circle at 50% 30%, rgba(255, 138, 91, 0.12) 0%, rgba(15, 15, 17, 0.95) 60%, #0F0F11 100%);
}

/* Page Layout */
.page-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
}

/* Top Navigation */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 15, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

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

.nav-btn-secondary {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  max-width: 820px;
  margin: 0 auto;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Keyframes for Hero Animations and Engagement */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulseScroll {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Headline */
.hero-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-wrap: balance;
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-title:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #ededf2;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3.75rem;
    line-height: 1.12;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 4.5rem;
    line-height: 1.08;
  }
}

/* Subcopy */
.hero-subcopy {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 34ch;
  text-wrap: balance;
  font-weight: 400;
  opacity: 0;
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-subcopy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

@media (min-width: 640px) {
  .hero-subcopy {
    font-size: 1.05rem;
  }
}

/* Action Buttons */
.hero-actions {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 360px;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    max-width: none;
    width: auto;
    gap: 0.85rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  border-radius: 9999px;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Scroll Cue */
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3.5rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s ease, opacity 0.15s ease;
  animation: pulseScroll 2s ease-in-out infinite;
  border-radius: 4px;
}

.scroll-cue:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.scroll-cue:hover {
  color: var(--text-muted);
}

.scroll-cue-icon {
  stroke: currentColor;
}

/* Sections General */
.section {
  position: relative;
  padding: 6rem 1.5rem;
}

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

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2.75rem;
  }
}

.section-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-wrap: balance;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.75rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--bg-surface-hover);
}

.icon-tile {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-surface-2, #141124);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--accent);
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.icon-tile svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: block;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.feature-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Vertical Numbered Timeline (How it works - unboxed, thin hairline dividers) */
.timeline {
  display: flex;
  flex-direction: column;
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  align-items: flex-start;
  padding: 2.25rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.timeline-step:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.timeline-num {
  font-family: var(--font-serif);
  font-size: 3.25rem;
  line-height: 1;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.03em;
  padding-top: 0.15rem;
}

.timeline-body {
  display: flex;
  flex-direction: column;
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .timeline-step {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.75rem 0;
  }

  .timeline-num {
    font-size: 2.5rem;
  }
}

/* Boundaries List (Two-column list with thin divider lines) */
.boundaries-list {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  .boundaries-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 3.5rem;
  }
}

.boundary-item {
  padding: 2.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.boundary-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.boundary-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Transitions for the ONE Light Section */
.light-transition-top {
  height: 1px;
  background: var(--border);
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
}

.light-transition-bottom {
  height: 1px;
  background: var(--border);
  margin-top: -1px;
  position: relative;
  z-index: 2;
}

/* Section Light (Off-white background, dark text, accent #4F6BFF) */
.section-light {
  background: #f8f7fa;
  color: #12101e;
  position: relative;
  z-index: 2;
  padding: 4rem 1.5rem 4.5rem;
}

.section-light .section-title {
  color: #12101e;
}

.section-light .section-description {
  color: #555068;
}

.section-light .boundaries-list {
  border-top: 1px solid rgba(18, 16, 30, 0.09);
}

.section-light .boundary-item {
  border-bottom: 1px solid rgba(18, 16, 30, 0.09);
}

.section-light .icon-tile {
  background: #eae8f3;
  border: 1px solid rgba(18, 16, 30, 0.08);
  color: var(--accent);
}

.section-light .boundary-title {
  color: #12101e;
}

.section-light .boundary-text {
  color: #555068;
}

/* Light mode technical details accordion */
.section-light .technical-details {
  background: #ffffff;
  border: 1px solid rgba(18, 16, 30, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.section-light .technical-details[open] {
  border-color: rgba(201, 78, 43, 0.35);
}

.section-light .technical-details-summary {
  color: #12101e;
}

.section-light .summary-chevron {
  color: #726c85;
}

.section-light .technical-details-content {
  border-top: 1px solid rgba(18, 16, 30, 0.08);
}

.section-light .tech-spec-name {
  color: #12101e;
}

.section-light .tech-spec-desc {
  color: #555068;
}

.section-light .tech-spec-desc code {
  background: rgba(201, 78, 43, 0.08);
  color: #C94E2B;
  border: 1px solid rgba(201, 78, 43, 0.20);
}

/* Collapsible Technical Details (Dark Fallback / Base) */
.technical-details-container {
  max-width: 900px;
  margin: 3.5rem auto 0;
}

.technical-details {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.technical-details[open] {
  border-color: rgba(255, 255, 255, 0.16);
}

.technical-details-summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-primary);
  user-select: none;
  list-style: none;
}

.technical-details-summary::-webkit-details-marker {
  display: none;
}

.technical-summary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.technical-details[open] .summary-chevron {
  transform: rotate(180deg);
}

.technical-details-content {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tech-spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .tech-spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tech-spec-item {
  display: flex;
  flex-direction: column;
}

.tech-spec-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.tech-spec-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.tech-spec-desc code {
  font-size: 0.8rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #edeaf5;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .download-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (min-width: 960px) {
  .download-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.download-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  padding: 0;
  flex: 1;
}

.download-steps-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.download-steps-list .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.download-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.download-card.primary-card {
  border-color: rgba(255, 138, 91, 0.35);
}

.download-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.download-card-header .icon-tile {
  margin-bottom: 0;
}

.download-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 138, 91, 0.15);
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.download-badge.subtle-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.download-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.download-card-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}

.download-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.download-card .btn {
  width: 100%;
}

/* Safari Install Notice for iPhone Chrome / In-App */
.safari-install-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 180, 0, 0.12);
  border: 1px solid rgba(255, 180, 0, 0.35);
  color: #ffca43;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  line-height: 1.35;
}

.safari-install-notice svg {
  flex-shrink: 0;
}

/* iPhone Copy Link Row */
.iphone-copy-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.btn-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.775rem;
  font-weight: 500;
  cursor: pointer;
  width: fit-content;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-copy-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-copy-link.copied {
  background: rgba(255, 138, 91, 0.22);
  border-color: var(--accent);
  color: #ffffff;
}

.iphone-note {
  font-size: 0.785rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* FAQ Section */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-summary {
  padding: 1.5rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  text-wrap: balance;
  transition: color 0.15s ease;
}

.faq-item:hover .faq-question {
  color: #ffffff;
}

.faq-item[open] .summary-chevron {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 0 1.5rem;
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Closing Section */
.closing-section {
  padding: 7rem 1.5rem 8rem;
  text-align: center;
  position: relative;
}

.closing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
}

.closing-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .closing-title {
    font-size: 4.5rem;
  }
}

.closing-subcopy {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 42ch;
  margin: 0 auto 2.25rem;
  text-wrap: balance;
}

.closing-actions {
  justify-content: center;
  margin: 0 auto;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 1.5rem 4rem;
  background: rgba(15, 15, 17, 0.95);
}

.footer-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 0.25rem 0 0.5rem;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 480px;
}

/* Legal Pages (Privacy & Terms) */
.legal-main {
  min-height: calc(100vh - 160px);
  padding: 6.5rem 1.5rem 5rem;
  max-width: 780px;
  margin: 0 auto;
}

.legal-header {
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2rem;
}

.draft-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  background: rgba(255, 138, 91, 0.12);
  border: 1px solid rgba(255, 138, 91, 0.35);
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .legal-title {
    font-size: 3.25rem;
  }
}

.legal-subcopy {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.legal-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.legal-text strong {
  color: var(--text-primary);
}

.legal-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal-list li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.legal-list li strong {
  color: var(--text-primary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--text-primary);
}

/* Mobile heading readability: subtle dark backdrop behind text for dot contrast */
@media (max-width: 767px) {
  .hero-content, .section-header {
    position: relative;
    z-index: 10;
  }
  .hero-title, .section-title {
    text-shadow: 0 2px 24px rgba(15, 15, 17, 0.95), 0 0 12px rgba(15, 15, 17, 0.85);
  }
  .hero-subcopy, .section-description {
    text-shadow: 0 1px 12px rgba(15, 15, 17, 0.95);
  }
}

/* ==========================================================================
   Privacy-Preserving Cookie & Storage Banner & Modal (Mobile / Tablet / Desktop Optimized)
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1.5rem);
  max-width: 580px;
  background: rgba(15, 15, 17, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-frame);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  z-index: 999;
  padding: 1.15rem 1.25rem;
  animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.cookie-banner-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.cookie-banner-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cookie-icon {
  font-size: 1.45rem;
  line-height: 1.1;
  flex-shrink: 0;
}

.cookie-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cookie-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.cookie-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}

.cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
  flex-shrink: 0;
}

.cookie-actions #cookie-accept-all {
  grid-column: 1 / -1;
  order: -1;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(255, 138, 91, 0.25);
}

.cookie-actions #cookie-reject-all,
.cookie-actions #cookie-customize {
  min-height: 42px;
  font-size: 0.785rem;
  padding: 0.45rem 0.5rem;
  text-align: center;
  justify-content: center;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-frame);
}

.btn-ghost:active {
  transform: scale(0.98);
}

.cookie-settings-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  transition: color 0.15s ease;
}

.cookie-settings-btn:hover {
  color: var(--text-primary);
}

.cookie-settings-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Tablet Layout (640px to 1023px) */
@media (min-width: 640px) {
  .cookie-banner {
    width: calc(100% - 3rem);
    max-width: 680px;
    padding: 1.25rem 1.4rem;
    bottom: 1.5rem;
  }

  .cookie-banner-content {
    flex-direction: column;
    gap: 1.1rem;
  }

  .cookie-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    width: auto;
  }

  .cookie-actions #cookie-accept-all {
    grid-column: auto;
    order: 1;
    min-height: 40px;
    width: auto;
    padding: 0.5rem 1.15rem;
  }

  .cookie-actions #cookie-reject-all,
  .cookie-actions #cookie-customize {
    min-height: 40px;
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* Desktop Layout (>= 1024px) */
@media (min-width: 1024px) {
  .cookie-banner {
    max-width: 820px;
    padding: 1.25rem 1.6rem;
    bottom: 1.75rem;
  }

  .cookie-banner-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
  }

  .cookie-banner-header {
    flex: 1;
    min-width: 0;
  }

  .cookie-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
  }
}

/* Cookie Preferences Modal (Fully Responsive on Mobile / Tablet / Desktop) */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0.75rem)) 0.75rem max(0.75rem, env(safe-area-inset-bottom, 0.75rem));
  z-index: 1000;
  animation: fadeIn 0.2s ease forwards;
}

.cookie-modal-inner {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-frame);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 1.5rem);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .cookie-modal-inner {
    padding: 1.6rem;
    gap: 1.25rem;
    max-height: 85vh;
  }
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.cookie-modal-header h4 {
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0;
}

@media (min-width: 640px) {
  .cookie-modal-header h4 {
    font-size: 1.15rem;
  }
}

.cookie-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.35rem;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.cookie-close-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.06);
}

.cookie-close-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cookie-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 55vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.cookie-modal-body::-webkit-scrollbar {
  width: 5px;
}

.cookie-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.cookie-pref-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}

.cookie-pref-item:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.cookie-pref-info {
  flex: 1;
  min-width: 0;
}

.cookie-pref-info strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.cookie-pref-info p {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0;
}

.cookie-toggle {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.cookie-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.cookie-modal-footer .btn {
  width: 100%;
  min-height: 44px;
}

@media (min-width: 640px) {
  .cookie-modal-footer .btn {
    width: auto;
    min-height: 40px;
    padding: 0.55rem 1.4rem;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-title,
  .hero-subcopy,
  .scroll-cue {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .canvas-container {
    display: none !important;
  }

  .canvas-container.fallback-gradient {
    display: block !important;
  }
}



