/*
 * The PalmPay website: the homepage and the app downloads page.
 *
 * Same "Ocean Breeze" as the apps and the console. No external requests: the fonts, images and
 * icons are served by the platform itself, so the site works on a campus network with no route
 * to the internet, exactly where the terminals live.
 */

@font-face { font-family: 'Jakarta'; font-weight: 400; font-display: swap; src: url('/fonts/jakarta-400.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 500; font-display: swap; src: url('/fonts/jakarta-500.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 600; font-display: swap; src: url('/fonts/jakarta-600.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 700; font-display: swap; src: url('/fonts/jakarta-700.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 800; font-display: swap; src: url('/fonts/jakarta-800.woff2') format('woff2'); }

:root {
  --twilight: #03045e;
  --navy: #023e8a;
  --teal: #0077b6;
  --turquoise: #00b4d8;
  --frost: #90e0ef;
  --cyan: #caf0f8;

  --bg: #f5f9fc;
  --bg-alt: #eaf3fa;
  --surface: #ffffff;
  --border: #d9e6f0;
  --text: #0b1b3a;
  --muted: #4a5b78;
  --faint: #7d8ca6;
  --primary: #0077b6;
  --primary-ink: #ffffff;
  --accent: #00b4d8;
  --good: #0f8a5f;
  --shadow: 0 1px 2px rgba(3, 4, 94, 0.06), 0 12px 32px -12px rgba(3, 4, 94, 0.18);
  --shadow-lg: 0 30px 80px -24px rgba(3, 4, 94, 0.45);
  --radius: 20px;
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #01022b;
    --bg-alt: #050a3f;
    --surface: #0a0f45;
    --border: #1c2868;
    --text: #eaf6ff;
    --muted: #a9bcd8;
    --faint: #7385a8;
    --primary: #00b4d8;
    --primary-ink: #01022b;
    --accent: #90e0ef;
    --good: #4ed6a0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  background: var(--primary); color: var(--primary-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(0, 119, 182, 0.7); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { box-shadow: none; background: var(--bg-alt); }
.btn.light { background: #ffffff; color: var(--twilight); }
.btn.glass { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.btn.glass:hover { background: rgba(255, 255, 255, 0.14); box-shadow: none; }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }

/* ---------------------------------------------------------------- header */

.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.02em; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.nav a:hover { color: var(--text); background: var(--bg-alt); }
.top .spacer { flex: 1; }
.top .actions { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 920px) {
  .nav, .top .actions .signin { display: none; }
  .menu-btn { display: inline-grid; place-items: center; }
  .top.open .nav {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 68px;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 16px; margin: 0;
    box-shadow: var(--shadow);
  }
  .top.open .nav a { padding: 12px; }
}
@media (max-width: 480px) {
  .top .actions .btn:not(.menu-btn) { display: none; }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(0, 180, 216, 0.28), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(144, 224, 239, 0.12), transparent 60%),
    linear-gradient(135deg, #01022b 0%, var(--twilight) 38%, var(--navy) 72%, var(--teal) 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px; font-weight: 600; color: var(--cyan);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--turquoise); box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.25); }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; margin: 20px 0 18px; }
.hero h1 .glow { background: linear-gradient(90deg, var(--frost), var(--turquoise)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: rgba(234, 246, 255, 0.82); max-width: 540px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; padding: 0; list-style: none; font-size: 14px; color: rgba(234, 246, 255, 0.78); }
.hero .points li { display: inline-flex; align-items: center; gap: 8px; }
.hero .points svg { width: 18px; height: 18px; color: var(--turquoise); flex: none; }

.stage { position: relative; height: 560px; }
.stage .phone { position: absolute; }
.stage .phone.back { width: 238px; left: 4%; top: 58px; transform: rotate(-7deg); opacity: 0.96; }
.stage .phone.front { width: 262px; right: 6%; top: 0; animation: float 7s ease-in-out infinite; }
.stage .scan {
  position: absolute; left: -2%; bottom: 36px; width: 128px; height: 128px; border-radius: 50%;
  border: 1px solid rgba(144, 224, 239, 0.35); display: grid; place-items: center;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.22), transparent 70%);
}
.stage .scan::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(144, 224, 239, 0.18); animation: pulse 3s ease-out infinite; }
.stage .scan svg { width: 64px; height: 64px; color: #fff; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0% { transform: scale(0.85); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stage .phone.front, .stage .scan::after { animation: none; } }

@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; gap: 24px; }
  .stage { height: 470px; max-width: 420px; margin: 0 auto; width: 100%; }
  .stage .phone.back { width: 200px; left: 0; }
  .stage .phone.front { width: 222px; right: 0; }
  .stage .scan { left: -2%; bottom: 24px; width: 100px; height: 100px; }
}

/* ---------------------------------------------------------------- device frames */

.phone {
  border-radius: 42px; padding: 9px; background: linear-gradient(160deg, #1b2657, #070b2e);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.phone img { width: 100%; height: auto; border-radius: 34px; aspect-ratio: 1206 / 2622; object-fit: cover; object-position: top; background: #01022b; }

.browser { border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.browser .bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.browser .bar i { width: 11px; height: 11px; border-radius: 50%; background: #d4dde8; }
.browser .bar i:nth-child(1) { background: #ff6b6b; }
.browser .bar i:nth-child(2) { background: #ffc857; }
.browser .bar i:nth-child(3) { background: #4ed6a0; }
.browser .bar span { margin-left: 12px; font-size: 12px; color: var(--faint); }
.browser img { width: 100%; height: auto; }

/* ---------------------------------------------------------------- sections */

section { padding: 96px 0; }
section.alt { background: var(--bg-alt); }
.head { max-width: 680px; margin-bottom: 48px; }
.head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
.head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin: 10px 0 14px; }
.head p { font-size: 18px; color: var(--muted); }
@media (max-width: 700px) { section { padding: 64px 0; } .head { margin-bottom: 32px; } }

.grid { display: grid; gap: 18px; }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 920px) { .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.c3, .grid.c2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { font-size: 18px; font-weight: 700; margin: 16px 0 8px; }
.card p { color: var(--muted); font-size: 15px; }
.icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), #e6f7fb); color: var(--teal);
}
@media (prefers-color-scheme: dark) { .icon { background: linear-gradient(135deg, #12306e, #0b1f5a); color: var(--frost); } }
.icon svg { width: 22px; height: 22px; }

/* the three steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 28px 26px 26px; }
.step .n {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: var(--primary); color: var(--primary-ink);
}
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* split rows: words on one side, a picture on the other */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split .head { margin-bottom: 24px; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; gap: 36px; } .split.flip > :first-child { order: 0; } }

.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 15.5px; color: var(--muted); }
.ticks li strong { color: var(--text); font-weight: 700; }
.ticks svg { width: 22px; height: 22px; color: var(--good); margin-top: 1px; }

/* the wallet screens, side by side */
.gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 20px 30px; margin: 0 -20px; scrollbar-width: thin; }
.gallery figure { flex: 0 0 220px; margin: 0; scroll-snap-align: center; }
.gallery .phone { border-radius: 36px; padding: 7px; }
.gallery .phone img { border-radius: 30px; }
.gallery figcaption { text-align: center; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* the terminal, drawn */
.terminal-art { width: min(320px, 80%); margin: 0 auto; }

/* security */
.shield { background: linear-gradient(135deg, #01022b, var(--twilight) 55%, var(--navy)); color: #fff; }
.shield .head p, .shield .card p { color: rgba(234, 246, 255, 0.78); }
.shield .kicker { color: var(--turquoise); }
.shield .card { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
.shield .icon { background: rgba(0, 180, 216, 0.16); color: var(--frost); }

/* audiences */
.who .card { display: flex; flex-direction: column; }
.who .card .btn { margin-top: auto; align-self: flex-start; }
.who .card p { margin-bottom: 22px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 16.5px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--primary); font-weight: 500; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 0 20px; color: var(--muted); }

/* the closing band */
.band { background: linear-gradient(120deg, var(--twilight), var(--navy) 55%, var(--teal)); color: #fff; border-radius: 28px; padding: 56px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.band::after { content: ''; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 180, 216, 0.35), transparent 70%); }
.band h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.band p { color: rgba(234, 246, 255, 0.8); margin-top: 10px; font-size: 17px; }
.band .cta { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
@media (max-width: 800px) { .band { grid-template-columns: 1fr; padding: 36px 26px; } }

/* footer */
footer { padding: 56px 0 40px; border-top: 1px solid var(--border); margin-top: 96px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
footer h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { text-decoration: none; color: var(--muted); font-size: 15px; }
footer a:hover { color: var(--text); }
footer .small { color: var(--faint); font-size: 14px; margin-top: 14px; max-width: 320px; }
footer .legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 13.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 800px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .wrap > :first-child { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- the downloads page */

.page-hero { background: linear-gradient(135deg, #01022b, var(--twilight) 45%, var(--navy) 80%, var(--teal)); color: #fff; padding: 64px 0 120px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; margin: 14px 0 12px; }
.page-hero p { color: rgba(234, 246, 255, 0.82); font-size: 18px; max-width: 620px; }
.page-hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.qr-card { background: #fff; color: var(--twilight); border-radius: 20px; padding: 16px 16px 12px; text-align: center; box-shadow: var(--shadow-lg); }
.qr-card canvas, .qr-card img, .qr-card svg { width: 148px; height: 148px; display: block; margin: 0 auto; }
.qr-card small { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: #4a5b78; max-width: 148px; }
@media (max-width: 760px) { .page-hero .wrap { grid-template-columns: 1fr; } .page-hero .qr-card { display: none; } }

.apps { margin-top: -72px; display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .apps { grid-template-columns: 1fr; } }
.app { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.app .glyph { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #fff; }
.app .glyph svg { width: 30px; height: 30px; }
.app.wallet .glyph { background: linear-gradient(135deg, var(--twilight), var(--teal)); }
.app.merchant .glyph { background: linear-gradient(135deg, var(--navy), var(--turquoise)); }
.app.terminal .glyph { background: linear-gradient(135deg, #0b1b3a, var(--navy)); }
.app.admin .glyph { background: linear-gradient(135deg, #01022b, #03045e); }
.app.ios .glyph { background: linear-gradient(135deg, #1c1c1e, #3a3a3c); }
.app h3 { margin: 2px 0 4px; font-size: 19px; }
.app .who-for { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }
.app p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.app .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); }
.app .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.app .qr-mini { width: 92px; height: 92px; padding: 6px; background: #fff; border-radius: 12px; border: 1px solid var(--border); margin-left: auto; }
.app .qr-mini canvas, .app .qr-mini svg, .app .qr-mini img { width: 100%; height: 100%; }
@media (max-width: 560px) { .app .qr-mini { display: none; } .app { grid-template-columns: 1fr; } }
.app details { margin-top: 12px; font-size: 13px; color: var(--faint); }
.app details summary { cursor: pointer; }
.app code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; color: var(--muted); }

.help ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--muted); }
.help ol strong { color: var(--text); }
.notice { border-radius: 14px; padding: 14px 16px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted); font-size: 15px; }

.meta-live { display: contents; }
