/* Screwtopia site. Plain CSS, no framework. Colours come from the game itself: sky blue, deep blue, gold. */
@font-face { font-family: "Fredoka"; src: url("../fonts/Fredoka-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --sky: #8fd2ff; --sky-2: #d9f0ff; --sky-3: #f3faff;
  --blue: #1f5fd1; --blue-d: #153f95; --navy: #10265a;
  --gold: #ffbd2e; --gold-d: #e39a10; --gold-l: #ffe08a;
  --pink: #ff7aa8; --green: #43c872; --purple: #8a63f0;
  --text: #1c2d55; --muted: #51628c; --card: #ffffff; --line: #d5e6f7;
  --radius: 22px; --shadow: 0 10px 30px rgba(18, 52, 120, .14);
  --head: "Fredoka", "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--body); color: var(--text); background: var(--sky-3); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; color: var(--navy); letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(243, 250, 255, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 1.35rem; color: var(--navy); text-decoration: none; }
.brand img { border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav-links a:hover { color: var(--blue); }
.nav-links a.btn { color: #4a2e00; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; font: 700 1.05rem/1 var(--head); letter-spacing: .02em; text-decoration: none; border-radius: 16px; padding: 16px 26px; transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(2px); }
.btn-primary { background: linear-gradient(#ffd45c, var(--gold)); color: #4a2e00; box-shadow: 0 5px 0 var(--gold-d), 0 10px 20px rgba(227, 154, 16, .3); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-blue { background: linear-gradient(#3b86ee, var(--blue)); color: #fff; box-shadow: 0 5px 0 var(--blue-d), 0 10px 20px rgba(31, 95, 209, .28); }
.btn-sm { padding: 11px 18px; font-size: .95rem; border-radius: 13px; box-shadow: 0 3px 0 var(--gold-d); }
.btn .soon { font-size: .68rem; letter-spacing: .08em; background: rgba(0,0,0,.14); padding: 4px 8px; border-radius: 99px; }
.store-btn { background: var(--navy); color: #fff; box-shadow: 0 5px 0 #050f2c, 0 12px 22px rgba(16, 38, 90, .3); padding: 12px 22px 12px 18px; text-align: left; }
.store-btn small { display: block; font: 600 .72rem/1.1 var(--body); opacity: .8; letter-spacing: .03em; }
.store-btn strong { display: block; font: 700 1.2rem/1.15 var(--head); }
.store-btn svg { width: 30px; height: 30px; flex: none; }

/* hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 62%, var(--sky-3) 100%); padding: 56px 0 0; }
.hero::before, .hero::after { content: ""; position: absolute; background: #fff; border-radius: 99px; opacity: .85; filter: blur(.5px); }
.hero::before { width: 220px; height: 64px; left: -60px; top: 120px; box-shadow: 70px -28px 0 -6px #fff, 130px 6px 0 -14px #fff; }
.hero::after { width: 180px; height: 52px; right: -40px; top: 60px; box-shadow: -60px 22px 0 -8px #fff, -110px -10px 0 -16px #fff; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--blue); font: 700 .82rem/1 var(--head); letter-spacing: .08em; text-transform: uppercase; padding: 9px 14px; border-radius: 99px; box-shadow: var(--shadow); margin-bottom: 18px; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: block; }
.hero h1 { color: var(--navy); text-shadow: 0 3px 0 rgba(255,255,255,.7); margin-bottom: .3em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.lead { font-size: 1.2rem; color: var(--text); max-width: 31em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 14px; }
.hero-note { color: var(--muted); font-size: .95rem; margin: 0; }
.hero-art { position: relative; display: flex; justify-content: center; padding-bottom: 0; }
.phone { width: min(300px, 62vw); aspect-ratio: 9 / 16; border-radius: 34px; background: #111b3a; padding: 9px; box-shadow: 0 30px 50px rgba(16, 38, 90, .35), inset 0 0 0 2px #2a3a6b; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.phone.tilt-l { transform: rotate(-5deg); }
.phone.tilt-r { transform: rotate(5deg); }
.hero-art .phone.main { position: relative; z-index: 2; margin-bottom: -60px; }
.hero-art .phone.back { position: absolute; width: min(230px, 46vw); opacity: .98; }
.hero-art .back.a { left: -2%; bottom: -30px; z-index: 1; }
.hero-art .back.b { right: -2%; bottom: -30px; z-index: 1; }
.hero-tail { height: 70px; }

/* sections */
section { padding: 84px 0; scroll-margin-top: 66px; }
.sec-head { text-align: center; max-width: 40em; margin: 0 auto 46px; }
.kicker { display: inline-block; font: 700 .85rem/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); background: #e5f1ff; border-radius: 99px; padding: 8px 14px; margin-bottom: 14px; }
.sec-head p { color: var(--muted); font-size: 1.1rem; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { background: var(--card); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -20px; left: 24px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 1.4rem/1 var(--head); color: #4a2e00; background: linear-gradient(#ffd45c, var(--gold)); box-shadow: 0 3px 0 var(--gold-d); }
.step h3 { margin-top: 10px; }
.step p { color: var(--muted); margin: 0; }

/* features */
.features { background: #fff; border-block: 1px solid var(--line); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat { background: var(--sky-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; }
.feat .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; font: 700 1.6rem/1 var(--head); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.16); }
.feat:nth-child(6n+1) .ico { background: var(--blue); }
.feat:nth-child(6n+2) .ico { background: var(--pink); }
.feat:nth-child(6n+3) .ico { background: var(--green); }
.feat:nth-child(6n+4) .ico { background: var(--purple); }
.feat:nth-child(6n+5) .ico { background: var(--gold-d); }
.feat:nth-child(6n+6) .ico { background: #1fb5c9; }
.feat p { color: var(--muted); margin: 0; }

/* gallery */
.gallery { background: linear-gradient(180deg, var(--sky-3), var(--sky-2)); overflow: hidden; }
.shots { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 16px 34px; margin: 0 -16px; scrollbar-width: thin; }
.shots figure { margin: 0; flex: 0 0 min(250px, 68vw); scroll-snap-align: center; }
.shots img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 24px; border: 6px solid #111b3a; box-shadow: var(--shadow); background: #111b3a; }
.shots figcaption { text-align: center; font: 700 1rem/1.2 var(--head); color: var(--navy); margin-top: 12px; }

/* tools */
.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tool { background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 22px 14px; text-align: center; }
.tool b { display: block; font: 700 1.15rem/1.2 var(--head); color: var(--navy); margin-bottom: 6px; }
.tool span { color: var(--muted); font-size: .94rem; line-height: 1.4; display: block; }
.tool .dot { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 12px; box-shadow: 0 4px 0 rgba(0,0,0,.14); }

/* trust */
.trust { background: var(--navy); color: #dbe7ff; }
.trust h2, .trust h3 { color: #fff; }
.trust .kicker { background: rgba(255,255,255,.12); color: var(--gold-l); }
.trust .sec-head p { color: #b8c9ee; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trust-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 26px; }
.trust-card p { margin: 0; color: #c9d8f7; }
.trust a { color: var(--gold-l); }

/* faq */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; }
summary { cursor: pointer; font: 700 1.15rem/1.3 var(--head); color: var(--navy); padding: 18px 28px 18px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 700 1.6rem/1 var(--head); color: var(--blue); }
details[open] summary::after { content: "\2212"; }
details p { color: var(--muted); padding-bottom: 6px; }

/* final call */
.final { background: linear-gradient(180deg, var(--sky-3), var(--sky)); text-align: center; padding-bottom: 90px; }
.final .cta-row { justify-content: center; }
.final img.icon { margin: 0 auto 18px; border-radius: 28px; box-shadow: var(--shadow); }

/* pages (privacy, support) */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.5rem; margin-top: 1.8em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: .4em; }
.doc .updated { color: var(--muted); }

/* footer */
.site-footer { background: #0b1b44; color: #b4c4ea; padding: 54px 0 30px; font-size: .96rem; }
.site-footer a { color: #dbe7ff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-small { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); display: grid; gap: 8px; font-size: .86rem; color: #8fa3d4; }

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

/* responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .steps, .feat-grid, .trust-grid { grid-template-columns: 1fr; }
  .tools { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 64px 0; }
  .steps { gap: 36px; }
  .nav-links a:not(.btn) { display: none; }
  .hero-art .phone.back { display: none; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .btn { padding: 15px 22px; }
  .tools { grid-template-columns: 1fr 1fr; gap: 12px; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* forms (support, delete account) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form { display: grid; gap: 16px; margin: 18px 0 14px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font: 700 .95rem/1.2 var(--head); color: var(--navy); }
.field input, .field textarea { font: inherit; color: var(--text); background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 13px 14px; width: 100%; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 95, 209, .15); }
.form .btn { justify-self: start; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 600; }
.form-status[data-state="success"] { color: #1d8a4a; }
.form-status[data-state="error"] { color: #c0392b; }
.faq-left { margin: 0 0 8px; max-width: none; }
.doc p a, .doc li a { overflow-wrap: anywhere; }
.doc li > p { margin: 0 0 .5em; }
.doc .prose-note { color: var(--muted); }

/* tool icons (the game's own clay pictures) and two store buttons side by side */
.tool img { width: 80px; height: 80px; margin: 0 auto 8px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(16, 38, 90, .18)); }
.cta-row .store-btn { flex: 0 1 auto; }
@media (max-width: 480px) { .cta-row .store-btn { flex: 1 1 100%; justify-content: center; } }

/* official store badges (shown once the store link is set): unaltered, clear space kept */
.store-btn.is-live { background: none; box-shadow: none; padding: 0; border-radius: 0; }
.store-btn.is-live:active { transform: none; }
.store-btn img.badge[data-kind="get"] { height: 76px; width: auto; }
.store-btn img.badge[data-kind="pre"] { height: 52px; width: auto; margin: 6px 8px; }
.store-btn img.badge[src*=".svg"] { height: 48px; width: auto; margin: 8px; }
.store-btn img.badge[hidden] { display: none; }
