/*
 * FlipYouOff marketing site — shared styles.
 * Palette mirrors the app's design tokens (see lib/theme.ts in the app repo):
 * dark surfaces with a hot-pink accent.
 */

:root {
  --bg: #0a0a0f;
  --bg-elevated: #15151f;
  --surface: #1f1f2e;
  --surface-active: #2a2a3d;
  --border: #2f2f44;
  --text: #f5f5f7;
  --text-muted: #9a9aae;
  --accent: #ff3b6b;
  --accent-muted: #7a1d36;
  --danger: #ff5454;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 120px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__brand img {
  height: 104px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav__links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

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

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: #ff5481;
}

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

.btn--ghost:hover {
  background: var(--surface-active);
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Store badges ---------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  min-width: 200px;
}

.store-badge:hover {
  background: var(--surface-active);
  text-decoration: none;
}

.store-badge__glyph {
  font-size: 1.7rem;
  line-height: 1;
}

.store-badge__text small {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.store-badge__text span {
  font-size: 1.1rem;
  font-weight: 700;
}

.store-badge[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero img.hero__logo {
  width: min(440px, 82vw);
  height: auto;
  margin: 0 auto 28px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 34px;
}

.hero .store-badges {
  justify-content: center;
}

/* ---------- Sections ---------- */
section.block {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

section.block h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 12px;
  text-align: center;
}

section.block .section-sub {
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 44px;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 14px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.flip-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.flip-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder shown until real curated images are dropped into web/flips/. */
.flip-card--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(145deg, var(--surface), var(--accent-muted));
  color: var(--text);
  padding: 16px;
}

.flip-card--placeholder .emoji {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.flip-card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 0.85rem;
}

.flip-card__caption .style-tag {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Forms ---------- */
.form {
  max-width: 560px;
  margin: 0 auto;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.form__status {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  display: none;
}

.form__status.is-success {
  display: block;
  background: rgba(45, 200, 120, 0.12);
  border: 1px solid #2dc878;
  color: #6ee7a8;
}

.form__status.is-error {
  display: block;
  background: rgba(255, 84, 84, 0.12);
  border: 1px solid var(--danger);
  color: #ff9a9a;
}

/* ---------- Legal / long-form text ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 0;
}

.legal h1 {
  font-size: 2.2rem;
  margin: 0 0 6px;
}

.legal .updated {
  color: var(--text-muted);
  margin: 0 0 8px;
}

.legal .draft-note {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 32px;
}

.legal h2 {
  font-size: 1.3rem;
  margin: 36px 0 10px;
}

.legal p,
.legal li {
  color: #d9d9e3;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer nav a {
  color: var(--text-muted);
}

.site-footer nav a:hover {
  color: var(--text);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 120px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    padding: 14px 20px;
    width: 100%;
  }

  .steps,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
