/* Airplane Games website.
   Colors follow the app's design system (AirplaneModeGames/DesignSystem/Color+Hex.swift,
   Home/GameID.swift) and the app icon (navy cabin, sunset through the porthole).
   No web fonts or third-party resources: everything is system fonts and local files. */

:root {
  --bg: #F4F5FA;          /* Theme.background */
  --surface: #FFFFFF;     /* Theme.surface */
  --well: #E6E8F0;        /* Theme.well */
  --hairline: #D5D8E3;    /* Theme.hairline */
  --text: #12151F;
  --text-2: #50566A;
  --accent: #2F67D6;      /* AccentColor (#427AE6), a shade darker for text contrast */
  --navy: #253059;        /* app icon background */
  --navy-deep: #151C38;
  --sunset-1: #C14B9E;    /* the sunset through the porthole */
  --sunset-2: #E97463;
  --sunset-3: #FC9E53;
  --radius: 16px;         /* Theme.cornerRadius */
  --card-radius: 22px;    /* home screen game cards */
  --shadow: 0 1px 2px rgba(20, 26, 48, .06), 0 8px 24px rgba(20, 26, 48, .08);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1016;
    --surface: #1B1E27;
    --well: #262A36;
    --hairline: #353A48;
    --text: #F2F3F7;
    --text-2: #A9AFC0;
    --accent: #66A0FF;    /* AccentColor, dark appearance */
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 400px) { .container { padding: 0 16px; } }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header { background: var(--navy); color: #fff; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.brand span { white-space: nowrap; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 6px 12px; border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
}
.nav-links a:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 400px) {
  .nav { gap: 8px; }
  .brand { font-size: 17px; gap: 8px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 8px; }
}
.site-header :focus-visible, .hero :focus-visible { outline-color: #fff; }

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

.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 70% at 50% 118%, rgba(252, 158, 83, .55) 0%, rgba(233, 116, 99, .35) 30%, rgba(193, 75, 158, .22) 52%, rgba(193, 75, 158, 0) 72%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: 0 0 36px 36px;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
  padding-top: 40px; padding-bottom: 0;
}
.hero-copy { text-align: center; }
.hero-icon {
  width: 112px; height: 112px; border-radius: 25px; /* the iOS icon mask, about 22% */
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .08);
}
.hero h1 {
  margin: 20px 0 6px; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(36px, 7vw, 56px); line-height: 1.05; letter-spacing: -.01em;
}
.hero .promise {
  margin: 0 0 14px; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(22px, 3.6vw, 30px); line-height: 1.2;
  color: #FFC9A6; /* sunset peach: 9:1 on the navy */
}
.hero .lede { margin: 0 auto 28px; max-width: 34em; color: #DDE2F2; font-size: 18px; }
.store-badge { display: inline-block; border-radius: 10px; }
.store-badge img { display: block; height: 54px; width: auto; }
.hero .platforms { margin: 14px 0 0; color: #C3CAE0; font-size: 15px; }

.hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.hero-pills li {
  padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #fff;
}

.hero-shot { display: flex; justify-content: center; align-self: end; max-height: 430px; overflow: hidden; }
.hero-shot img {
  /* Keep the screenshot's proportions: a flex item would otherwise stretch to the
     capped container height. The container crops the bottom instead. */
  display: block; width: min(300px, 78vw); height: auto; flex: none; align-self: flex-start;
  border-radius: 28px 28px 0 0;
}

@media (min-width: 880px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 48px; padding-top: 56px; }
  .hero-copy { text-align: left; padding-bottom: 64px; }
  .hero .lede { margin-left: 0; }
  .hero-pills { justify-content: flex-start; }
  .hero-shot { max-height: 600px; }
  .hero-shot img { width: 340px; }
}

/* ---------- Sections ---------- */

.section { padding-top: 64px; padding-bottom: 8px; }
.section-head { max-width: 40em; margin-bottom: 28px; }
.section-head h2 {
  margin: 0 0 8px; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 4.4vw, 38px); line-height: 1.15; letter-spacing: -.01em;
}
.section-head p { margin: 0; color: var(--text-2); font-size: 18px; }

/* ---------- Why: feature cards ---------- */

.features {
  display: grid; gap: 14px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.feature {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.feature h3 { margin: 14px 0 4px; font-size: 18px; line-height: 1.3; }
.feature p { margin: 0; color: var(--text-2); font-size: 16px; }
.feature-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2));
}
.feature-icon svg { width: 24px; height: 24px; }
@media (max-width: 599px) {
  .features { gap: 10px; }
  .feature { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 16px; }
  .feature-icon { grid-row: span 2; }
  .feature h3 { margin: 0 0 2px; }
  .feature p { font-size: 15px; }
}

/* ---------- Screenshot showcase ---------- */

.showcase {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(62vw, 240px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 -20px; padding: 8px 20px 24px; scroll-padding: 0 20px;
  list-style: none;
}
@media (max-width: 400px) { .showcase { margin: 0 -16px; padding: 8px 16px 24px; scroll-padding: 0 16px; } }
.showcase li { scroll-snap-align: start; }
.showcase img {
  display: block; width: 100%; border-radius: 26px;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--c, #2F67D6) 35%, transparent);
}
.showcase:focus-visible { outline-offset: -3px; }
.scroll-hint { margin: -8px 0 0; color: var(--text-2); font-size: 14px; }

@media (min-width: 1000px) {
  .showcase {
    grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); grid-auto-columns: auto;
    overflow: visible; margin: 0; padding: 8px 0 24px; row-gap: 28px;
  }
  .scroll-hint { display: none; }
}

/* ---------- Game cards (like the app's home screen) ---------- */

.games {
  display: grid; gap: 14px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}
.game {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 190px; padding: 16px; border-radius: var(--card-radius); color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--c2) 35%, transparent);
}
/* Darkens the lower part behind the text, as in the app, so white text stays readable on
   the brightest cards (yellow, orange): WCAG AA for the description on every card. */
.game::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .2) 38%, rgba(0, 0, 0, .62) 100%);
}
.game-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255, 255, 255, .22);
}
.game-icon svg { width: 28px; height: 28px; }
.game-watermark {
  position: absolute; right: -18px; bottom: -18px; width: 112px; height: 112px;
  opacity: .1; z-index: -1; pointer-events: none;
}
.game h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.2; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.game p { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
@media (max-width: 599px) {
  .games { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .game { min-height: 200px; padding: 14px; gap: 12px; }
  .game h3 { font-size: 19px; }
  .game p { font-size: 14px; }
  .game-icon { width: 44px; height: 44px; border-radius: 13px; }
  .game-icon svg { width: 26px; height: 26px; }
}

.games-note {
  margin: 20px 0 0; padding: 16px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--hairline); color: var(--text-2);
}

/* ---------- Closing call to action ---------- */

.cta {
  margin: 72px 0 0; padding: 40px 24px; border-radius: 28px; text-align: center; color: #fff;
  background:
    radial-gradient(90% 120% at 50% 130%, rgba(252, 158, 83, .5) 0%, rgba(193, 75, 158, .25) 50%, rgba(193, 75, 158, 0) 75%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.cta h2 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; }
.cta p { margin: 0 auto 22px; max-width: 32em; color: #DDE2F2; }
.cta :focus-visible { outline-color: #fff; }
.cta a:not(.store-badge) { color: #fff; }

/* ---------- Text pages (privacy policy) ---------- */

.prose { max-width: 760px; padding-top: 40px; padding-bottom: 24px; }
.prose > *:first-child { margin-top: 0; }
.prose h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 6vw, 44px); line-height: 1.1; margin: 0 0 12px; }
.prose h2 { font-size: 22px; margin: 36px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose h1 + p em { color: var(--text-2); }
.prose h1 + p + p {
  padding: 16px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow);
}

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

.site-footer { margin-top: 72px; padding: 32px 0 40px; border-top: 1px solid var(--hairline); color: var(--text-2); font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin: 0; }
.footer-brand img { border-radius: 7px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; }
