:root {
  --bg: #f2f2f5;
  --text: #111114;
  --text-2: #5d5d66;
  --text-3: #8b8b94;
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .72);
  --rim: rgba(255, 255, 255, .9);
  --edge: rgba(0, 0, 0, .07);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 40px -12px rgba(0, 0, 0, .14);
  --ambient-mix: 22%;
  --rg-top: #ff9150;
  --rg-bottom: #ea5f0e;
  --menu-bg: rgba(250, 250, 252, .97);
  --menu-hover: rgba(0, 0, 0, .05);
  --radius: 34px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0d;
    --text: #f4f4f6;
    --text-2: #a3a3ad;
    --text-3: #6e6e78;
    --glass: rgba(255, 255, 255, .055);
    --glass-strong: rgba(255, 255, 255, .09);
    --rim: rgba(255, 255, 255, .16);
    --edge: rgba(255, 255, 255, .06);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 20px 50px -20px rgba(0, 0, 0, .7);
    --ambient-mix: 20%;
    --rg-top: #c25c1c;
    --rg-bottom: #8a3a09;
    --menu-bg: rgba(36, 36, 40, .97);
    --menu-hover: rgba(255, 255, 255, .07);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0b0d;
  --text: #f4f4f6;
  --text-2: #a3a3ad;
  --text-3: #6e6e78;
  --glass: rgba(255, 255, 255, .055);
  --glass-strong: rgba(255, 255, 255, .09);
  --rim: rgba(255, 255, 255, .16);
  --edge: rgba(255, 255, 255, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 20px 50px -20px rgba(0, 0, 0, .7);
  --ambient-mix: 20%;
  --rg-top: #c25c1c;
  --rg-bottom: #8a3a09;
  --menu-bg: rgba(36, 36, 40, .97);
  --menu-hover: rgba(255, 255, 255, .07);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent, var(--text)); outline-offset: 3px; border-radius: 12px; }

/* Ambient wash: takes on the colour of the app currently in view. */
@property --ambient {
  syntax: "<color>";
  inherits: true;
  initial-value: transparent;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(140% 90% at 85% -10%, color-mix(in srgb, var(--ambient) var(--ambient-mix), transparent), transparent 70%),
    radial-gradient(120% 80% at 10% 115%, color-mix(in srgb, var(--ambient) calc(var(--ambient-mix) * .6), transparent), transparent 70%);
  transition: --ambient 1.4s ease;
}

/* Glass material */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--edge);
  box-shadow:
    inset 0 1px 0 0 var(--rim),
    inset 0 0 0 1px rgba(255, 255, 255, .04),
    var(--shadow);
}

/* Top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: max(14px, env(safe-area-inset-top)) 16px 0;
}

.pill {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
}

.brand { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }

.bar-actions { display: flex; gap: 2px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.icon-btn:hover { background: var(--glass-strong); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

.i-moon { display: none !important; }
:root[data-theme="dark"] .i-sun { display: none !important; }
:root[data-theme="dark"] .i-moon { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none !important; }
  :root:not([data-theme="light"]) .i-moon { display: block !important; }
}

/* Intro */
main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.intro { padding: clamp(72px, 16vh, 160px) 4px clamp(56px, 10vh, 112px); }

h1.lede {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  font-weight: 650;
  font-size: clamp(34px, 6.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.lede span {
  display: block;
  margin-top: 22px;
  max-width: 32ch;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.015em;
  color: var(--text-2);
}

/* Apps */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--edge);
}

h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
}

.count { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.app {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 28px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
}

/* Accent tint + moving specular highlight */
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at var(--mx) var(--my), rgba(255, 255, 255, .10), transparent 45%),
    radial-gradient(120% 80% at 0% 0%, var(--accent-soft), transparent 60%);
  pointer-events: none;
}

.app-id { display: flex; align-items: center; gap: 16px; }

.app-icon {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 22.5%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .35);
}
.app-icon svg, .app-icon img { width: 100%; height: 100%; }
/* Glassy rim on the icon */
.app-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), inset 0 0 0 .5px rgba(255, 255, 255, .25);
  pointer-events: none;
}

.rg-top { stop-color: var(--rg-top); }
.rg-bottom { stop-color: var(--rg-bottom); }

h3 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.025em; line-height: 1.1; }
.platform { margin: 4px 0 0; font-size: 14px; color: var(--text-3); }

.summary { margin: 22px 0 0; color: var(--text-2); max-width: 44ch; }

.facts {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  font-size: 15px;
}
.facts li {
  position: relative;
  padding: 9px 0 9px 20px;
  border-top: 1px solid var(--edge);
}
.facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  background: var(--glass-strong);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--rim);
  transition: transform .2s cubic-bezier(.3, .7, .4, 1.4), background-color .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.96); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn .arrow { width: 14px; height: 14px; opacity: .6; }

.btn-primary {
  color: var(--on-accent, #fff);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 20px -8px var(--accent);
}
.btn-primary:hover { filter: brightness(1.06); }

/* "…" menu next to the app buttons */
.more { position: relative; display: flex; }
.btn-more { width: 46px; padding: 0; justify-content: center; color: var(--text); font: inherit; cursor: pointer; }
.btn-more svg { width: 18px; height: 18px; }
.btn-more[aria-expanded="true"] { background: var(--glass); transform: scale(.96); }

.menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: max-content;
  min-width: 250px;
  max-width: min(320px, calc(100vw - 72px));
  padding: 6px;
  border-radius: 24px;
  background: var(--menu-bg);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 0 var(--rim), 0 24px 60px -18px rgba(0, 0, 0, .4);
  transform-origin: calc(100% - 23px) calc(100% + 10px);
  opacity: 0;
  visibility: hidden;
  transform: scale(.5);
  transition: opacity .18s ease, transform .3s cubic-bezier(.32, .72, 0, 1), visibility 0s .3s;
}
.menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .2s ease, transform .5s cubic-bezier(.3, 1.3, .5, 1), visibility 0s;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  border-radius: 18px;
  transition: background-color .15s ease;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--menu-hover); outline: none; }
.menu-item svg { flex: none; width: 22px; height: 22px; color: var(--accent); }
.menu-item strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.menu-item small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--text-3); }

.note { margin: 16px 0 0; font-size: 12px; color: var(--text-3); }

.app-shot { margin: 0; }
.app-shot img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
}

@media (min-width: 960px) {
  .app {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 44px;
    padding: 40px;
  }
  .app:nth-of-type(even) .app-body { order: 2; }
  .summary { margin-top: 26px; }
}

@media (max-width: 480px) {
  .app { padding: 20px; border-radius: 28px; gap: 22px; }
  .app-icon { width: 60px; height: 60px; }
  h3 { font-size: 23px; }
  .actions .btn { flex: 1 1 0; justify-content: center; }
  .actions .btn-primary { flex-basis: 100%; }
  .actions .btn-more { flex: none; }
}

/* Feedback */
.feedback {
  --accent: var(--text);
  --on-accent: var(--bg);
  margin-top: 56px;
}

.disclosure { border-radius: 28px; overflow: hidden; }

.disclosure-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px 24px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.disclosure-head:focus-visible { outline-offset: -4px; border-radius: 28px; }
.disclosure-icon { flex: none; width: 22px; height: 22px; fill: currentColor; }
.disclosure-title { flex: 1; }

.chevron {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text-2);
  transition: transform .5s cubic-bezier(.32, .72, 0, 1);
}
.is-open .chevron { transform: rotate(-180deg); }

/* Expands like a SwiftUI DisclosureGroup: height springs open, content fades in. */
.disclosure-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s cubic-bezier(.32, .72, 0, 1);
}
.is-open .disclosure-panel { grid-template-rows: 1fr; }

.disclosure-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  transform-origin: top center;
  transition: opacity .3s ease, transform .55s cubic-bezier(.32, .72, 0, 1);
}
.is-open .disclosure-inner { opacity: 1; transform: none; transition-delay: .06s, 0s; }

.fb-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 0 24px 24px;
}
.fb-intro { margin: 0 0 4px; color: var(--text-2); font-size: 15px; }

/* Segmented control, same idea as the in-app pickers */
.seg {
  --i: 0;
  --n: 3;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  margin: 0;
  padding: 4px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--glass);
}
.seg-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--n));
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: inset 0 1px 0 var(--rim), 0 2px 8px -2px rgba(0, 0, 0, .18);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform .45s cubic-bezier(.32, .72, 0, 1);
}
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block;
  padding: 8px 4px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 999px;
  transition: color .2s ease;
}
.seg input:checked + span { color: var(--text); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 0; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); padding-left: 4px; }
.field-label em { font-style: normal; font-weight: 400; color: var(--text-3); margin-left: 4px; }

.field textarea,
.field input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: var(--glass);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  resize: vertical;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
  transition: border-color .2s ease, background-color .2s ease;
}
.field textarea { min-height: 128px; }
.field textarea::placeholder,
.field input::placeholder { color: var(--text-3); }
.field textarea:focus,
.field input:focus { outline: none; border-color: color-mix(in srgb, var(--text) 35%, transparent); background: var(--glass-strong); }

.file-row { display: flex; gap: 8px; }
.file-pick {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px dashed color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: 18px;
  background: var(--glass);
  color: var(--text-3);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.file-pick:hover { background: var(--glass-strong); color: var(--text-2); }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-pick:focus-within { border-color: color-mix(in srgb, var(--text) 45%, transparent); }
.file-pick svg { flex: none; width: 18px; height: 18px; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.has-file .file-pick { border-style: solid; color: var(--text); }
.file-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 50px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: var(--glass);
  color: var(--text-2);
  cursor: pointer;
}
.file-clear[hidden] { display: none; }
.file-clear:hover { background: var(--glass-strong); color: var(--text); }
.file-clear svg { width: 18px; height: 18px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

.fb-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.fb-actions .btn { padding: 0 28px; cursor: pointer; font-family: inherit; }
.fb-actions .btn:disabled { opacity: .5; cursor: default; transform: none; }
.fb-status { margin: 0; font-size: 14px; color: var(--text-2); }
.fb-status[data-kind="ok"] { color: #34a853; }
.fb-status[data-kind="error"] { color: #e5484d; }

@media (max-width: 480px) {
  .disclosure-head { padding: 18px 20px; }
  .fb-form { padding: 0 20px 20px; }
  .seg span { font-size: 13px; }
  .fb-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* Footer */
.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 20px max(40px, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-3);
}
.foot p { margin: 0; }
.foot-links { display: flex; gap: 18px; }
.foot-links a { transition: color .2s ease; }
.foot-links a:hover { color: var(--text); }

/* Entrance */
@media (prefers-reduced-motion: no-preference) {
  .intro > *, .app { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .app:nth-of-type(1) { animation-delay: .16s; }
  .app:nth-of-type(2) { animation-delay: .24s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
