/* StorySiege marketing site. Colors and type match the app: quiet UI, the paintings carry the color. */

@font-face {
  font-family: 'Oswald';
  src: url('fonts/oswald-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #080a0f;
  --surface: #171c27;
  --line: #2a3443;
  --ivory: #f7f5f0;
  --slate: #a9b3c2;
  --gold: #ffc95c;
  --ink: #101114;
  --display: 'Oswald', Impact, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
:where(a, button):focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
p { margin: 0; text-wrap: pretty; }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(env(safe-area-inset-top), 14px) var(--gutter) 14px;
  /* Lines up with the 1280px content column on wide screens. */
  padding-inline: max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter)));
  transition: background-color 0.3s, box-shadow 0.3s;
}
.topbar.is-solid {
  background: rgba(8, 10, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
/* The small button waits until the hero's own button has scrolled away. */
.topbar .store-small { opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.topbar.is-solid .store-small { opacity: 1; pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }

/* ---------- App Store button ---------- */

.store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 16px;
  background: var(--ivory);
  color: var(--ink);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.2s;
}
.store:hover { background: #fff; }
.store:active { transform: scale(0.98); }
.store[aria-disabled='true'] { background: var(--surface); color: var(--slate); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.store-small { min-height: 40px; padding: 0 16px; border-radius: 12px; font-size: 0.9375rem; }

.fine { margin-top: 12px; font-size: 0.875rem; color: var(--slate); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-art, .hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-art img { animation: push-in 30s ease-out both; }
@keyframes push-in { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(8, 10, 15, 0.55), transparent 22%),
    linear-gradient(to top, var(--bg) 2%, rgba(8, 10, 15, 0.75) 32%, transparent 68%),
    linear-gradient(to right, rgba(8, 10, 15, 0.55), transparent 60%);
}
.hero-copy {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 9vh, 104px);
}
.hero h1 {
  max-width: 13ch;
  font-size: clamp(2.75rem, 7.4vw, 6rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.lede {
  max-width: 34rem;
  margin: 20px 0 32px;
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  color: #e6e2da;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* ---------- How it reads ---------- */

.how {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.how-copy p { margin-top: 20px; color: var(--slate); font-size: 1.1875rem; max-width: 30rem; }
.phones { display: flex; justify-content: center; gap: clamp(12px, 2vw, 24px); }
.phone {
  margin: 0;
  flex: 1 1 0;
  max-width: 250px;
  padding: 6px;
  border-radius: 34px;
  background: #1c1f26;
  box-shadow: inset 0 0 0 1px #3a3f4a, 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.phone img { border-radius: 28px; width: 100%; height: auto; }
.phone:nth-child(2) { transform: translateY(-28px); }

/* ---------- Full-width painting bands ---------- */

.band, .finale {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
}
.band { min-height: clamp(420px, 56vw, 820px); }
.band-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.band-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, var(--bg), transparent 18%),
    linear-gradient(to top, var(--bg) 1%, rgba(8, 10, 15, 0.7) 30%, transparent 62%);
}
.band-copy {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(40px, 7vw, 96px);
}
.band-copy p {
  max-width: 24ch;
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.band-copy footer {
  margin-top: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Storylines ---------- */

.stories {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(80px, 11vw, 144px) var(--gutter);
}
.section-head { max-width: 40rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { margin-top: 16px; color: var(--slate); font-size: 1.1875rem; }

.story-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 36px 24px;
}
.story img {
  width: 100%;
  height: auto;
  aspect-ratio: 1020 / 400;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
  background: var(--surface);
}
.story h3 { font-size: 1.625rem; text-transform: uppercase; letter-spacing: 0.01em; }
.story .years { margin: 4px 0 0; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; color: var(--gold); }

/* ---------- Finale ---------- */

.finale { min-height: clamp(520px, 62vw, 860px); align-items: center; text-align: center; }
.finale-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, var(--bg), transparent 30%, transparent 70%, var(--bg)),
    radial-gradient(ellipse at center, rgba(8, 10, 15, 0.72), rgba(8, 10, 15, 0.35) 70%);
}
.finale-copy { width: 100%; padding: 80px var(--gutter); }
.finale-icon { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 28px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.finale h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 32px; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5); }
.finale .fine { color: #e6e2da; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px var(--gutter) max(env(safe-area-inset-bottom), 40px);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--slate);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ivory); }

/* ---------- Support and legal pages ---------- */

.page-main { max-width: 760px; margin: 0 auto; padding: 128px var(--gutter) 96px; }
.legal h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
.legal h2 { font-size: 1.5rem; margin-top: 44px; }
.legal p { margin-top: 14px; color: #d6d9df; }
.legal .legal-updated { color: var(--slate); }
.legal a { color: var(--gold); overflow-wrap: anywhere; }

/* ---------- Scroll reveal (only when scripts run and motion is welcome) ---------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-art img { animation: none; }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 860px) {
  .how { grid-template-columns: 1fr; }
  .phones { margin: 0 -8px; }
  .phone { border-radius: 26px; padding: 4px; }
  .phone img { border-radius: 22px; }
  .phone:nth-child(2) { transform: translateY(-16px); }
}
@media (max-width: 520px) {
  .topbar { padding-bottom: 10px; }
  .brand { font-size: 1.125rem; }
  .brand img { width: 28px; height: 28px; }
  .hero-copy .store, .finale .store { width: 100%; }
  .phone:nth-child(3) { display: none; }
  .footer { justify-content: center; text-align: center; }
}

/* Shades reach a pixel past each edge, so the painting never shows a hairline seam. */
.hero-shade, .band-shade, .finale-shade { inset: -1px 0; }

/* Phones: storylines as a compact two-column grid. */
@media (max-width: 600px) {
  .story-grid { grid-template-columns: 1fr 1fr; gap: 24px 14px; }
  .story img { aspect-ratio: 4 / 3; margin-bottom: 10px; border-radius: 12px; }
  .story h3 { font-size: 1.1875rem; }
  .story .years { margin: 2px 0 0; font-size: 0.75rem; }
}

/* Narrow screens see a slice of each wide painting; --focus keeps its subject in that slice. */
@media (max-width: 900px) {
  .band-art { object-position: var(--focus, 50%) 50%; }
}
