/* =========================================================
   Manage — modern landing styles
   Apple-native aesthetic · auto light/dark
   ========================================================= */

/* ---- Design tokens ------------------------------------- */
:root {
  /* Brand (from the app icon) */
  --brand:        #008083;
  --brand-strong: #005f60;
  --brand-soft:   #249ea0;

  /* Light theme surfaces */
  --bg:           #f5f6f7;
  --bg-elevated:  #ffffff;
  --surface:      #ffffff;
  --surface-2:    #f0f2f3;
  --border:       rgba(0, 0, 0, 0.08);
  --border-strong:rgba(0, 0, 0, 0.12);

  /* Text */
  --text:         #0c1213;
  --text-soft:    #4a5658;
  --text-faint:   #8a9698;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 28px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.10), 0 30px 80px rgba(0, 0, 0, 0.12);
  --glow:      0 30px 90px rgba(0, 128, 131, 0.28);

  --radius-sm: 12px;
  --radius:    18px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --header-h: 64px;
  --maxw: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

  --glass-bg: rgba(255, 255, 255, 0.72);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:        #2fb3b6;
    --brand-strong: #18888a;
    --brand-soft:   #3fc6c9;

    --bg:           #0a0e0f;
    --bg-elevated:  #14191a;
    --surface:      #161c1d;
    --surface-2:    #1d2426;
    --border:       rgba(255, 255, 255, 0.09);
    --border-strong:rgba(255, 255, 255, 0.16);

    --text:         #f3f6f6;
    --text-soft:    #aeb9ba;
    --text-faint:   #6c797b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --glow:      0 30px 100px rgba(47, 179, 182, 0.30);

    --glass-bg: rgba(20, 25, 26, 0.72);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  padding: 7px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent);
}

/* ---- Buttons ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-strong));
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 128, 131, 0.35);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 30px rgba(0, 128, 131, 0.45); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

/* App Store badge */
.appstore { display: inline-block; transition: transform .2s ease, filter .2s ease; }
.appstore img { height: 54px; width: auto; }
.appstore:hover { transform: translateY(-2px); }

/* ---- Header -------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand:hover { color: var(--text); }
.brand .logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.brand .name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.header .btn { padding: 9px 18px; }

/* ---- Hero ---------------------------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding: 96px 0 40px;
  overflow: hidden;
}
.hero::before {
  /* ambient brand glow behind the hero */
  content: "";
  position: absolute;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--brand) 26%, transparent) 0%,
    transparent 65%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.hero-title {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 26px auto 0;
  max-width: 16ch;
}
.hero-title .grad {
  background: linear-gradient(120deg, var(--brand-soft), var(--brand), var(--brand-strong));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-soft);
  max-width: 56ch;
  margin: 22px auto 0;
}
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---- Phone showcase ------------------------------------ */
.showcase {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 56px 0 24px;
}
.phone {
  position: relative;
  width: min(320px, 78vw);
  padding: 12px;
  border-radius: 52px;
  background: linear-gradient(160deg, #2a3133, #0d1112);
  box-shadow: var(--glow), var(--shadow-lg);
}
@media (prefers-color-scheme: dark) {
  .phone { background: linear-gradient(160deg, #2c3335, #04080a); }
}
.phone::after {
  /* notch */
  content: "";
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 38%; height: 26px;
  background: #0d1112;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone img {
  width: 100%;
  border-radius: 42px;
  display: block;
}
.showcase::before {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 520px; height: 120px;
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--brand) 30%, transparent), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

/* ---- Features ------------------------------------------ */
.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section-head p {
  color: var(--text-soft);
  font-size: 18px;
  margin: 16px 0 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}
.feature .icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 20px;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-soft), var(--brand-strong));
  box-shadow: 0 8px 20px rgba(0, 128, 131, 0.3);
}
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.feature p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 15.5px;
}

/* ---- CTA ----------------------------------------------- */
.cta .wrap { padding-top: 0; padding-bottom: 0; }
.cta-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: var(--radius-xl);
  padding: 72px 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand), var(--brand-strong));
  box-shadow: var(--shadow-lg);
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.25), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,0.18), transparent 40%);
  pointer-events: none;
}
.cta-card h2 {
  position: relative;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cta-card p {
  position: relative;
  margin: 14px auto 30px;
  max-width: 46ch;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.92);
}
.cta-card .appstore { position: relative; }

/* ---- Footer -------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 40px;
}
.footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer .brand .name { font-size: 17px; }
.footer-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 24px; }
.footer-link { color: var(--text-soft); font-weight: 500; font-size: 14px; }
.footer-link:hover { color: var(--brand); }
.footer .copy { color: var(--text-faint); font-size: 13px; margin: 0; }

/* ---- Legal pages --------------------------------------- */
.legal { padding: 64px 0 24px; }
.legal-content { max-width: 720px; margin: 0 auto; }
.legal-content h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.legal-content h3 {
  margin-top: 36px;
  font-size: 22px;
  font-weight: 700;
}
.legal-content p, .legal-content li { color: var(--text-soft); }
.legal-content a { font-weight: 600; }

/* ---- Scroll reveal ------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .feature:hover, .appstore:hover { transform: none; }
}

/* ---- Responsive ---------------------------------------- */
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .hero { padding-top: 72px; }
  .section { padding: 60px 0; }
  .cta-card { padding: 56px 22px; }
  .footer .wrap { flex-direction: column; text-align: center; justify-content: center; }
}
