/* ==========================================================================
   Ptolemy Solo — landing page
   Palette mirrors the app: pink → purple → blue gradient on a deep
   blue/purple mesh (see ptolemy/ContentView.swift, Color.meshBlue/meshPurple).
   ========================================================================== */

:root {
  --ink:        #1a0f2e;
  --ink-soft:   #575070;
  --ink-faint:  #8b849e;
  --line:       #e6e2f0;
  --paper:      #ffffff;
  --paper-alt:  #f6f4fb;

  --pink:       #f35cd8;
  --purple:     #6b3fe8;
  --blue:       #2c6bf5;
  --cyan:       #22c8f0;

  --mesh-blue:   #1c338c;
  --mesh-purple: #542185;

  --brand-gradient: linear-gradient(100deg, var(--pink), var(--purple) 45%, var(--blue) 78%, var(--cyan));

  --radius:   18px;
  --radius-s: 12px;
  --shadow:   0 1px 2px rgba(26, 15, 46, .05), 0 12px 32px -12px rgba(26, 15, 46, .14);

  --measure: 1120px;
  --pad: clamp(20px, 5vw, 40px);
}

/* --- reset ---------------------------------------------------------------- */

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
  font-weight: 640;
}

p { margin: 0; }

a { color: inherit; }

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

/* --- layout --------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section { padding-block: clamp(56px, 9vw, 104px); }

.section-head { max-width: 34rem; margin-bottom: clamp(32px, 5vw, 52px); }

.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.section-head p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 660;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}

/* --- header --------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 3;
  padding-block: 22px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 640;
  letter-spacing: -.015em;
  font-size: 1.05rem;
  color: #fff;
}

.wordmark img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #fff;
  padding: 2px;
}

.lang-switch {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: .82rem;
  font-weight: 600;
}

.lang-switch a {
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, .72);
}

.lang-switch a[aria-current="true"] {
  background: rgba(255, 255, 255, .95);
  color: var(--mesh-purple);
}

/* --- hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--mesh-purple);
  padding-block: 0 clamp(64px, 10vw, 112px);
}

/* Stand-in for the app's animated MeshGradient: layered radial blooms. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10%;
  z-index: -1;
  background:
    radial-gradient(46% 46% at 14% 18%, rgba(243, 92, 216, .55), transparent 62%),
    radial-gradient(50% 50% at 82% 12%, rgba(34, 200, 240, .38), transparent 64%),
    radial-gradient(60% 60% at 68% 88%, rgba(44, 107, 245, .52), transparent 66%),
    linear-gradient(150deg, var(--mesh-purple), var(--mesh-blue));
}

.hero-inner {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  grid-template-columns: 1fr;
  align-items: center;
  padding-top: clamp(40px, 7vw, 76px);
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: .82rem;
  font-weight: 570;
  color: rgba(255, 255, 255, .92);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ef0b0;
  box-shadow: 0 0 0 4px rgba(110, 240, 176, .22);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.2rem, 5.6vw, 3.5rem);
  font-weight: 680;
  letter-spacing: -.03em;
}

.hero .lede {
  margin-top: 20px;
  max-width: 32rem;
  font-size: clamp(1.03rem, 1.6vw, 1.18rem);
  color: rgba(255, 255, 255, .84);
}

.hero-points {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: .93rem;
  color: rgba(255, 255, 255, .8);
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-points svg { flex: none; opacity: .85; }

/* --- waitlist form -------------------------------------------------------- */

.waitlist { margin-top: 32px; max-width: 30rem; }

.waitlist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.waitlist input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
}

.waitlist input[type="email"]::placeholder { color: var(--ink-faint); }

.waitlist input[type="email"]:focus-visible {
  outline: 3px solid rgba(110, 240, 176, .6);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius-s);
  font: inherit;
  font-size: 1rem;
  font-weight: 620;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn-primary {
  color: #fff;
  background: var(--brand-gradient);
  background-size: 180% 100%;
  box-shadow: 0 10px 26px -10px rgba(107, 63, 232, .9);
}

.btn-primary:hover { background-position: 100% 0; transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }

.btn-ghost {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }

.form-note {
  margin-top: 12px;
  font-size: .85rem;
  color: rgba(255, 255, 255, .62);
}

.form-status {
  margin-top: 14px;
  font-size: .92rem;
  font-weight: 560;
  min-height: 1.4em;
}

.form-status[data-state="ok"]    { color: #8df3c0; }
.form-status[data-state="error"] { color: #ffc0d8; }

/* --- phone mockup --------------------------------------------------------- */

.phone {
  justify-self: center;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19;
  padding: 11px;
  border-radius: 44px;
  background: linear-gradient(160deg, #2a2440, #120c22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .12),
    0 42px 70px -28px rgba(6, 3, 18, .8);
}

.phone-screen {
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(165deg, #f5faff, #e6d6f7 55%, #ccdbfc);
  padding: 26px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--ink);
}

.phone-title {
  font-size: 1.28rem;
  font-weight: 680;
  letter-spacing: -.02em;
  padding-inline: 4px;
}

.stat-card {
  background: rgba(255, 255, 255, .82);
  border-radius: 15px;
  padding: 13px 15px;
  box-shadow: 0 1px 2px rgba(26, 15, 46, .06);
}

.stat-card .label {
  font-size: .68rem;
  font-weight: 620;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stat-card .value {
  margin-top: 3px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(90deg, #9966f2, var(--mesh-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-card .value.pos { background: none; color: #17864f; }

.alert-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .82);
  border-left: 3px solid var(--pink);
  border-radius: 12px;
  padding: 10px 13px;
  font-size: .8rem;
  font-weight: 560;
}

.alert-card .pill {
  margin-left: auto;
  font-size: .68rem;
  font-weight: 680;
  color: var(--pink);
}

.phone-menu {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.phone-menu span {
  background: rgba(255, 255, 255, .82);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  font-size: .68rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* --- pillars -------------------------------------------------------------- */

.pillars {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.pillar {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.pillar .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #fff;
  margin-bottom: 16px;
}

.pillar h3 { font-size: 1.12rem; }

.pillar p {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: .96rem;
}

/* --- features ------------------------------------------------------------- */

.features { background: var(--paper-alt); }

.feature-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}

.feature {
  background: var(--paper);
  padding: 26px 24px;
}

.feature h3 {
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 9px;
}

.feature h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
  flex: none;
}

.feature p {
  margin-top: 8px;
  font-size: .93rem;
  color: var(--ink-soft);
}

/* --- pricing -------------------------------------------------------------- */

.plans {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.plan {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.plan.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    var(--brand-gradient) border-box;
  border: 2px solid transparent;
}

.plan h3 { font-size: 1.2rem; }

.plan .price {
  margin-top: 14px;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -.03em;
}

.plan .price small {
  font-size: .92rem;
  font-weight: 540;
  color: var(--ink-faint);
  letter-spacing: 0;
}

.plan ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
  font-size: .95rem;
  color: var(--ink-soft);
}

.plan li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.plan li svg {
  flex: none;
  margin-top: 5px;
  color: var(--purple);
}

/* --- faq ------------------------------------------------------------------ */

.faq { background: var(--paper-alt); }

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 47rem;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--paper);
  padding: 4px 20px;
}

details[open] { border-color: #d3c8ee; }

summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--purple);
  transition: transform .2s ease;
}

details[open] summary::after { transform: rotate(45deg); }

details p {
  padding-bottom: 18px;
  color: var(--ink-soft);
  font-size: .96rem;
  max-width: 44rem;
}

/* --- closing cta ---------------------------------------------------------- */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: var(--mesh-purple);
}

.cta::before {
  content: "";
  position: absolute;
  inset: -40% -10%;
  z-index: -1;
  background:
    radial-gradient(44% 60% at 22% 30%, rgba(243, 92, 216, .5), transparent 64%),
    radial-gradient(50% 60% at 80% 70%, rgba(44, 107, 245, .55), transparent 64%),
    linear-gradient(120deg, var(--mesh-purple), var(--mesh-blue));
}

.cta h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  max-width: 20ch;
  margin-inline: auto;
}

.cta p {
  margin-top: 16px;
  color: rgba(255, 255, 255, .8);
  max-width: 40ch;
  margin-inline: auto;
}

.cta .waitlist { margin-inline: auto; margin-top: 30px; }
.cta .form-note { text-align: center; }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--ink-faint);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.site-footer nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--purple); }

/* --- motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* --- a11y ----------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
