/*
 * Grand Line Gallery — marketing site
 * Visual language ported from ios/OnePieceSPCollection/DesignSystem/.
 * Dark-only. Editorial serif display + system sans body.
 */

:root {
  /* Backgrounds */
  --bg: #050507;
  --bg-elevated: #0c0c11;
  --bg-tinted: rgba(255, 255, 255, 0.03);

  /* Foregrounds */
  --fg: #ffffff;
  --fg-secondary: rgba(255, 255, 255, 0.70);
  --fg-tertiary: rgba(255, 255, 255, 0.50);
  --fg-disabled: rgba(255, 255, 255, 0.35);

  /* Accent */
  --accent: #d43333;
  --positive: #5cd180;
  --warning: #fabd3d;

  /* Strokes */
  --glass-stroke: rgba(255, 255, 255, 0.08);
  --glass-stroke-strong: rgba(255, 255, 255, 0.18);
  --divider: rgba(255, 255, 255, 0.12);

  /* Surfaces */
  --surface-muted: rgba(255, 255, 255, 0.06);
  --surface-emphasized: rgba(255, 255, 255, 0.15);

  /* Type */
  --serif: ui-serif, "New York", "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --space-xxs: 4px;
  --space-xs: 6px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-xxl: 24px;
  --space-3xl: 32px;
  --space-4xl: 48px;
  --space-5xl: 64px;
  --space-6xl: 96px;

  /* Radius */
  --r-sm: 8px;
  --r-card: 10px;
  --r-surface: 14px;
  --r-emphasized: 18px;
  --r-hero: 20px;
  --r-page: 24px;

  /* Layout */
  --max-w: 1200px;
  --max-w-prose: 680px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100dvh;
  /* Subtle vignette toward black at top — mirrors heroScrim ladder. */
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(212, 51, 51, 0.05), transparent 70%),
    radial-gradient(1000px 700px at 50% 0%, rgba(255, 255, 255, 0.03), transparent 60%);
  background-attachment: fixed;
}

/* Layout primitives */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
.container--prose {
  max-width: var(--max-w-prose);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-3xl); }
}

section {
  padding: var(--space-5xl) 0;
}
@media (min-width: 768px) {
  section { padding: var(--space-6xl) 0; }
}

/* Typography */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--fg-secondary);
  margin: 0 0 var(--space-lg);
}

.display-xl, .display-l, .display-m, h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--fg);
}

h1, .display-xl {
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
}
h2, .display-l {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.1;
}
h3, .display-m {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.2;
}

p { margin: 0 0 var(--space-lg); color: var(--fg-secondary); }
p:last-child { margin-bottom: 0; }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--fg-secondary);
  max-width: 56ch;
}

.quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.4;
  color: var(--fg);
  max-width: 36ch;
  margin: 0 auto;
  text-align: center;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(5, 5, 7, 0.65);
  border-bottom: 1px solid var(--glass-stroke);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-xl);
  max-width: var(--max-w);
  margin: 0 auto;
}
@media (min-width: 768px) {
  .site-header__inner { padding: var(--space-md) var(--space-3xl); }
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--glass-stroke);
}
.brand__wordmark {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.site-header__nav a {
  color: var(--fg-secondary);
  font-size: 0.875rem;
  margin-left: var(--space-xl);
  transition: color 120ms ease;
}
.site-header__nav a:hover { color: var(--fg); }

/* Hero */
.hero {
  padding-top: var(--space-5xl);
  padding-bottom: var(--space-5xl);
  text-align: center;
}
@media (min-width: 768px) {
  .hero {
    padding-top: var(--space-6xl);
    padding-bottom: var(--space-6xl);
  }
}
.hero__inner { max-width: 760px; margin: 0 auto; }
.hero h1 { margin-bottom: var(--space-xl); }
.hero .lede { margin: 0 auto var(--space-3xl); text-align: center; }

/* App Store badge — placeholder, custom (no Apple mark used). */
.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px 22px;
  background: var(--surface-muted);
  border: 1px solid var(--glass-stroke-strong);
  border-radius: var(--r-emphasized);
  color: var(--fg);
  font-family: var(--sans);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.cta-badge:hover {
  background: var(--surface-emphasized);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
.cta-badge__top {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 2px;
}
.cta-badge__main {
  display: block;
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
}
.cta-note {
  display: block;
  margin-top: var(--space-lg);
  font-size: 0.8125rem;
  color: var(--fg-tertiary);
}

/* Feature triptych */
.features {
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.features__grid {
  display: grid;
  gap: var(--space-3xl);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xxl);
  }
}
.feature {
  background: var(--bg-tinted);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-hero);
  padding: var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.feature__shot {
  /* Reserved slot for screenshots — replace with <img> when captured. */
  aspect-ratio: 9 / 16;
  background:
    linear-gradient(180deg, rgba(212, 51, 51, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-emphasized);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-disabled);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-md);
}
.feature h3 { margin-bottom: var(--space-sm); }
.feature p { margin: 0; }

/* Pull quote */
.pullquote {
  text-align: center;
  padding: var(--space-6xl) 0;
}
.pullquote::before,
.pullquote::after {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background: var(--glass-stroke-strong);
  margin: 0 auto var(--space-xl);
}
.pullquote::after {
  margin: var(--space-xl) auto 0;
}

/* FAQ */
.faq__list {
  display: grid;
  gap: var(--space-lg);
  max-width: var(--max-w-prose);
  margin: 0 auto;
}
.faq__item {
  background: var(--bg-tinted);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-surface);
  padding: var(--space-xl) var(--space-xxl);
}
.faq__item summary {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--fg-tertiary);
  transition: transform 200ms ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  margin-top: var(--space-md);
  color: var(--fg-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: var(--space-3xl) 0 var(--space-4xl);
  color: var(--fg-tertiary);
  font-size: 0.8125rem;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: flex-start;
}
@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.site-footer__links a {
  margin-right: var(--space-xl);
  color: var(--fg-secondary);
  transition: color 120ms ease;
}
.site-footer__links a:last-child { margin-right: 0; }
.site-footer__links a:hover { color: var(--fg); }
.site-footer__legal {
  max-width: 56ch;
  font-size: 0.75rem;
  color: var(--fg-disabled);
}

/* Prose pages (privacy, support) */
.page-hero {
  padding-top: var(--space-5xl);
  padding-bottom: var(--space-3xl);
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: var(--space-lg);
}
.page-hero .lede { margin: 0; }

.prose {
  padding-bottom: var(--space-6xl);
}
.prose h2 {
  margin-top: var(--space-4xl);
  margin-bottom: var(--space-lg);
}
.prose h3 {
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
}
.prose p, .prose li {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--fg-secondary);
}
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: var(--space-sm); }
.prose a {
  color: var(--fg);
  border-bottom: 1px solid var(--glass-stroke-strong);
  transition: border-color 120ms ease;
}
.prose a:hover { border-color: var(--accent); }

.draft-banner {
  background: rgba(250, 189, 61, 0.08);
  border: 1px solid rgba(250, 189, 61, 0.25);
  color: var(--warning);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--r-sm);
  font-size: 0.8125rem;
  margin-bottom: var(--space-3xl);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
