/* ===========================================================================
   transbay.dev — the one stylesheet for all three sites.

   HOW THIS FILE IS ORGANISED
     1. Settings   — every colour, font and size. Change things HERE first.
     2. Basics     — page background, text, links, headings.
     3. Layout     — the container, sections, grids.
     4. Pieces     — buttons, cards, badges, phone frames, FAQs, footers.
     5. Flaguu     — the bits only the Flaguu site uses (nav, community, tutorials).
     6. Landing    — the split screen at transbay.dev.
     7. Small screens — how everything rearranges on a phone.

   The frosted-glass panels live in their own file, glass.css, so you can
   experiment with them without touching anything else.
   =========================================================================== */


/* ===========================================================================
   1. SETTINGS
   ---------------------------------------------------------------------------
   Everything below is a "variable". Change the value once here and it changes
   everywhere on the site. You do not need to understand the rest of this file
   to change these.
   =========================================================================== */

:root {

  /* --- Colours -----------------------------------------------------------
     These are hex codes. #000000 is black, #FFFFFF is white. There are colour
     pickers all over the web that will give you a hex code for any colour.    */

  --page-bg:      #0A0B0E;   /* the colour behind everything */
  --panel-bg:     #121419;   /* slightly lighter, for boxes that sit on the page */

  --ink:          #F3F4F7;   /* normal text */
  --ink-dim:      #9BA2AE;   /* quieter text: captions, small print */
  --ink-faint:    #6B7280;   /* the quietest text of all */

  --edge:         rgba(255, 255, 255, 0.12);  /* thin lines around boxes */
  --edge-strong:  rgba(255, 255, 255, 0.22);

  /* Each site has ONE accent colour. It is picked up from the app's own icon.
     The <body> tag of each page says class="flaguu" or class="bay", and that is
     what decides which of these two gets used. See just below.               */
  --flaguu-accent:      #8B6BF0;   /* the violet transit line in the Flaguu icon */
  --flaguu-accent-soft: #A78BFA;
  --bay-accent:         #38BDF8;   /* a transit-sign blue, to match the silver arrow */
  --bay-accent-soft:    #7DD3FC;

  /* This is the one that actually gets used. It defaults to the Flaguu violet
     and is swapped per-site by the two rules underneath.                     */
  --accent:      var(--flaguu-accent);
  --accent-soft: var(--flaguu-accent-soft);


  /* --- Fonts -------------------------------------------------------------
     Loaded from Google Fonts by the <link> tag at the top of each page.
     If you want a different font, pick one at fonts.google.com, swap the
     <link> in the HTML files, and change the name here.                      */

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;


  /* --- Sizes -------------------------------------------------------------
     "rem" means "multiples of the base text size". 1rem is normal text.      */

  --page-width:  1120px;  /* how wide the content is allowed to get */
  --gap:         1.5rem;  /* normal space between things */
  --gap-lg:      3rem;    /* space between big sections */
  --radius:      16px;    /* how rounded the corners of boxes are */
  --radius-lg:   24px;
}

/* The two site themes. Adding class="bay" to <body> switches the accent. */
body.bay    { --accent: var(--bay-accent);    --accent-soft: var(--bay-accent-soft); }
body.flaguu { --accent: var(--flaguu-accent); --accent-soft: var(--flaguu-accent-soft); }


/* ===========================================================================
   2. BASICS
   =========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* A very soft glow of the accent colour at the top of the page. Delete these
     three lines if you would rather have a flat background.                   */
  background-image: radial-gradient(1200px 600px at 50% -200px,
                    color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;          /* stops headlines breaking with one word alone */
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }   /* clamp = small on phones, big on desktops */
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.15em 0.45em;
}

/* Anything only meant for screen readers. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Everyone gets a visible outline when tabbing with a keyboard. */
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }


/* ===========================================================================
   3. LAYOUT
   =========================================================================== */

/* The centred column everything sits in. */
.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* One band of the page. */
section { padding: var(--gap-lg) 0; }

.section-head { margin-bottom: var(--gap); max-width: 62ch; }
.section-head p { color: var(--ink-dim); margin-bottom: 0; }

/* A label above a heading, e.g. "GAME TYPES". */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.6rem;
}

/* Grids. The number is how many columns on a wide screen; they collapse to one
   column on a phone automatically (see section 7).                            */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }

.stack > * + * { margin-top: var(--gap); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-dim); max-width: 62ch; }
.muted { color: var(--ink-dim); }
.small { font-size: 0.9rem; }


/* ===========================================================================
   4. PIECES
   =========================================================================== */

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.72em 1.35em;
  border-radius: 999px;         /* a very big number = a pill shape */
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

/* The main call to action. */
.btn-primary {
  background: var(--accent);
  color: #0A0B0E;
}
.btn-primary:hover { background: var(--accent-soft); }

/* The quieter one that sits next to it. */
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--edge);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--edge-strong); }

/* Used when there is no link yet — looks like a label, not a button. */
.btn-pending {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--edge-strong);
  color: var(--ink-dim);
  cursor: default;
}
.btn-pending:hover { transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }


/* --- Cards --------------------------------------------------------------- */

.card {
  background: var(--panel-bg);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 1.6rem; line-height: 1; margin-bottom: 0.7rem; display: block; }

/* A card that is a link. */
a.card { color: inherit; display: block; transition: border-color 0.2s ease, transform 0.2s ease; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }


/* --- Badges and chips ---------------------------------------------------- */

.badge {
  display: inline-block;
  white-space: nowrap;      /* keeps "Capture the Flag" on one line */
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.badge-soon { background: rgba(255, 255, 255, 0.06); color: var(--ink-faint); border-color: var(--edge); }


/* --- Phone screenshot frames --------------------------------------------- */

.phone {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.phone img { width: 100%; height: auto; }

.shots { display: flex; gap: var(--gap); justify-content: center; flex-wrap: wrap; }
.shots figure { margin: 0; max-width: 260px; }
.shots figcaption { color: var(--ink-dim); font-size: 0.9rem; text-align: center; margin-top: 0.8rem; }

/* A slot waiting for a screenshot you have not taken yet. It draws itself, so
   there is no missing-image icon — and the moment you drop the real file in
   with the right name, the picture replaces it. See README.md.               */
.shot-todo {
  aspect-ratio: 1242 / 2688;
  border-radius: 30px;
  border: 2px dashed var(--edge-strong);
  background: linear-gradient(160deg,
              color-mix(in srgb, var(--accent) 14%, var(--panel-bg)), var(--panel-bg));
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 1.5rem;
  color: var(--ink-faint); font-size: 0.85rem; line-height: 1.5;
}
.shot-todo code { display: block; margin-top: 0.5rem; color: var(--accent-soft); }


/* --- Numbered steps ------------------------------------------------------ */

.steps { counter-reset: step; display: grid; gap: var(--gap); }
.steps > li { list-style: none; position: relative; padding-left: 3.5rem; }
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-soft);
  font-family: var(--font-display); font-weight: 600;
}
.steps h3 { margin-bottom: 0.2em; }
.steps p { color: var(--ink-dim); margin-bottom: 0; }
ol.steps { padding-left: 0; }


/* --- Question-and-answer lists ------------------------------------------
   These use the browser's own <details> element, so they open and close with
   no JavaScript at all.                                                      */

.faq { border-top: 1px solid var(--edge); }
.faq details { border-bottom: 1px solid var(--edge); }
.faq summary {
  cursor: pointer;
  padding: 1.1rem 2rem 1.1rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
  color: var(--accent-soft); font-size: 1.4rem; font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }   /* a minus sign */
.faq summary:hover { color: var(--accent-soft); }
.faq .answer { padding: 0 2rem 1.4rem 0; color: var(--ink-dim); }
.faq .answer > *:last-child { margin-bottom: 0; }


/* --- Header and footer --------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--edge);
  background: color-mix(in srgb, var(--page-bg) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.wordmark {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--ink); letter-spacing: -0.02em;
}
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 30px; height: 30px; border-radius: 8px; }

.nav { display: flex; gap: 0.4rem; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-dim);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45em 0.85em;
  border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); text-decoration: none; }
/* The page you are currently on. Each page marks its own link with class="here". */
.nav a.here { color: var(--ink); background: rgba(255, 255, 255, 0.1); }

.site-footer {
  border-top: 1px solid var(--edge);
  margin-top: var(--gap-lg);
  padding: 2.5rem 0;
  color: var(--ink-faint);
  font-size: 0.92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.site-footer a { color: var(--ink-dim); }
.site-footer .spacer { margin-left: auto; }


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

.hero { padding: clamp(3rem, 8vw, 6rem) 0 var(--gap-lg); }
.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--gap-lg);
  align-items: center;
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lead { margin-bottom: 1.8rem; }
.hero-art { max-width: 300px; margin-left: auto; width: 100%; }

/* A hero with a screenshot filling the whole background. */
.hero-photo {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  /* Shown when there is no screenshot yet, and behind it once there is. */
  background: linear-gradient(150deg,
              color-mix(in srgb, var(--accent) 30%, var(--page-bg)) 0%,
              var(--panel-bg) 60%);
}
.hero-photo > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.42) saturate(1.1);
}
.hero-photo .hero-photo-inner { position: relative; padding: clamp(2rem, 6vw, 4.5rem); }


/* ===========================================================================
   5. THE FLAGUU SITE ONLY
   =========================================================================== */

/* --- The community game grid --------------------------------------------- */

.community-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: var(--gap); }

.search-input, .select-input, .text-input, .textarea-input, .file-input {
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 0.65em 0.9em;
}
.search-input { flex: 1 1 240px; }
.search-input::placeholder, .text-input::placeholder, .textarea-input::placeholder { color: var(--ink-faint); }
.search-input:focus, .select-input:focus, .text-input:focus, .textarea-input:focus {
  border-color: var(--accent); outline: none;
}
.select-input { cursor: pointer; }
.select-input option { background: var(--panel-bg); }

/* The filter buttons. */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--gap); }
.chip {
  font-family: var(--font-body); font-size: 0.88rem;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--ink); border-color: var(--edge-strong); }
.chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: var(--accent);
  color: var(--ink);
}

.game-card { display: flex; flex-direction: column; gap: 0.8rem; }
.game-card .game-top { display: flex; align-items: flex-start; gap: 0.75rem; justify-content: space-between; }
/* Lets the title column shrink instead of forcing the card wider than its column. */
.game-card .game-top > div { min-width: 0; }
.game-card h3 { margin: 0; font-size: 1.12rem; }
.game-card .byline { color: var(--ink-faint); font-size: 0.88rem; margin: 0; }
.game-card .blurb { color: var(--ink-dim); font-size: 0.94rem; margin: 0; }
.game-card .stats {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  color: var(--ink-faint); font-size: 0.84rem;
  border-top: 1px solid var(--edge); padding-top: 0.8rem; margin-top: auto;
}
.game-card .btn { align-self: flex-start; }

/* Shown while the list is loading, or when nothing matches. */
.state-note {
  padding: 3rem 1.5rem; text-align: center; color: var(--ink-dim);
  border: 1px dashed var(--edge); border-radius: var(--radius);
}

/* --- The submit-a-game form ---------------------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; font-weight: 500; color: var(--ink-dim); }
.field .hint { font-size: 0.82rem; color: var(--ink-faint); }
.textarea-input { resize: vertical; min-height: 90px; font-family: var(--font-body); }
.file-input { cursor: pointer; }
.file-input::file-selector-button {
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  margin-right: 0.8rem; padding: 0.45em 0.9em;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.1); color: var(--ink);
}

.form-message { border-radius: 12px; padding: 0.85rem 1.1rem; font-size: 0.94rem; margin-top: 1rem; }
.form-message.ok    { background: rgba(48, 209, 88, 0.14); border: 1px solid rgba(48, 209, 88, 0.4); color: #A7F3B8; }
.form-message.error { background: rgba(255, 69, 58, 0.14); border: 1px solid rgba(255, 69, 58, 0.4); color: #FFB4AE; }

/* --- Tutorials ------------------------------------------------------------ */

.tutorial { border-bottom: 1px solid var(--edge); }
.tutorial > summary {
  cursor: pointer; list-style: none;
  padding: 1.4rem 2.5rem 1.4rem 0;
  position: relative;
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
}
.tutorial > summary::-webkit-details-marker { display: none; }
.tutorial > summary::after {
  content: "+"; position: absolute; right: 0.3rem; top: 1.4rem;
  color: var(--accent-soft); font-size: 1.5rem; line-height: 1;
}
.tutorial[open] > summary::after { content: "\2212"; }
.tutorial > summary h3 { margin: 0; font-size: 1.15rem; }
.tutorial > summary:hover h3 { color: var(--accent-soft); }
.tutorial .meta { color: var(--ink-faint); font-size: 0.85rem; }
.tutorial-body { padding: 0 0 2rem; max-width: 68ch; }
.tutorial-body h4 { font-size: 1rem; margin: 1.6em 0 0.4em; color: var(--accent-soft); }
.tutorial-body ol, .tutorial-body ul { color: var(--ink-dim); padding-left: 1.3rem; }
.tutorial-body li { margin-bottom: 0.5em; }
.tutorial-body p { color: var(--ink-dim); }

/* A short highlighted aside inside an article. */
.callout {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 0 12px 12px 0;
  padding: 0.9rem 1.2rem;
  margin: 1.4em 0;
  font-size: 0.94rem;
  color: var(--ink-dim);
}
.callout strong { color: var(--ink); }

/* Tiny table used for game types and modules. */
.deftable { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.deftable th, .deftable td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--edge); vertical-align: top; }
.deftable th { font-family: var(--font-display); font-weight: 600; color: var(--ink); white-space: nowrap; }
.deftable td { color: var(--ink-dim); }
.table-scroll { overflow-x: auto; }


/* ===========================================================================
   6. THE LANDING PAGE (the split screen at transbay.dev)
   =========================================================================== */

body.landing {
  height: 100dvh;              /* exactly one screen tall, never scrolls */
  overflow: hidden;
  background-image: none;
}

.split { display: flex; height: 100dvh; }

/* Each half of the screen is one big link. */
.half {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.half + .half { border-left: 1px solid var(--edge); }

/* The screenshot behind each half. */
.half-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: brightness(0.32) saturate(1.05) blur(7px);   /* a backdrop, not a picture to read */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}

/* A wash of the app's own colour over the screenshot. */
.half::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--accent) 26%, transparent) 0%,
              rgba(6, 7, 10, 0.72) 100%);
  transition: opacity 0.5s ease;
}

.half-inner {
  position: relative; z-index: 2; text-align: center;
  padding: 2rem;
  width: 100%;             /* without this the panel can end up wider than a phone */
  max-width: 420px;
}
.half-inner img.app-icon {
  width: 92px; height: 92px; border-radius: 22px;
  margin: 0 auto 1.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.half-inner h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 0.35em; }
.half-inner p { color: rgba(255, 255, 255, 0.78); margin-bottom: 1.6rem; }

.half-go {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600;
  color: var(--ink);
}
.half-go .arrow { transition: transform 0.3s ease; }

/* What happens when you point at one half. */
@media (hover: hover) {
  .half:hover { flex: 1.18; }
  .half:hover .half-photo { transform: scale(1); filter: brightness(0.46) saturate(1.15) blur(4px); }
  .half:hover::after { opacity: 0.82; }
  .half:hover .half-go .arrow { transform: translateX(6px); }
  .split:hover .half:not(:hover)::after { opacity: 1; }
}
/* Same effect for people navigating with a keyboard. */
.half:focus-visible { outline-offset: -4px; }
.half:focus-visible .half-photo { filter: brightness(0.46) saturate(1.15) blur(4px); }

/* The transbay.dev name floating over the top of the two pictures.

   NOTE the "body.landing" in front of the name. It is not decoration. This
   element also carries class="glass", and glass.css is loaded AFTER this file,
   so glass's own "position: relative" wins any tie and drops the name back into
   the normal flow — which pushes both pictures down and leaves a black band
   across the top of the screen. The extra "body.landing" outranks it. */
body.landing .landing-mark {
  position: fixed; top: 26px; left: 50%; transform: translateX(-50%);
  width: max-content;      /* only as wide as the words inside it */
  max-width: calc(100% - 32px);
  z-index: 10;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.95rem; letter-spacing: 0.02em;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
}
.landing-foot {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 10; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5);
  text-align: center; width: 100%;
}


/* ===========================================================================
   7. SMALL SCREENS
   ---------------------------------------------------------------------------
   Anything inside a "@media (max-width: ...)" block only applies when the
   window is narrower than that. This is what makes the site work on a phone.
   =========================================================================== */

@media (max-width: 860px) {
  body { font-size: 16px; }

  .grid-2, .grid-3, .form-grid, .hero-split { grid-template-columns: 1fr; }
  .hero-art { margin: 0 auto; max-width: 240px; }

  /* The split screen becomes two stacked halves instead of two side by side. */
  .split { flex-direction: column; }
  .half + .half { border-left: 0; border-top: 1px solid var(--edge); }
  .half-inner img.app-icon { width: 68px; height: 68px; margin-bottom: 1rem; }
  .half-inner p { margin-bottom: 1.1rem; }
  /* Stacked halves reach the bottom of the screen, so this line would sit on top
     of the lower panel. There is no room for it on a phone — hide it. */
  .landing-foot { display: none; }

  .nav { gap: 0.15rem; }
  .nav a { padding: 0.4em 0.6em; font-size: 0.88rem; }
  .site-header .wrap { flex-wrap: wrap; gap: 0.75rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
  .site-header .btn { display: none; }   /* the TestFlight button would crowd a phone */

  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer .spacer { margin-left: 0; }
}

/* Some people ask their computer to reduce animation. Respect that. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .half:hover { flex: 1; }
}
