/*
  PlaneSpotted website. The colors are the app's (app/Planespotted/Views/Design.swift and its asset catalog): the
  system's grouped background with white cards (black and dark-grey cards in dark mode), the app's accent Sky
  #408FFF, and the icon's navy and Night for the dark bands. Pages use only these tokens; dark mode redefines them.
*/

:root {
  color-scheme: light dark;

  /* The app's brand colors (Design.swift). */
  --sky: #408fff;            /* the app's accent: buttons, icon tiles, highlights */
  --navy: #06456e;           /* the icon's deep navy */
  --icon-blue: #115e8b;      /* the icon's lighter blue */
  --night: #041628;          /* the launch screen; the dark bands */
  --cream: #f8f6ea;          /* the icon's camera */
  --blurple: #5865f2;        /* Discord, for Discord only */

  /* Surfaces, as the app's (the system's grouped colors). */
  --bg: #f2f2f7;
  --card: #ffffff;
  --inset: rgba(118, 118, 128, 0.12);
  --separator: rgba(60, 60, 67, 0.16);

  /* Text. */
  --text: #000000;
  --text-2: #6e6e73;
  --link: #0e65dc;           /* Sky darkened enough to read as text on light grey */
  --on-sky: #ffffff;

  --green: #248a3d;
  --green-tint: rgba(52, 199, 89, 0.16);
  --red: #d70015;

  --header-bg: rgba(242, 242, 247, 0.78);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);

  --radius: 22px;
  --radius-sm: 14px;
  --wrap: 1120px;
  --gutter: 20px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --inset: rgba(118, 118, 128, 0.24);
    --separator: rgba(84, 84, 88, 0.6);
    --text: #ffffff;
    --text-2: #98989d;
    --link: #408fff;
    --green: #30d158;
    --green-tint: rgba(48, 209, 88, 0.18);
    --red: #ff6961;
    --header-bg: rgba(0, 0, 0, 0.72);
    --shadow: none;
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--inset); padding: 0.12em 0.4em; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--card); color: var(--text); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { left: 8px; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 22.5%; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--text); font-size: 15px; padding: 7px 12px; border-radius: 999px; }
.site-nav a:hover { background: var(--inset); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--link); }
.site-nav a.nav-cta { background: var(--sky); color: var(--on-sky); font-weight: 600; margin-left: 6px; }
.site-nav a.nav-cta:hover { background: var(--sky); filter: brightness(1.08); }

@media (max-width: 760px) {
  .wide-only { display: none; }
  .site-nav a { padding: 7px 9px; }
}
@media (max-width: 400px) {
  .brand span { display: none; }
}

/* ---------- Buttons and the App Store badge ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
  font: 600 17px/1 var(--font); cursor: pointer;
  background: var(--inset); color: var(--text);
}
.button:hover { text-decoration: none; filter: brightness(1.05); }
.button.primary { background: var(--sky); color: var(--on-sky); }
.button:disabled { opacity: 0.55; cursor: default; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* "Coming soon to the App Store", or "Download on the App Store" once site.js has the link. */
.store-badge {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 54px; padding: 8px 22px 8px 54px; border-radius: 14px;
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='3'/%3E%3Cpath d='M10.5 18.5h3'/%3E%3C/svg%3E") no-repeat 18px center / 26px;
  color: #fff; line-height: 1.05; border: 1px solid rgba(255, 255, 255, 0.28);
}
.store-badge small { font-size: 11px; font-weight: 500; letter-spacing: 0.01em; opacity: 0.85; }
.store-badge span { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
a.store-badge:hover { text-decoration: none; filter: brightness(1.25); }

.text-link { font-weight: 600; font-size: 17px; }

/* ---------- Phone frame ---------- */

.phone {
  position: relative;
  width: 100%;
  border-radius: 13% / 6%;
  padding: 3.2%;
  background: #0b0b0d;
  box-shadow: 0 0 0 1.5px #2b2d31 inset, 0 30px 60px -20px rgba(4, 22, 40, 0.45), 0 12px 24px -12px rgba(0, 0, 0, 0.3);
}
.phone img { width: 100%; border-radius: 10.5% / 4.9%; }

/* ---------- Home: hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 520px at 85% 10%, rgba(64, 143, 255, 0.32), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(17, 94, 139, 0.55), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #062a48 100%);
  color: #fff;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 0; }
.hero-copy { padding-bottom: 80px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); letter-spacing: -0.04em; line-height: 1.02; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--sky); }
.hero .lede { margin-top: 22px; font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: rgba(255, 255, 255, 0.78); max-width: 34em; }
.hero .buttons { margin-top: 34px; gap: 22px; }
.hero .text-link { color: #9fc4ff; }
.hero-facts { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px 20px; color: rgba(255, 255, 255, 0.62); font-size: 15px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts svg { width: 16px; height: 16px; color: var(--sky); }

.new-pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86); font-size: 14px;
}
.new-pill b { background: var(--sky); color: #fff; padding: 3px 9px; border-radius: 999px; font-size: 12px; letter-spacing: 0.02em; }
.new-pill:hover { text-decoration: none; background: rgba(255, 255, 255, 0.13); }

/* Two phones, the second behind and to the right; they run off the bottom of the band. */
.hero-phones { position: relative; height: 620px; align-self: end; }
.hero-phones .phone { position: absolute; width: 300px; }
.hero-phones .front { left: 4%; bottom: -150px; z-index: 2; }
.hero-phones .back { right: 0; bottom: -80px; width: 270px; opacity: 0.92; transform: rotate(4deg); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 52px; }
  .hero-copy { padding-bottom: 0; }
  .hero-phones { height: 440px; margin: 0 auto; width: min(100%, 460px); }
  .hero-phones .phone { width: 220px; }
  .hero-phones .front { left: 6%; bottom: -170px; }
  .hero-phones .back { width: 200px; bottom: -110px; right: 6%; }
}

/* ---------- Home: sections ---------- */

.section { padding: 110px 0; }
.section.tight { padding-top: 0; }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -0.035em; font-weight: 800; }
.section-head p { margin-top: 18px; font-size: clamp(18px, 1.8vw, 21px); color: var(--text-2); }
@media (max-width: 700px) { .section { padding: 76px 0; } .section-head { margin-bottom: 40px; } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* The rounded-square symbol tile, as IconTile in the app: Sky on a 14% tint of it. */
.icon {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(64, 143, 255, 0.14); color: var(--sky);
}
.icon svg { width: 24px; height: 24px; }

/* A feature: words on one side, a phone on the other. */
.feature { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.feature + .feature { margin-top: 24px; }
.feature-copy { padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; }
.feature-copy h3 { margin-top: 22px; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.03em; font-weight: 800; }
.feature-copy > p { margin-top: 16px; font-size: 19px; color: var(--text-2); }
.feature-shot {
  position: relative; min-height: 500px;
  background: linear-gradient(160deg, rgba(64, 143, 255, 0.22), rgba(64, 143, 255, 0.04));
}
.feature-shot .phone { position: absolute; width: 290px; left: 50%; top: 56px; transform: translateX(-50%); }
.feature.flip .feature-copy { order: 2; }

.points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 17px; }
.points li b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sky); color: #fff; font-size: 14px; }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-copy { order: 0; }
  .feature-copy { padding: 40px 28px 8px; }
  .feature-shot { min-height: 400px; background: none; }
  .feature-shot .phone { width: 250px; top: 32px; }
}

/* A bento of smaller features, some with a peek of a screen. */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; margin-top: 24px; }
.tile { grid-column: span 2; padding: 32px; overflow: hidden; display: flex; flex-direction: column; }
.tile.half { grid-column: span 3; }
.tile h3 { margin-top: 18px; font-size: 24px; letter-spacing: -0.02em; }
.tile p { margin-top: 8px; color: var(--text-2); }
.tile-shot { margin: 28px -32px -32px; padding: 0 12%; flex: 1; display: flex; align-items: flex-start; max-height: 330px; }
.tile-shot .phone { box-shadow: 0 0 0 1.5px #2b2d31 inset, 0 16px 40px -18px rgba(4, 22, 40, 0.4); }
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile, .tile.half { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; gap: 16px; }
  .tile { padding: 26px; }
  .tile-shot { margin: 24px -26px -26px; padding: 0 18%; }
}

/* The little things, as an inset grouped list in two columns. */
.little { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0; padding: 8px 0; }
.little div { padding: 22px 30px; }
.little dt { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.little dd { margin: 6px 0 0; color: var(--text-2); }
@media (max-width: 900px) { .little { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .little { grid-template-columns: 1fr; }
  .little div + div { border-top: 0.5px solid var(--separator); }
  .little div { padding: 18px 22px; }
}

/* Discord and privacy, side by side. */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.duo .card { padding: 40px; display: flex; flex-direction: column; }
.duo h3 { margin-top: 20px; font-size: 28px; letter-spacing: -0.025em; }
.duo p { margin-top: 12px; color: var(--text-2); }
.duo .text-link { margin-top: auto; padding-top: 24px; }
.discord-card { background: linear-gradient(150deg, #5865f2, #3f49c9); color: #fff; }
.discord-card p { color: rgba(255, 255, 255, 0.82); }
.discord-card .icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.discord-card .text-link { color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips code { background: rgba(0, 0, 0, 0.22); color: #fff; padding: 6px 10px; border-radius: 9px; font-size: 14px; }
@media (max-width: 800px) { .duo { grid-template-columns: 1fr; gap: 16px; } .duo .card { padding: 30px; } }

/* The closing band. */
.cta {
  text-align: center; color: #fff; padding: 110px 0 120px;
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(64, 143, 255, 0.35), transparent 70%),
    linear-gradient(180deg, #062a48, var(--night));
}
.cta img { width: 96px; height: 96px; border-radius: 22.5%; margin: 0 auto; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6); }
.cta h2 { margin-top: 30px; font-size: clamp(36px, 5vw, 60px); letter-spacing: -0.04em; font-weight: 800; }
.cta p { margin-top: 14px; font-size: 20px; color: rgba(255, 255, 255, 0.72); }
.cta .buttons { justify-content: center; margin-top: 34px; gap: 22px; }
.cta .text-link { color: #9fc4ff; }

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

.site-footer { padding: 56px 0 48px; font-size: 14px; color: var(--text-2); border-top: 0.5px solid var(--separator); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer .brand { font-size: 17px; }
.site-footer .tagline { margin-top: 10px; }
.site-footer h2 { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--text); margin-bottom: 12px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { color: var(--text-2); }
.site-footer nav a:hover { color: var(--text); }
.site-footer .legal { grid-column: 1 / -1; padding-top: 24px; border-top: 0.5px solid var(--separator); }
.site-footer .legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.site-footer .legal a:hover { color: var(--text); }
@media (max-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .about { grid-column: 1 / -1; }
}

/* ---------- Text pages: What's new, Support, Privacy, Terms, Submit an event ---------- */

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gutter) 96px; align-items: start; }
.doc-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.doc-nav p { margin: 18px 0 6px 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.doc-nav p:first-child { margin-top: 0; }
.doc-nav a { color: var(--text); padding: 7px 12px; border-radius: 10px; }
.doc-nav a:hover { background: var(--inset); text-decoration: none; }
.doc-nav a[aria-current="page"] { background: var(--card); color: var(--link); font-weight: 600; box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .doc-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; order: 2; padding-top: 24px; border-top: 0.5px solid var(--separator); }
  .doc-nav p { display: none; }
  .doc-nav a { background: var(--card); }
}

.page { max-width: 760px; min-width: 0; }
.page.wide { max-width: none; }
.page h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.035em; font-weight: 800; }
.page .updated { margin-top: 12px; font-size: 19px; color: var(--text-2); }
.page h2 { margin: 48px 0 14px; font-size: 26px; letter-spacing: -0.02em; }
.page h3 { margin: 28px 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.page p, .page ul, .page ol { margin: 0 0 14px; }
.page ul, .page ol { padding-left: 1.3em; }
.page li { margin: 5px 0; }
.page table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; background: var(--card); border-radius: var(--radius-sm); overflow: hidden; }
.page th, .page td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 0.5px solid var(--separator); }
.page tr:last-child td { border-bottom: 0; }
.page th { font-weight: 600; }

/* The questions, as an inset grouped list. */
.faq { background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.faq details + details { border-top: 0.5px solid var(--separator); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* Forms, as the app's grouped fields. */
.contact-form { display: grid; gap: 12px; margin-top: 18px; background: var(--card); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } .contact-form { padding: 18px; } }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: 17px/1.35 var(--font); color: var(--text);
  background: var(--inset); border: 0; border-radius: 12px; padding: 13px 14px;
  -webkit-appearance: none; appearance: none;
}
.contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 38px;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form ::placeholder { color: var(--text-2); opacity: 1; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--sky); outline-offset: 0; }
.contact-form .button { justify-self: start; margin-top: 4px; }
.field-label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.form-hint { font-size: 14px; color: var(--text-2); margin: -4px 0 0; }
.page > .form-hint { margin-top: 14px; }
.form-status { margin: 0; font-size: 15px; min-height: 1.4em; color: var(--text-2); }
.form-status.ok { color: var(--green); }
.form-status.error { color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* What's new. */
.release { margin-top: 48px; }
.release-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.release-head h2 { margin: 0; }
.tag { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--green-tint); color: var(--green); }
.release-intro { display: grid; grid-template-columns: 1fr 220px; gap: 36px; align-items: center; padding: 32px; margin-bottom: 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.release-intro p { margin: 0; font-size: 19px; }
@media (max-width: 700px) { .release-intro { grid-template-columns: 1fr; padding: 24px; } .release-intro .phone { width: 200px; margin: 0 auto; } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.grid .card { padding: 22px; }
.grid .card h3 { margin: 14px 0 6px; font-size: 18px; }
.grid .card p { margin: 0; color: var(--text-2); font-size: 15px; }
.release.older { padding: 22px 26px; background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-top: 16px; }
.release.older .release-head { margin-bottom: 8px; }
.release.older h2 { font-size: 20px; }
.release.older ul { margin: 0; color: var(--text-2); }

/* The not-found page. */
.notice { max-width: 560px; margin: 0 auto; padding: 110px var(--gutter) 130px; text-align: center; }
.notice-icon { width: 96px; height: 96px; margin: 0 auto; border-radius: 22.5%; box-shadow: 0 14px 30px -12px rgba(4, 22, 40, 0.45); }
.notice h1 { margin-top: 24px; font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -0.035em; }
.notice p { margin-top: 14px; color: var(--text-2); font-size: 19px; }
.notice .buttons { justify-content: center; margin-top: 30px; }
