/* ============================================================
   Aptxa landing — shared stylesheet
   Colors mirror lib/app/theme/palette.dart (light scheme).
   ============================================================ */

:root {
  --teal-deep: #0F6E56;      /* primary / heroBackground */
  --teal-deeper: #085041;    /* primaryOnSurface */
  --teal-ink: #04342C;       /* bubbleText */
  --teal-solid: #1D9E75;     /* primarySolid */
  --mint: #E1F5EE;           /* primarySurface / onPrimary */
  --mint-soft: #9FE1CB;      /* primaryTint */
  --amber: #EF9F27;
  --amber-ink: #854F0B;
  --amber-surface: #FAEEDA;
  --coral: #DC503C;
  --coral-surface: #FAECE7;
  --indigo: #645CD2;
  --indigo-surface: #EEEDFE;
  --page: #F7F6F2;           /* surface1 */
  --page-dim: #F0EFEC;       /* surface0 */
  --card: #FFFFFF;
  --ink: #0B0B0B;
  --ink-2: #52514E;
  --ink-3: #898781;
  --line: rgba(11, 11, 11, 0.10);
  --line-strong: rgba(11, 11, 11, 0.16);
  --radius: 18px;
  --shadow-card: 0 1px 2px rgba(11, 11, 11, 0.04), 0 12px 32px -12px rgba(15, 110, 86, 0.18);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--page);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand img { width: 34px; height: 34px; border-radius: 9px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--teal-deep); text-decoration: none; }

.nav-cta {
  background: var(--teal-deep);
  color: var(--mint) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--teal-deeper); }

@media (max-width: 640px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-mint { background: var(--mint); color: var(--teal-deeper); }
.btn-mint:hover { background: #d3efe4; }

.btn-outline-light {
  border: 1.5px solid rgba(225, 245, 238, 0.45);
  color: var(--mint);
}
.btn-outline-light:hover { border-color: var(--mint-soft); background: rgba(225, 245, 238, 0.08); }

.btn-teal { background: var(--teal-deep); color: var(--mint); }
.btn-teal:hover { background: var(--teal-deeper); }

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

.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(29, 158, 117, 0.55), transparent 65%),
    radial-gradient(700px 500px at -10% 110%, rgba(8, 80, 65, 0.9), transparent 60%),
    var(--teal-deep);
  color: var(--mint);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 96px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint-soft);
  margin-bottom: 20px;
}

.hero-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--mint-soft);
  border-radius: 2px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: italic;
  color: var(--mint-soft);
}

.hero-sub {
  font-size: 1.13rem;
  color: rgba(225, 245, 238, 0.85);
  max-width: 44ch;
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero-note { margin-top: 18px; font-size: 0.88rem; color: var(--mint-soft); }

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 72px; }
  .hero-mock { display: none; }
}

/* ---------- Hero mock card (CSS-drawn app preview) ---------- */

.hero-mock {
  background: var(--card);
  color: var(--ink);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 64px -20px rgba(4, 52, 44, 0.55);
  transform: rotate(1.5deg);
  max-width: 400px;
  justify-self: end;
  width: 100%;
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mock-head .mock-title { font-weight: 700; font-size: 1.02rem; }
.mock-head .mock-date { font-size: 0.8rem; color: var(--ink-3); }

.mock-stats { display: flex; gap: 10px; margin-bottom: 16px; }

.mock-stat {
  flex: 1;
  background: var(--mint);
  border-radius: 14px;
  padding: 10px 12px;
}
.mock-stat b { display: block; font-size: 1.15rem; color: var(--teal-deeper); }
.mock-stat span { font-size: 0.72rem; color: var(--teal-deep); }

.mock-stat.amber { background: var(--amber-surface); }
.mock-stat.amber b { color: var(--amber-ink); }
.mock-stat.amber span { color: var(--amber-ink); }

.mock-appt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  background: var(--page);
}
.mock-appt:last-child { margin-bottom: 0; }

.mock-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mint);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.mock-appt .who { font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.mock-appt .when { font-size: 0.78rem; color: var(--ink-3); }

.mock-pill {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-deeper);
  white-space: nowrap;
}
.mock-pill.pending { background: var(--amber-surface); color: var(--amber-ink); }

/* ---------- Sections ---------- */

section { padding: 84px 0; }

.section-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-solid);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 14px;
  max-width: 26ch;
}

.section-sub { color: var(--ink-2); max-width: 58ch; margin-bottom: 48px; }

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 880px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; }

.fi-mint { background: var(--mint); color: var(--teal-deep); }
.fi-amber { background: var(--amber-surface); color: var(--amber-ink); }
.fi-indigo { background: var(--indigo-surface); color: var(--indigo); }
.fi-coral { background: var(--coral-surface); color: var(--coral); }

.feature-card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.94rem; color: var(--ink-2); }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

.step {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.step::before {
  content: "0" counter(step);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--mint-soft);
  display: block;
  margin-bottom: 12px;
}

.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 0.94rem; color: var(--ink-2); }

/* ---------- Split highlight ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 36px; } }

.split .section-title { max-width: 20ch; }

.check-list { list-style: none; margin-top: 8px; }

.check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  color: var(--ink-2);
}

.check-list li strong { color: var(--ink); }

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F6E56' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Insight tiles mock */

.insight-mock {
  background: var(--teal-deep);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 24px 56px -22px rgba(4, 52, 44, 0.5);
}

.insight-mock .im-title {
  color: var(--mint-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.im-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.im-tile {
  background: rgba(225, 245, 238, 0.12);
  border-radius: 16px;
  padding: 16px;
  color: var(--mint);
}
.im-tile b { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.im-tile span { font-size: 0.78rem; color: var(--mint-soft); }

.im-bars {
  grid-column: 1 / -1;
  background: rgba(225, 245, 238, 0.12);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
}
.im-bars i {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: var(--mint-soft);
  opacity: 0.55;
}
.im-bars i:nth-child(6) { background: var(--mint); opacity: 1; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--teal-deep);
  border-radius: 28px;
  color: var(--mint);
  padding: 56px 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background-image: radial-gradient(600px 300px at 90% 0%, rgba(29, 158, 117, 0.6), transparent 60%);
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.cta-band p { color: rgba(225, 245, 238, 0.8); margin-top: 8px; max-width: 44ch; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--page-dim);
  padding: 40px 0 48px;
  margin-top: 40px;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--ink-2); }

/* ---------- Legal / document pages ---------- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.doc h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.doc .doc-meta { color: var(--ink-3); font-size: 0.9rem; margin-bottom: 40px; }

.doc h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 40px 0 12px;
}

.doc h3 { font-size: 1.02rem; font-weight: 700; margin: 24px 0 8px; }

.doc p, .doc li { color: var(--ink-2); margin-bottom: 12px; }

.doc ul { padding-left: 22px; margin-bottom: 16px; }
.doc li { margin-bottom: 8px; }

.doc .callout {
  background: var(--mint);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: var(--teal-deeper);
  margin: 24px 0;
}
.doc .callout a { font-weight: 600; }

/* ---------- FAQ ---------- */

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 48px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--teal-solid);
  font-weight: 500;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item .faq-body { padding: 0 22px 18px; color: var(--ink-2); font-size: 0.95rem; }

/* ---------- 404 ---------- */

.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.notfound h1 {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 600;
  color: var(--teal-deep);
  line-height: 1;
  margin-bottom: 12px;
}

.notfound p { color: var(--ink-2); margin-bottom: 28px; }
