/* ============================================================
   GrocerBuddy — Custom styles layered on top of Tailwind CDN
   ============================================================ */

:root {
  --primary:  #1A73E8;
  --darkblue: #0D47A1;
  --navy:     #0A1628;
  --sky:      #EBF5FB;
  --accent:   #5BA4F5;
  --soft:     #A8D4FF;
  --mute:     #5F6B7A;
}

html { scroll-behavior: auto; } /* Lenis takes over */
body { background: var(--sky); }

/* Hide custom cursor on touch devices */
.cursor-dot, .cursor-ring { pointer-events: none; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  mix-blend-mode: normal;
  transition: width .2s, height .2s, background .2s;
}
.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(26,115,232,.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 9998;
  transition: width .25s ease, height .25s ease, border-color .2s, background .2s;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  background: rgba(26,115,232,.08);
  border-color: rgba(26,115,232,.5);
}

/* ---------- Nav ---------- */
.nav-shell { transition: padding .3s, background .3s; }
#nav.is-scrolled .nav-shell {
  background: rgba(255,255,255,.85);
  box-shadow: 0 12px 40px rgba(13,71,161,.08);
}
.nav-link { position: relative; transition: color .2s; }
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1.5px;
  background: var(--primary);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s cubic-bezier(.65,0,.35,1);
}
.nav-link:hover { color: var(--navy); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--navy); color: #fff;
  padding: .65rem 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  transition: transform .2s ease, background .2s ease, box-shadow .25s ease;
  box-shadow: 0 6px 20px rgba(10,22,40,.18);
}
.btn-primary:hover { background: var(--primary); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(26,115,232,.32); }
.btn-primary.btn-lg { padding: .9rem 1.4rem; font-size: 15px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: .65rem;
  background: #fff; color: var(--navy);
  padding: .65rem 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  border: 1px solid rgba(10,22,40,.08);
  transition: transform .2s, border-color .2s;
}
.btn-ghost:hover { transform: translateY(-1px); border-color: var(--primary); }
.btn-ghost.btn-lg { padding: .85rem 1.3rem; font-size: 15px; }

/* ---------- Decorative blobs ---------- */
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .55; z-index: 0; pointer-events: none;
}
.blob-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #A8D4FF 0%, transparent 70%);
  top: -120px; right: -120px;
}
.blob-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #5BA4F5 0%, transparent 70%);
  bottom: -160px; left: -100px;
  opacity: .35;
}

/* ---------- Hero ---------- */
.hero-line { display: block; overflow: hidden; }
.hero-line > span { display: block; will-change: transform; }

.text-gradient {
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 60%, var(--darkblue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Phone mockup ---------- */
.phone-frame {
  position: relative;
  width: 100%; max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  background: linear-gradient(180deg, #0A1628 0%, #1a2b4d 100%);
  border-radius: 44px;
  padding: 8px;
  box-shadow:
    0 50px 100px -20px rgba(13,71,161,.35),
    0 30px 60px -30px rgba(10,22,40,.4),
    inset 0 0 0 1.5px rgba(255,255,255,.08);
}
.phone-notch {
  position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 22px;
  background: #0A1628;
  border-radius: 14px;
  z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  background: #fff;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
}

.float-card { z-index: 3; will-change: transform; }
.float-card-1 { animation: floaty1 6s ease-in-out infinite; }
.float-card-2 { animation: floaty2 7s ease-in-out infinite; animation-delay: -2s; }
@keyframes floaty1 {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%     { transform: translateY(-12px) rotate(-2deg); }
}
@keyframes floaty2 {
  0%,100% { transform: translateY(0) rotate(4deg); }
  50%     { transform: translateY(-10px) rotate(3deg); }
}

/* ---------- Kicker / section labels ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .22em;
  color: var(--primary);
}
.kicker::before {
  content: ""; width: 24px; height: 1.5px; background: var(--primary);
}

.reveal-title { opacity: 1; }

/* ---------- Problem cards ---------- */
.problem-card {
  position: relative;
  padding: 2.25rem 1.75rem;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(10,22,40,.05);
  transition: transform .35s ease, box-shadow .35s ease;
}
.problem-card:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -25px rgba(13,71,161,.18); }
.problem-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--primary);
  letter-spacing: .05em;
}
.problem-title {
  margin-top: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700; line-height: 1.2;
  color: var(--navy);
}
.problem-text { margin-top: .75rem; color: var(--mute); font-size: 15px; line-height: 1.6; }

/* ---------- Feature cards ---------- */
.feature-card {
  position: relative;
  padding: 1.75rem 1.5rem 2rem;
  border-radius: 26px;
  background: #FAFCFF;
  border: 1px solid rgba(10,22,40,.05);
  transition: transform .35s ease, background .35s ease, border-color .35s;
  overflow: hidden;
}
.feature-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx,50%) var(--my,0%), rgba(26,115,232,.08), transparent 50%);
  opacity: 0; transition: opacity .35s;
  pointer-events: none;
}
.feature-card:hover { transform: translateY(-6px); border-color: rgba(26,115,232,.2); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--darkblue));
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(26,115,232,.5);
}
.feature-title {
  margin-top: 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem; font-weight: 700; color: var(--navy);
}
.feature-text { margin-top: .55rem; color: var(--mute); font-size: 14.5px; line-height: 1.6; }

/* ---------- How it works steps ---------- */
.step-card {
  position: relative;
  padding: 2rem 1.75rem;
  border-radius: 28px;
  background: var(--sky);
  border: 1px solid rgba(26,115,232,.08);
  z-index: 1;
}
.step-num {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
  box-shadow: 0 10px 30px -10px rgba(26,115,232,.4);
  border: 1.5px solid rgba(26,115,232,.15);
}
.step-title {
  margin-top: 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem; font-weight: 700; color: var(--navy);
}
.step-text { margin-top: .55rem; color: var(--mute); font-size: 15px; line-height: 1.6; }

.step-line {
  position: absolute; top: 56px; left: 8%; right: 8%;
  height: 2px;
  background: repeating-linear-gradient(to right, rgba(26,115,232,.25) 0 6px, transparent 6px 14px);
  z-index: 0;
}

/* ---------- Why benefits ---------- */
.benefit-row {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  background: var(--sky);
  border: 1px solid rgba(26,115,232,.08);
  transition: transform .25s, border-color .25s;
}
.benefit-row:hover { transform: translateX(4px); border-color: rgba(26,115,232,.25); }
.benefit-tick {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  position: relative;
  box-shadow: 0 4px 12px rgba(26,115,232,.35);
}
.benefit-tick::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 11px; height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -65%) rotate(-45deg);
}
.benefit-text { font-size: 1.05rem; font-weight: 500; color: var(--navy); }

/* ---------- FAQ ---------- */
.faq-item {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(10,22,40,.06);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.faq-item[open] {
  border-color: rgba(26,115,232,.25);
  box-shadow: 0 14px 30px -18px rgba(13,71,161,.15);
}
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.35rem 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem; font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  position: relative;
  width: 22px; height: 22px;
  flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute;
  top: 50%; left: 50%;
  background: var(--primary);
  border-radius: 1px;
  transition: transform .3s;
}
.faq-icon::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }
.faq-icon::after  { width: 2px; height: 12px; transform: translate(-50%, -50%); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-content {
  padding: 0 1.5rem 1.5rem;
  color: var(--mute);
  line-height: 1.65;
  font-size: 15px;
}

/* ---------- Contact ---------- */
.contact-card {
  background: #fff;
  padding: 2rem;
  border-radius: 28px;
  border: 1px solid rgba(10,22,40,.06);
  box-shadow: 0 30px 60px -30px rgba(13,71,161,.18);
}
@media (min-width: 640px) { .contact-card { padding: 2.5rem; } }

.field { display: block; }
.field-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 600;
  color: var(--navy);
  letter-spacing: .04em;
  margin-bottom: .5rem;
}
.field-input {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(10,22,40,.08);
  background: #FAFCFF;
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field-input::placeholder { color: rgba(95,107,122,.6); }
.field-input:hover { border-color: rgba(10,22,40,.18); }
.field-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(26,115,232,.12);
}

.contact-info {
  display: flex; align-items: center; gap: .9rem;
  padding: .85rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(10,22,40,.06);
  transition: border-color .2s, transform .2s;
}
a.contact-info:hover { border-color: var(--primary); transform: translateX(2px); }
.contact-info-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--sky);
  color: var(--primary);
  flex-shrink: 0;
}

.form-success { color: #0a8a3a; }
.form-error   { color: #c0392b; }

/* ---------- Final CTA ---------- */
.cta-card { box-shadow: 0 60px 120px -40px rgba(13,71,161,.45); }
.cta-bg {
  position: absolute; inset: 0; z-index: 0; opacity: .15;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.6) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.4) 0%, transparent 40%);
}
.cta-btn { transition: transform .2s, background .2s; }
.cta-btn:hover { transform: translateY(-1px); }

/* ---------- Footer ---------- */
.footer-h {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--navy);
}
.footer-list { margin-top: 1rem; display: flex; flex-direction: column; gap: .65rem; font-size: 14.5px; }
.footer-list a { color: var(--mute); transition: color .2s; }
.footer-list a:hover { color: var(--primary); }

.social-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  border: 1px solid rgba(10,22,40,.08);
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.social-btn:hover {
  background: var(--navy); color: #fff;
  border-color: var(--navy);
  transform: translateY(-2px);
}

.powered-by {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(10,22,40,.06);
  font-size: 13px;
  transition: border-color .2s, transform .2s;
}
.powered-by:hover { border-color: var(--primary); transform: translateY(-1px); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .float-card-1, .float-card-2 { animation: none; }
}
