/* Basketly landing site: design tokens pulled from the real iOS app
   (Colors.xcassets: Brand #6835F2, BrandSecondary #E8735F, tier colors) */

:root {
  --purple: #6835F2;
  --purple-dark: #5427C9;
  --purple-tint: #F2EEFD;
  --purple-tint-2: #E9E1FC;
  --coral: #E8735F;
  --coral-tint: #FCEAE6;
  --ink: #1C1C1E;
  --muted: #837F78;
  --muted-2: #B4B0A7;
  --cream: #EEEBE6;
  --cream-2: #F5F3EF;
  --line: #E4DFD5;
  --white: #FFFFFF;
  --good-bg: #DFF5E8;
  --good-fg: #2A9D5C;
  --watch-bg: #FBF1DC;
  --watch-fg: #B07C10;
  --critical-bg: #FCE4EC;
  --critical-fg: #D63C74;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 45px rgba(28, 28, 30, 0.08);
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--purple); }
a:hover { color: var(--purple-dark); }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  padding-bottom: 26px;
  position: relative;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 26px;
  height: 26px;
  background-color: var(--purple);
  -webkit-mask-image: url("../images/basket-mark-purple-trim.png");
  mask-image: url("../images/basket-mark-purple-trim.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.brand-name {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.nav-links a:hover { color: var(--purple); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 24px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta:hover { color: #fff; background: #000; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
}

.mobile-panel { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 48px 32px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -50px;
  right: -40px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(104, 53, 242, 0.16), rgba(104, 53, 242, 0) 70%);
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--coral-tint);
  color: #C24F3B;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 7px 14px;
  border-radius: 20px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E8735F;
}

.hero h1 {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -1.2px;
  margin: 22px 0 0;
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 20px;
  max-width: 460px;
}

.hero-actions { margin-top: 30px; }

.hero-phone {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 12px 24px rgba(104, 53, 242, 0.28);
}

.btn-primary:hover { background: var(--purple-dark); color: #fff; }

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover { background: #000; color: #fff; }

.app-store-btn {
  padding: 10px 20px;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.app-store-btn-icon { flex-shrink: 0; }

.app-store-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  font-size: 16px;
}

.app-store-btn-text small {
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.8;
}

/* ---------- Section shell ---------- */
.section { padding: 84px 32px 20px; }
.section-narrow { max-width: 760px; margin: 0 auto; }

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.kicker {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--purple);
  text-transform: uppercase;
}

.section-head h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 12px 0 0;
}

.section-head p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 14px;
}

/* ---------- Feature cards ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 46px;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-icon {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 18px 0 0;
}

.feature-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 9px;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 46px;
}

.step { text-align: center; padding: 0 10px; }

.step-num {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.step h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 18px 0 0;
}

.step p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 8px;
}

/* ---------- Screens showcase ---------- */
.showcase-card { text-align: center; }

.showcase-illustration {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Phone frame (static CSS mock, styled to match the real app) ---------- */
.phone {
  width: 340px;
  height: 700px;
  border-radius: 46px;
  background: #F2F2F7;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.phone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 26px;
  border-radius: 18px;
  background: #000;
  z-index: 50;
}

.phone-status {
  position: absolute;
  top: 16px;
  left: 30px;
  right: 30px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
  color: #0B0B0C;
}

.phone-status-time {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.phone-home {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 60;
}

.phone-home span {
  width: 120px;
  height: 4.5px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.25);
}

.phone-home.dark span { background: rgba(255, 255, 255, 0.7); }

.phone-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Score screen */
.screen-score {
  background: var(--cream);
  height: 100%;
  padding: 72px 18px 0;
  overflow: hidden;
}

.score-ring-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.score-ring {
  position: relative;
  width: 188px;
  height: 188px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-ring svg { position: absolute; transform: rotate(-90deg); }

.score-center { display: flex; flex-direction: column; align-items: center; }

.score-pill {
  background: var(--purple-tint-2);
  color: var(--purple);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 20px;
}

.score-number { font-size: 42px; font-weight: 800; margin-top: 8px; line-height: 1; }
.score-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.score-tile { background: #fff; border-radius: 14px; padding: 10px; }
.score-tile-top { display: flex; justify-content: space-between; align-items: center; }
.score-tile-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-tile-dot svg { width: 12px; height: 12px; }
.score-tile-badge { font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 8px; }
.score-tile-title { font-size: 12.5px; font-weight: 700; margin-top: 7px; }
.score-tile-sub { font-size: 9.5px; color: var(--muted); margin-top: 2px; }

/* Nutrient grid disclosure toggle (collapsed state) */
.nutrient-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 14px;
  padding: 11px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--purple);
}

.nutrient-toggle svg { flex-shrink: 0; }

/* "In your basket" items section */
.basket-section { margin-top: 22px; padding-bottom: 20px; }

.basket-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.basket-section-head h3 { font-size: 17px; font-weight: 700; margin: 0; }
.basket-section-count { font-size: 12px; color: var(--muted); }

.basket-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.basket-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.basket-legend-dot { flex-shrink: 0; }

.basket-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.basket-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 9px 11px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.basket-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.basket-item-body { flex: 1; min-width: 0; }
.basket-item-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.basket-item-sub { font-size: 10.5px; margin-top: 1px; }
.basket-item-qty { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 46px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.price-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  border: 2px solid var(--line);
}

.price-card.plus {
  background: linear-gradient(135deg, #7C4FE8 0%, #6835F2 60%, #9B6FD9 100%);
  color: #fff;
  border: none;
  position: relative;
}

.price-tag {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.plus .price-tag { color: #E7DFFB; }

.price-amount { font-size: 32px; font-weight: 800; margin-top: 10px; }
.price-amount span { font-size: 15px; font-weight: 600; }

.price-note { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.plus .price-note { color: #E7DFFB; }

.price-divider { height: 1px; background: var(--line); margin: 22px 0; }
.plus .price-divider { background: rgba(255, 255, 255, 0.22); }

.price-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 13px;
}

.price-badge {
  position: absolute;
  top: 34px;
  right: 30px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 5px 11px;
  border-radius: 12px;
}

.price-trial-step {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.price-trial-step:last-child { margin-bottom: 0; }

.price-trial-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.price-trial-label { font-size: 13.5px; font-weight: 700; }
.price-trial-desc { font-size: 12.5px; color: #E7DFFB; margin-top: 2px; line-height: 1.4; }

.pricing-fineprint {
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 24px;
}

/* ---------- FAQ ---------- */
.faq-list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: #fff;
  border-radius: 18px;
  padding: 20px 24px;
  cursor: pointer;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.faq-q span.q-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.faq-symbol {
  font-size: 19px;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}

.faq-a {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, margin-top 0.2s ease;
}

.faq-item.open .faq-a {
  margin-top: 13px;
  max-height: 240px;
}

/* ---------- Final CTA ---------- */
.final-cta-shell { padding: 90px 32px 0; }

.final-cta {
  background: var(--ink);
  border-radius: 32px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-glow {
  position: absolute;
  top: -100px;
  left: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(104, 53, 242, 0.4), rgba(104, 53, 242, 0) 70%);
}

.final-inner { position: relative; z-index: 1; }

.final-cta h2 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin: 0;
}

.final-cta p {
  font-size: 15.5px;
  color: var(--muted-2);
  margin-top: 12px;
}

.final-app-store-btn {
  margin-top: 26px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 52px 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--purple); }

.footer-copy { font-size: 13px; color: var(--muted-2); }

/* ---------- Legal pages ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 70px 32px 100px;
}

.legal h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.6px; }
.legal .updated { font-size: 14px; color: var(--muted); margin-top: 6px; }
.legal h2 { font-size: 20px; font-weight: 700; margin-top: 40px; }
.legal p, .legal li { font-size: 15.5px; color: #3A3A3C; line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal a { text-decoration: underline; }
.legal-back { display: inline-block; margin-bottom: 20px; font-size: 14px; font-weight: 600; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .hero-phone { order: -1; margin-bottom: 10px; }
  .phone { transform: scale(0.86); }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .mobile-panel.open {
    display: block;
    background: #fff;
    border-radius: 18px;
    margin: 0 32px 18px;
    padding: 10px 8px;
    box-shadow: var(--shadow-soft);
  }
  .mobile-panel a {
    display: block;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    border-radius: 10px;
  }
  .mobile-panel a:hover { background: var(--cream-2); }
}

@media (max-width: 640px) {
  .wrap, .section, .hero { padding-left: 20px; padding-right: 20px; }
  .hero h1 { font-size: 40px; letter-spacing: -0.8px; }
  .hero-sub { font-size: 16px; }
  .section-head h2 { font-size: 28px; }
  .final-cta { padding: 44px 24px; }
  .final-cta h2 { font-size: 26px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .phone { transform: scale(0.72); margin: -70px 0; }
}
