/* StormWing website — styled after the game's art: Pacific ocean, gold italic logo, glass HUD panels. */
:root {
  --ocean-hi: #0d5a86;
  --ocean: #08406a;
  --ocean-deep: #052648;
  --navy: #041528;
  --panel: rgba(4, 18, 38, 0.78);
  --panel-solid: #071d38;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #ffd866;
  --gold-hi: #fff3c4;
  --orange: #ff8d2a;
  --cyan: #59d6ff;
  --red: #ff5a4a;
  --green: #6ff08a;
  --text: #eef4fb;
  --muted: #a8bdd6;
  --display: "Avenir Next", "Avenir", "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --body: "Avenir Next", "Avenir", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --radius: 20px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font: 17px/1.6 var(--body);
  background-color: var(--ocean-deep);
  /* Short curved wave marks, like the in-game ocean tile */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><g fill='none' stroke='%23bfe8ff' stroke-linecap='round'><path d='M12 20 q7 -4 14 0' stroke-opacity='.22' stroke-width='1.6'/><path d='M96 14 q6 -3 12 0' stroke-opacity='.15' stroke-width='1.3'/><path d='M140 46 q8 -4 16 0' stroke-opacity='.2' stroke-width='1.6'/><path d='M40 64 q5 -3 10 0' stroke-opacity='.14' stroke-width='1.2'/><path d='M78 90 q8 -4 16 0' stroke-opacity='.22' stroke-width='1.7'/><path d='M150 112 q5 -3 10 0' stroke-opacity='.16' stroke-width='1.3'/><path d='M18 128 q7 -4 14 0' stroke-opacity='.18' stroke-width='1.5'/><path d='M104 150 q6 -3 12 0' stroke-opacity='.2' stroke-width='1.4'/><path d='M56 168 q8 -4 16 0' stroke-opacity='.15' stroke-width='1.5'/><path d='M160 172 q5 -3 10 0' stroke-opacity='.13' stroke-width='1.2'/></g></svg>"),
    radial-gradient(ellipse 120% 80% at 50% 0%, var(--ocean-hi) 0%, var(--ocean) 45%, var(--ocean-deep) 100%);
  background-attachment: scroll, fixed;
  animation: sea 40s linear infinite;
  overflow-x: hidden;
}
@keyframes sea { to { background-position: 0 180px, 0 0; } }

a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Decorative sky: drifting clouds and islands ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.cloud {
  position: absolute;
  width: 380px; height: 220px;
  background:
    radial-gradient(closest-side at 30% 55%, rgba(255,255,255,.85), rgba(255,255,255,0)),
    radial-gradient(closest-side at 55% 40%, rgba(255,255,255,.9), rgba(255,255,255,0)),
    radial-gradient(closest-side at 75% 60%, rgba(255,255,255,.75), rgba(255,255,255,0));
  filter: blur(6px);
  opacity: .55;
  animation: drift 46s linear infinite;
}
.cloud.c2 { left: 62%; width: 460px; animation-duration: 58s; animation-delay: -20s; opacity: .45; }
.cloud.c3 { left: -8%; animation-duration: 52s; animation-delay: -38s; opacity: .4; }
.cloud.c1 { left: 20%; }
@keyframes drift { from { transform: translateY(-260px); } to { transform: translateY(calc(100vh + 260px)); } }

.island {
  position: absolute;
  width: 240px; height: 200px;
  border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%;
  background:
    radial-gradient(circle at 38% 36%, #3f6f2d 0 6%, transparent 7%),
    radial-gradient(circle at 60% 52%, #2f5c22 0 7%, transparent 8%),
    radial-gradient(circle at 45% 62%, #356626 0 6%, transparent 7%),
    radial-gradient(ellipse at 50% 50%, #4f8a35 0 52%, #f0dca2 54% 64%, rgba(110,215,210,.75) 66% 74%, transparent 76%);
  filter: drop-shadow(0 0 24px rgba(90, 230, 220, .55));
  opacity: .9;
  animation: drift 70s linear infinite;
}
.island.i1 { left: 70%; animation-delay: -10s; }
.island.i2 { left: -60px; width: 300px; height: 250px; animation-delay: -45s; }

main, header.site, footer.site { position: relative; z-index: 1; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(3, 14, 30, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img.icon { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.brand img.word { height: 28px; width: auto; }
nav.links { margin-left: auto; display: flex; gap: 22px; }
nav.links a { color: var(--text); text-decoration: none; font: 700 14px var(--display); letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--gold); opacity: 1; }

/* ---------- Type ---------- */
h1, h2, h3, .display { font-family: var(--display); font-style: italic; font-weight: 900; letter-spacing: .01em; line-height: 1.08; margin: 0; }
h2.title {
  font-size: clamp(30px, 4.6vw, 46px);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(2px 3px 0 rgba(0, 10, 25, .55));
}
.kicker { font: 800 13px var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); margin: 0 0 10px; }
.lede { color: var(--muted); font-size: 19px; max-width: 640px; }

/* Hazard-stripe bar used under section titles and as dividers */
.hazard {
  height: 10px; border-radius: 3px; width: 120px; margin: 14px 0 0;
  background: repeating-linear-gradient(-45deg, #ffc61a 0 12px, #111 12px 24px);
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.center .hazard { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 14px;
  font: 900 italic 19px var(--display); letter-spacing: .02em; color: #fff; text-decoration: none;
  text-shadow: 1.5px 2px 0 rgba(0,0,0,.35);
  background: linear-gradient(180deg, #ffb25e, var(--orange) 50%, #c95f10);
  border: 1.5px solid rgba(255,255,255,.35);
  box-shadow: 0 8px 24px rgba(255, 141, 42, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 141, 42, .5); }
.btn.cyan { background: linear-gradient(180deg, #8ee6ff, #2fb6e0 50%, #1678a0); box-shadow: 0 8px 24px rgba(89, 214, 255, .35); }
.btn.ghost { background: var(--panel); box-shadow: none; border-color: rgba(89,214,255,.6); }
.btn small { font: 700 12px var(--body); font-style: normal; opacity: .85; display: block; letter-spacing: .04em; }
.btn .stack { display: flex; flex-direction: column; line-height: 1.1; }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(89, 214, 255, .35);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.panel.gold { border-color: rgba(255, 216, 102, .5); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero .logo { width: min(560px, 100%); filter: drop-shadow(0 8px 30px rgba(255, 150, 40, .35)); }
.hero .tag { font: 800 15px var(--display); letter-spacing: .3em; color: var(--text); opacity: .9; margin: 6px 0 22px 6px; }
.hero p.lede { margin: 0 0 28px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { font: 700 12px var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: rgba(4,18,38,.78); border: 1px solid var(--line); color: var(--muted); }

.hero-art { position: relative; justify-self: center; }
.hero-art .plane {
  position: absolute; width: 150px; left: -70px; bottom: 60px; z-index: 2;
  filter: drop-shadow(26px 40px 0 rgba(0, 12, 30, .35));
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(6px, -12px) rotate(-3deg); } }

/* Phone frame around screenshots */
.phone {
  width: 300px; aspect-ratio: 1320 / 2868;
  border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #2a2f38, #0c0e12);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.12) inset, 0 30px 60px rgba(0,0,0,.5);
  position: relative;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.hero-art .phone { transform: rotate(4deg); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { margin-bottom: 36px; }
.section-head.center { text-align: center; }
.section-head.center .lede { margin: 14px auto 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 24px; }
.feature .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(255,216,102,.25), rgba(255,141,42,.15)); border: 1px solid rgba(255,216,102,.4);
}
.feature .ico svg { width: 24px; height: 24px; stroke: var(--gold); }
.feature h3 { font-size: 22px; color: #fff; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

/* Screenshot carousel */
.gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px 16px 30px; margin: 0 -16px;
  scrollbar-width: thin; scrollbar-color: var(--cyan) transparent;
}
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.gallery .phone { width: 240px; }
.gallery figcaption { margin-top: 14px; font: 800 italic 15px var(--display); color: var(--gold); letter-spacing: .04em; }

/* Bosses strip */
.bosses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.boss { padding: 16px 12px; text-align: center; }
.boss .n { font: 900 italic 28px var(--display); color: var(--red); }
.boss .name { font: 800 italic 15px var(--display); letter-spacing: .06em; color: #fff; }
.boss .where { font-size: 13px; color: var(--muted); }

/* Tempest expansion */
.tempest { position: relative; }
.tempest .panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: center; padding: 36px; border-color: rgba(89, 214, 255, .55); }
.tempest h2.title { background: linear-gradient(180deg, #d9f6ff, var(--cyan) 50%, #1d8fc0); -webkit-background-clip: text; background-clip: text; }
.tempest .price { display: inline-block; font: 900 italic 22px var(--display); color: var(--navy); background: var(--cyan); padding: 4px 14px; border-radius: 999px; margin: 14px 0 18px; }
.tempest ul { list-style: none; padding: 0; margin: 0 0 24px; }
.tempest li { padding: 8px 0 8px 30px; position: relative; color: var(--text); }
.tempest li::before { content: ""; position: absolute; left: 0; top: 14px; width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--cyan), #1d8fc0); transform: rotate(45deg); }
.tempest .ipad { border-radius: 22px; box-shadow: 0 24px 50px rgba(0,0,0,.5); border: 8px solid #15181e; }

/* iPad / platforms band */
.band { padding: 28px; display: flex; flex-wrap: wrap; gap: 18px 36px; justify-content: center; text-align: center; }
.band .stat .v { font: 900 italic 34px var(--display); color: var(--gold); }
.band .stat .l { font: 700 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Document pages (privacy, support) ---------- */
.page-hero { padding: 64px 0 28px; text-align: center; }
.page-hero h1 { font-size: clamp(38px, 6vw, 60px); background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(2px 3px 0 rgba(0, 10, 25, .55)); }
.page-hero .plane-small { width: 80px; margin: 0 auto 16px; filter: drop-shadow(14px 22px 0 rgba(0,12,30,.35)); animation: bob 4s ease-in-out infinite; }
.doc { max-width: 760px; margin: 0 auto 72px; padding: 0 16px; }
.doc .panel { padding: 8px 28px 28px; margin-bottom: 18px; }
.doc h2 { font-size: 24px; color: var(--gold); margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc .muted { color: var(--muted); }
.doc .highlight { border-color: rgba(255, 216, 102, .55); }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font: 800 italic 19px var(--display); color: #fff; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-style: normal; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--muted); }
.mail { font: 800 italic 20px var(--display); }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); background: rgba(3, 12, 26, .8); padding: 34px 0; margin-top: 20px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer.site .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer.site a { color: var(--muted); text-decoration: none; font-weight: 600; }
footer.site a:hover { color: var(--gold); }
footer.site small { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .tempest .panel { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; text-align: center; }
  .hero .ctas, .hero .facts { justify-content: center; }
  .hero .tag { margin-left: 0; }
  .hero .logo { margin: 0 auto; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .hero-art { margin-top: 10px; }
  .features { grid-template-columns: 1fr 1fr; }
  .bosses { grid-template-columns: repeat(3, 1fr); }
  .tempest .panel { padding: 24px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .island { opacity: .35; }
  nav.links { gap: 14px; }
  nav.links a { font-size: 12px; letter-spacing: .04em; }
  .brand img.word { display: none; }
  .features { grid-template-columns: 1fr; }
  .bosses { grid-template-columns: 1fr 1fr; }
  .hero-art .phone { width: 230px; }
  .hero-art .plane { width: 110px; left: -36px; }
  .gallery .phone { width: 200px; }
  section { padding: 52px 0; }
  .doc .panel { padding: 4px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cloud, .island { display: none; }
}

/* Apple's official App Store badge */
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .15s ease; }
.store-badge img { height: 56px; width: auto; display: block; }
.store-badge:hover { transform: translateY(-2px); }
.tempest .store-badge { margin-top: 14px; }
.tempest .store-badge img { height: 48px; }
@media (prefers-reduced-motion: reduce) { .store-badge:hover { transform: none; } }
