/* COSTA website. The app's own colours (src/theme.js, the COSTA theme) and font (Manrope, SIL Open Font License, self-hosted so
   no visitor data goes to a font service). Phone first; wider screens add columns. */

@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope-Medium.woff2') format('woff2'); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope-Bold.woff2') format('woff2'); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --bg: #0A1316;
  --surface: #111C20;
  --raised: #172A30;
  --text: #ECE6D8;
  --muted: rgba(236, 230, 216, 0.66);
  --faint: rgba(236, 230, 216, 0.42);
  --gold: #CFAA76;
  --gold-deep: #B8925F;
  --gold-soft: rgba(207, 170, 118, 0.12);
  --gold-border: rgba(207, 170, 118, 0.32);
  --glass: rgba(236, 230, 216, 0.045);
  --glass-border: rgba(236, 230, 216, 0.10);
  --hairline: rgba(236, 230, 216, 0.08);
  --radius: 24px;
  --radius-sm: 14px;
  --gutter: 20px;
  --max: 1080px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  /* a soft gold glow at the top, like the app's accent wash */
  background-image: radial-gradient(1100px 520px at 50% -160px, rgba(207, 170, 118, 0.14), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #E0C08F; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 14px; border-radius: 10px; }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(10, 19, 22, 0.78); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--hairline); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.22em; font-size: 15px; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--text); background: var(--glass); }
@media (max-width: 420px) { .nav a.hide-sm { display: none; } }

/* ------------------------------------------------------------------ type */
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h1 { font-weight: 800; font-size: clamp(34px, 8vw, 58px); letter-spacing: -0.03em; }
h2 { font-weight: 800; font-size: clamp(26px, 5.5vw, 38px); }
h3 { font-weight: 700; font-size: 20px; }
p { margin: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.lead { color: var(--muted); font-size: clamp(17px, 2.6vw, 20px); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ------------------------------------------------------------------ glass */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* the sheen across the top, as on the app's cards */
.glass::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 55%; background: linear-gradient(rgba(236, 230, 216, 0.06), rgba(236, 230, 216, 0)); pointer-events: none; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-border); }

/* "Coming soon to the App Store": a label, not a button */
.soon {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 16px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(236, 230, 216, 0.08), rgba(236, 230, 216, 0.03));
  border: 1px solid var(--gold-border);
  color: var(--text); text-decoration: none;
}
.soon .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); flex: none; }
.soon strong { display: block; font-size: 16px; font-weight: 800; }
.soon span { display: block; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ home: hero */
.hero { padding: 56px 0 32px; text-align: center; }
.hero .mark { width: 92px; height: 92px; margin: 0 auto 20px; filter: drop-shadow(0 10px 30px rgba(207, 170, 118, 0.25)); }
.hero .wordmark { font-weight: 800; letter-spacing: 0.32em; font-size: 15px; color: var(--muted); margin-bottom: 18px; padding-left: 0.32em; }
.hero h1 { max-width: 14ch; margin: 0 auto; }
.hero .lead { max-width: 34ch; margin: 18px auto 28px; }
.hero-phone { margin: 44px auto 0; max-width: 300px; }

/* ------------------------------------------------------------------ phone frame (swap the image for a real screenshot) */
.phone {
  position: relative; width: 100%; max-width: 290px; margin: 0 auto;
  aspect-ratio: 1179 / 2556; padding: 10px; border-radius: 46px;
  background: linear-gradient(160deg, #1d2c31, #0c1518 60%);
  border: 1px solid rgba(236, 230, 216, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.5) inset, 0 0 60px rgba(207, 170, 118, 0.10);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; background: var(--surface); }
.phone::after { content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 30%; height: 24px; border-radius: 14px; background: #05090a; }

/* ------------------------------------------------------------------ home: features */
.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { margin-top: 10px; }
.section-head .lead { margin-top: 12px; }

.feature { display: grid; gap: 28px; align-items: center; padding: 28px 0; }
.feature .copy h3 { font-size: clamp(24px, 4.5vw, 32px); font-weight: 800; margin: 10px 0 12px; }
.feature .copy p { color: var(--muted); }
.feature ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature li { display: flex; gap: 10px; color: var(--text); font-size: 16px; }
.feature li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23CFAA76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
@media (min-width: 820px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; padding: 44px 0; }
  .feature.flip .media { order: 2; }
}

.mini-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .mini-grid { grid-template-columns: repeat(3, 1fr); } }
.mini { padding: 24px; }
.mini .phone { max-width: 220px; margin-bottom: 22px; }
.mini h3 { margin-bottom: 8px; }
.mini p { color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------------ home: free vs pro */
.plans { display: grid; gap: 16px; }
@media (min-width: 820px) { .plans { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.plan { padding: 28px 24px; }
.plan.pro { border-color: var(--gold-border); background: linear-gradient(180deg, rgba(207, 170, 118, 0.10), rgba(207, 170, 118, 0.03)); }
.plan h3 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.plan .price { margin-top: 10px; font-size: 15px; color: var(--muted); }
.plan .price strong { color: var(--text); font-size: 22px; font-weight: 800; }
.plan ul { list-style: none; margin: 22px 0 0; padding: 0; }
.plan li { padding: 12px 0; border-top: 1px solid var(--hairline); }
.plan li strong { display: block; font-weight: 700; font-size: 16px; }
.plan li span { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 2px; }
.plan-note { margin-top: 18px; text-align: center; color: var(--faint); font-size: 13px; max-width: 640px; margin-left: auto; margin-right: auto; }
.save { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: #111C20; font-size: 12px; font-weight: 800; vertical-align: 2px; }

/* ------------------------------------------------------------------ text pages (privacy, terms, support) */
.page { padding: 48px 0 24px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(32px, 7vw, 46px); }
.page .updated { margin-top: 10px; color: var(--faint); font-size: 14px; }
.page .intro { margin-top: 20px; }
.prose h2 { font-size: 22px; margin: 40px 0 12px; font-weight: 800; }
.prose h3 { font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { color: rgba(236, 230, 216, 0.84); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 10px 0; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.toc { margin-top: 28px; padding: 20px 22px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 1; }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 32px; } }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--gold); }
.table-wrap { overflow-x: auto; margin: 14px 0; border-radius: var(--radius-sm); border: 1px solid var(--glass-border); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
th { font-weight: 700; color: var(--text); background: rgba(236, 230, 216, 0.04); }
td { color: rgba(236, 230, 216, 0.82); }
tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { margin-top: 28px; display: grid; gap: 12px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 700; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .answer { padding: 0 20px 20px; color: rgba(236, 230, 216, 0.84); }
.faq .answer p + p, .faq .answer ol { margin-top: 10px; }
.faq .answer ol { padding-left: 20px; }
.contact { margin-top: 32px; padding: 26px 24px; text-align: center; }
.contact .email { display: inline-block; margin-top: 10px; font-size: 20px; font-weight: 800; word-break: break-all; }

/* /get and 404 */
.center-page { min-height: calc(100vh - 220px); display: grid; place-items: center; text-align: center; padding: 56px 0; }
.center-page .mark { width: 84px; height: 84px; margin: 0 auto 22px; }
.center-page h1 { font-size: clamp(32px, 7vw, 48px); }
.center-page .lead { margin: 14px auto 26px; max-width: 34ch; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 800; text-decoration: none; color: #111C20; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); box-shadow: 0 10px 28px rgba(207, 170, 118, 0.25); transition: transform 0.15s; }
.button:hover { color: #111C20; transform: translateY(-1px); }
.button:active { transform: scale(0.97); }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: 48px; padding: 36px 0 44px; border-top: 1px solid var(--hairline); color: var(--faint); font-size: 14px; }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .credits { display: flex; flex-wrap: wrap; gap: 6px 20px; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; } .site-footer .credits { grid-column: 1 / -1; } }
