/* ShotGenius — shotgenius.app · day-face design system */
:root {
  --ink: #17120F;
  --cream: #F5EBDD;
  --paper: #FBF7F0;
  /* --gold mirrors the app's .appTint (AppTintColor.colorset, sRGB 0.867/0.639/0.357) */
  --gold: #DDA35B;
  --gold-hover: #C18F50;
  --caramel: #7A4A21;
  --cream-on-ink: #F5EBDD;
  --shadow: 0 6px 24px rgba(122, 74, 33, .12);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--caramel); text-decoration-color: rgba(122, 74, 33, .35); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--caramel); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; max-width: 62ch; text-wrap: pretty; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 235, 221, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(122, 74, 33, .12);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.nav .brand { display: flex; align-items: center; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.25rem; }
.nav .brand img { width: 38px; height: 38px; border-radius: 9px; margin-right: 12px; }
.brand sup { font-size: .7em; font-weight: 700; align-self: flex-start; margin-top: .2em; color: rgba(23, 18, 15, .55); }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav ul a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav ul a:hover { color: var(--caramel); }
.lang-switch {
  font-size: .85rem; font-weight: 600; color: var(--caramel);
  text-decoration: none; border: 1px solid rgba(122, 74, 33, .3);
  border-radius: 999px; padding: 4px 12px;
}
.lang-switch:hover { background: var(--paper); }
.btn {
  display: inline-block; background: var(--gold); color: var(--ink);
  font-weight: 600; text-decoration: none; border-radius: 999px;
  padding: 10px 22px; font-size: .95rem; transition: background .2s;
}
.btn:hover { background: var(--gold-hover); color: var(--ink); }
@media (max-width: 760px) { .nav ul { display: none; } }

/* Phone-width nav: the full-size brand + EN pill + Download pill overflow 375px
   viewports by ~20px — tighten the chrome instead of dropping an element. */
@media (max-width: 480px) {
  .nav .wrap { gap: 12px; padding-left: 16px; padding-right: 16px; }
  .nav .brand { font-size: 1.05rem; }
  .nav .brand img { width: 30px; height: 30px; margin-right: 8px; }
  .nav .btn { padding: 9px 16px; font-size: .9rem; }
}

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.hero .wrap {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px;
  align-items: center; padding-top: 72px; padding-bottom: 72px; min-height: 560px;
}
.hero .sub { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 44ch; }
.hero .cta { margin: 28px 0 12px; }
.hero .cta img { height: 56px; width: auto; }
.hero .under-cta { font-weight: 600; color: var(--caramel); margin-bottom: 6px; }
.hero .micro { font-size: .88rem; color: rgba(23, 18, 15, .65); }
.phone {
  width: min(280px, 70vw); margin: 0 auto;
  border: 10px solid var(--ink); border-radius: 42px;
  box-shadow: 0 24px 60px rgba(23, 18, 15, .25);
  overflow: hidden; background: var(--ink);
}
.phone img { width: 100%; border-radius: 30px; }
.hero .phone { margin-left: 0; }
@media (max-width: 860px) {

  /* Single-column hero: center the whole block (headline, badge, info lines,
     phone) — a left-ragged column reads unfinished at this width. The badge img
     is display:block (immune to text-align) and .hero .phone pins margin-left 0
     at full width, so both re-center with explicit auto margins. */
  /* The desktop stack (section 80px + wrap 72px + 560px min-height) leaves a
     disproportionate void above the headline in one-column mode — tighten it. */
  .hero { padding-top: 0; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding-top: 40px; padding-bottom: 48px; min-height: 0; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .hero .cta img { margin-left: auto; margin-right: auto; }
  .hero .phone { order: 2; margin: 0 auto; }
}

/* ---- Sections ---- */
section { padding: 80px 0; }
.section-paper { background: var(--paper); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.stat {
  background: var(--cream); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
}
.stat strong { display: block; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--caramel); margin-bottom: 6px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.feature {
  background: var(--paper); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.feature h3 { color: var(--ink); margin-bottom: .3em; }
.feature p { font-size: .95rem; margin: 0; color: rgba(23, 18, 15, .78); }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---- Dark band (Genius + carousel) ---- */
.dark-band {
  background: var(--ink) url("images/W5.jpg") center / cover no-repeat;
  color: var(--cream-on-ink); padding: 96px 0;
}
.dark-band h2 { color: var(--gold); }
.genius-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 44px; }
.genius-card {
  background: rgba(245, 235, 221, .06);
  border: 1px solid rgba(221, 163, 91, .3);
  border-radius: var(--radius); padding: 22px 18px;
}
.genius-card h3 { color: var(--gold); font-size: 1rem; margin-bottom: .35em; }
.genius-card p { font-size: .9rem; margin: 0; color: rgba(245, 235, 221, .85); }
@media (max-width: 1080px) { .genius-grid { grid-template-columns: repeat(2, 1fr); } .genius-card:last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .genius-grid { grid-template-columns: 1fr; } }

.carousel-wrap { position: relative; margin-top: 64px; }
.carousel {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 8px 48px 20px;
  scroll-padding: 0 48px;
  scrollbar-width: none;
  /* Edge fade: partially visible phones dissolve at the sides instead of hard-clipping
     (48px matches the scroll-padding, so a snapped phone sits at full opacity) */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .phone { flex: 0 0 auto; width: 220px; scroll-snap-align: center; margin: 0; border-width: 8px; border-radius: 34px; box-shadow: 0 0 0 1px rgba(221, 163, 91, .35), 0 16px 40px rgba(0, 0, 0, .6); }
.carousel .phone img { border-radius: 24px; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px; border: none;
  background: var(--gold); color: var(--ink); font-size: 1.2rem; font-weight: 700;
  cursor: pointer; z-index: 2;
}
.car-btn:hover { background: var(--gold-hover); }
.car-btn.prev { left: -10px; } .car-btn.next { right: -10px; }
@media (max-width: 760px) {
  .car-btn { display: none; }

  /* Tighter fade: with the slim 4px gutter a 48px fade would dim the snapped phone on narrow viewports */
  .carousel {
    padding: 8px 4px 20px; scroll-padding: 0;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  }
}

/* ---- Pricing ---- */
.pricing-head img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); margin: 32px 0 48px; }
.app-card {
  background: var(--paper); border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); margin-bottom: 32px;
}
.app-card h3 { font-size: 1.35rem; }
.app-card p { max-width: none; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan {
  position: relative; background: var(--paper); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow);
}
.plan .badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--ink); font-size: .75rem; font-weight: 700;
  border-radius: 999px; padding: 3px 14px; white-space: nowrap;
}
.plan h3 { font-size: 1.2rem; }
.plan p { font-size: .95rem; margin: 0; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.packs-line { max-width: none; margin-top: 32px; font-weight: 500; text-align: center; }
.legal-lines { font-size: .82rem; color: rgba(23, 18, 15, .65); margin-top: 24px; text-align: center; }
.legal-lines p { max-width: none; margin-bottom: .4em; }

/* ---- FAQ ---- */
.faq details {
  background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 12px; padding: 0 24px;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { max-width: none; padding-bottom: 18px; margin: 0; }
.faq-divider { width: 100%; height: auto; border-radius: var(--radius); margin-top: 48px; box-shadow: var(--shadow); }

/* ---- Footer ---- */
footer { background: var(--ink); color: var(--cream-on-ink); padding: 24px 0 20px; margin-top: auto; }
footer .wrap { max-width: none; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 10px; }
footer nav a + a::before { content: "·"; margin-right: 16px; color: var(--cream-on-ink); opacity: .5; }
footer nav a:hover::before { color: var(--cream-on-ink); }
footer a { color: var(--cream-on-ink); text-decoration: none; font-size: .92rem; }
footer a:hover { color: var(--gold); }
footer .mentions { font-size: .8rem; color: rgba(245, 235, 221, .55); max-width: none; text-align: center; }

/* ---- Legal / support pages ---- */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 48px; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.doc .updated { color: var(--caramel); font-size: .9rem; margin-bottom: 2em; }
.doc h2 { font-size: 1.25rem; color: var(--ink); margin-top: 2em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }
.doc .short {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 28px; margin: 1.5em 0 2.5em;
}
.doc .short ul { margin: .5em 0 0; }
.doc-nav { border-bottom: 1px solid rgba(122, 74, 33, .12); }
.doc-nav .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.doc-nav .brand { display: flex; align-items: center; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.25rem; }
.doc-nav .brand img { width: 38px; height: 38px; border-radius: 9px; margin-right: 12px; }
.doc-nav .lang-switch { margin-left: auto; }

/* ---- 404 ---- */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 24px; }
.nf img { border-radius: var(--radius); margin: 0 auto 32px; max-width: 480px; box-shadow: var(--shadow); }
.nf .links { display: flex; gap: 16px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---- Contact form (support pages) ---- */
.contact-form { margin: 28px 0 8px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 18px; }
.contact-form .hint { font-weight: 400; color: rgba(23, 18, 15, .55); }
.contact-form input[type="email"], .contact-form input[type="text"], .contact-form textarea {
  display: block; width: 100%; box-sizing: border-box; margin-top: 6px;
  padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid rgba(122, 74, 33, .25); border-radius: 10px;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold);
}
.contact-form textarea { resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form button.btn { border: none; cursor: pointer; font: inherit; font-weight: 600; }
.contact-form .form-status { margin-top: 12px; color: var(--caramel); font-weight: 600; min-height: 1.4em; }
