@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 9%;
  --muted-foreground: 0 0% 45%;
  --border: 0 0% 90%;
  /* Brand — default: ink (matches app) */
  --brand-mark: #000000;
  --brand-gradient-start: #000000;
  --brand-gradient-end: #737373;
  --brand-soft: rgba(0, 0, 0, 0.08);
  --brand-gradient: linear-gradient(135deg, var(--brand-gradient-start), var(--brand-gradient-end));
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  /* Glass — matches walktru-app glass-light */
  --glass-bg: rgba(255, 255, 255, 0.24);
  --glass-bg-strong: rgba(255, 255, 255, 0.42);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-highlight: rgba(255, 255, 255, 0.85);
  --glass-shadow: rgba(60, 50, 100, 0.12);
  --glass-blur: 16px;
  --radius: 0.75rem;
}

:root[data-brand-theme="ink"] {
  --brand-mark: #000000;
  --brand-gradient-start: #000000;
  --brand-gradient-end: #737373;
  --brand-soft: rgba(0, 0, 0, 0.08);
}

:root[data-brand-theme="cyan"] {
  --brand-mark: #5ce1e6;
  --brand-gradient-start: #5de0e6;
  --brand-gradient-end: #0078a6;
  --brand-soft: rgba(92, 225, 230, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; }

/* Page shell — hero carries its own gradient; rest stays clean */
.page-heavenly {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: #ffffff;
}

.page-heavenly::before {
  display: none;
}

.page-content { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .motion { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Typography */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.muted { color: hsl(var(--muted-foreground)); }

/* Glass */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) + 0.25rem);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 16px 48px var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

.glass-strong {
  background: var(--glass-bg-strong);
}

.glass-inner {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

/* Site header — light frosted over hero gradient */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header__bar {
  max-width: 72rem;
  height: 3.5rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .site-header__bar {
    height: 4rem;
    padding: 0 2.5rem;
  }
}

.site-header__nav {
  display: none;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
  margin-right: 1.5rem;
}

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

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 1.5rem;
  width: auto;
  user-select: none;
}

@media (min-width: 768px) {
  .logo-img { height: 1.625rem; }
}

.nav-links a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav-links a:hover { color: hsl(var(--foreground)); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.theme-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.theme-toggle__swatch {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.theme-toggle__swatch--cyan {
  background: linear-gradient(135deg, #5de0e6, #0078a6);
}

.theme-toggle__swatch--ink {
  background: linear-gradient(135deg, #000000, #737373);
}

.theme-toggle__btn--active {
  background: rgba(255, 255, 255, 0.82);
  color: hsl(var(--foreground));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.theme-toggle__btn:hover:not(.theme-toggle__btn--active) {
  color: hsl(var(--foreground));
}

.theme-toggle--footer .theme-toggle__btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
}

@media (max-width: 520px) {
  .site-header__actions .theme-toggle__label { display: none; }
  .site-header__actions .theme-toggle__btn { padding: 0.35rem 0.45rem; }
  .site-header__actions .btn-primary { padding: 0.5rem 0.9rem; font-size: 0.8125rem; }
}

/* Buttons */
.btn {
  font-family: var(--font-body);
  cursor: pointer;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.06s ease, box-shadow 0.18s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn:active { transform: translateY(0.5px); }

.btn-primary {
  border-radius: 9999px;
  background: var(--brand-gradient);
  color: #fff;
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--brand-gradient-end) 35%, transparent);
}

.btn-primary--lg {
  padding: 0.7rem 1.45rem;
  font-size: 0.9375rem;
}

.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--brand-gradient-end) 42%, transparent);
}

.btn-ghost {
  border-radius: 9999px;
  background: #fff;
  color: hsl(var(--foreground));
  padding: 0.7rem 1.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.btn-ghost:hover {
  background: #fafafa;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.btn-brand {
  border-radius: 9999px;
  background: var(--brand-gradient);
  color: #fff;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-brand:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-mark) 38%, transparent);
}

.btn-outline {
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-border);
  color: hsl(var(--foreground));
  padding: 0.85rem 1.6rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-outline:hover { background: rgba(255, 255, 255, 0.75); }

/* Hero — video background + glass demo panel */
.hero {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 2.75rem 1.25rem 4.5rem;
  overflow: hidden;
  min-height: min(100vh, 960px);
}

@media (min-width: 768px) {
  .hero { padding: 3rem 2.5rem 5rem; }
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 12% 8%, rgba(255, 255, 255, 0.92), transparent 55%),
    radial-gradient(ellipse 45% 38% at 88% 15%, color-mix(in srgb, var(--brand-gradient-start) 22%, transparent), transparent 58%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.65) 16%,
      rgba(255, 255, 255, 0.28) 32%,
      rgba(255, 255, 255, 0.08) 48%,
      transparent 62%);
}

:root[data-brand-theme="ink"] .hero-scrim {
  background:
    radial-gradient(ellipse 50% 40% at 12% 8%, rgba(255, 255, 255, 0.92), transparent 55%),
    radial-gradient(ellipse 45% 38% at 88% 15%, rgba(0, 0, 0, 0.06), transparent 58%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.65) 16%,
      rgba(255, 255, 255, 0.28) 32%,
      rgba(255, 255, 255, 0.08) 48%,
      transparent 62%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-copy {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.headline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(2.375rem, 5.8vw, 3.75rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: hsl(var(--foreground));
  max-width: 16ch;
}

.subhead {
  margin-top: 1.125rem;
  font-size: clamp(1rem, 1.9vw, 1.125rem);
  font-weight: 400;
  color: hsl(0 0% 38%);
  max-width: 42rem;
  line-height: 1.65;
}

.hero-cta {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.preview-wrap {
  margin-top: 2.75rem;
  width: 100%;
  max-width: 56rem;
}

/* Story type cards */
.story-types-grid {
  display: grid;
  gap: 1rem;
}

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

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

.story-type-card {
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 100%;
}

.story-type-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.story-type-card p {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
  flex: 1;
}

.story-type-card .use-icon {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.65rem;
}

/* Preview mock (hero demo panel) */
.preview-wrap .glass {
  padding: 0.75rem;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 32px 80px -20px rgba(0, 0, 0, 0.18),
    0 16px 48px var(--glass-shadow);
}

@media (min-width: 768px) {
  .preview-wrap .glass { padding: 1rem; }
}

.player-stage--placeholder {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72) 0%, rgba(240, 245, 250, 0.85) 100%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.demo-placeholder {
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.01em;
}

.player-time {
  font-size: 10px;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

.player-mock {
  overflow: hidden;
  user-select: none;
  font-size: 11px;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid hsl(var(--border));
}

.player-bar .dot-row { display: flex; gap: 0.3rem; }
.player-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--border)); }
.player-bar .dot:first-child { background: #ff5f57; }
.player-bar .dot:nth-child(2) { background: #febc2e; }
.player-bar .dot:nth-child(3) { background: #28c840; }

.player-title {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #eef1f6 0%, #e4e9f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-stage img,
.player-stage .stage-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hint-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #7aab8c;
  border: 3px solid #f0f7f1;
  box-shadow: 0 0 0 4px rgba(122, 171, 140, 0.25), 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: hint-pulse 2s ease-in-out infinite;
}

.hint-pin--1 { top: 38%; left: 52%; }
.hint-pin--2 { top: 58%; left: 28%; }

@keyframes hint-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.hint-bubble {
  position: absolute;
  background: rgba(240, 247, 241, 0.95);
  border: 1px solid rgba(122, 171, 140, 0.4);
  border-radius: 0.5rem;
  padding: 0.35rem 0.55rem;
  font-size: 10px;
  font-weight: 500;
  color: #3d5c4a;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hint-bubble--1 { top: 28%; left: 56%; }
.hint-bubble--2 { top: 48%; left: 32%; }

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}

.scrubber {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--brand-mark) 35%, hsl(var(--border)) 35%);
}

.frame-strip {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem 0.65rem;
  border-top: 1px solid hsl(var(--border));
  overflow-x: auto;
}

.frame-thumb {
  flex: 0 0 52px;
  height: 32px;
  border-radius: 0.35rem;
  border: 1px solid hsl(var(--border));
  background: linear-gradient(135deg, #e8ecf2, #dde3ec);
}

.frame-thumb--active {
  border-color: var(--brand-mark);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

/* Sections */
.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

@media (min-width: 768px) { .section { padding: 5rem 2.5rem; } }

.section-header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-top: 0.5rem;
}

.section-header p {
  margin-top: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.steps-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

.step-card {
  padding: 1.5rem;
  transition: transform 0.2s ease;
}

.step-card:hover { transform: translateY(-2px); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: var(--brand-soft);
  color: var(--brand-gradient-end);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* Use cases */
.use-grid {
  display: grid;
  gap: 1rem;
}

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

.use-card {
  padding: 1.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.use-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  color: hsl(var(--foreground));
}

.use-icon svg { width: 1.125rem; height: 1.125rem; }

.use-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.use-card p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 3rem 2rem;
}

.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.cta-band p {
  margin: 0.75rem auto 1.5rem;
  max-width: 28rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
}

/* Footer */
.footer {
  border-top: 1px solid hsl(var(--border) / 0.6);
  padding: 2.5rem 1.5rem 2rem;
  max-width: 72rem;
  margin: 0 auto;
}

@media (min-width: 768px) { .footer { padding: 2.5rem 2.5rem 2rem; } }

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  max-width: 22rem;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.75rem;
}

.footer-col ul { list-style: none; }

.footer-col li + li { margin-top: 0.5rem; }

.footer-col a {
  font-size: 0.875rem;
  color: hsl(var(--foreground) / 0.75);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover { color: hsl(var(--foreground)); }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border) / 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.footer-bottom__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.footer-bottom a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
}

.footer-bottom a:hover { color: hsl(var(--foreground)); }

/* Legal pages */
.legal-page { padding: 2rem 1.5rem 4rem; max-width: 42rem; margin: 0 auto; }
@media (min-width: 768px) { .legal-page { padding: 3rem 2.5rem 5rem; } }

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.legal-page p,
.legal-page li {
  font-size: 0.9375rem;
  color: hsl(var(--foreground) / 0.85);
  margin-bottom: 0.75rem;
}

.legal-page ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.legal-page a { color: var(--brand-gradient-end); }

:root[data-brand-theme="ink"] .legal-page a { color: hsl(var(--foreground)); }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.legal-back:hover { color: hsl(var(--foreground)); }

/* Motion */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(var(--fy, 16px)); }
  to { opacity: 1; transform: translateY(0); }
}

.motion {
  opacity: 0;
  animation: fadeUp var(--dur, 0.6s) cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s) both;
}

:focus-visible { outline: 2px solid var(--brand-mark); outline-offset: 2px; }
