/* ============================================================
   Whole Foods MyApps Login – Design System & Styles
   Premium, responsive, publish-ready
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Brand palette */
  --green-900: #1b4332;
  --green-800: #1e5631;
  --green-700: #2e7d32;
  --green-600: #388e3c;
  --green-500: #43a047;
  --green-400: #66bb6a;
  --green-300: #81c784;
  --green-100: #c8e6c9;
  --green-50:  #e8f5e9;

  /* Neutrals */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  /* Accent */
  --amber-400: #fbbf24;
  --red-500:   #ef4444;

  /* Typography */
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Sizing */
  --container: 880px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 14px rgba(0,0,0,.1);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12);
  --shadow-btn: 0 4px 18px rgba(46,125,50,.4);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--green-500); }

/* ---------- Google Fonts Fallback ---------- */
/* Loaded in <head>: Inter 400/500/600/700, Outfit 600/700 */

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow .3s var(--ease);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green-800);
}

.nav__brand svg {
  width: 32px;
  height: 32px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav__links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-600);
  position: relative;
  padding: 4px 0;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-500);
  transition: width .25s var(--ease);
}

.nav__links a:hover { color: var(--green-700); }
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  background: var(--green-700);
  color: var(--white) !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .88rem;
  transition: background .2s var(--ease), transform .2s var(--ease);
}

.nav__cta:hover {
  background: var(--green-600);
  transform: translateY(-1px);
  color: var(--white) !important;
}

.nav__cta::after { display: none !important; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(145deg, var(--green-900) 0%, var(--green-700) 55%, var(--green-500) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px 20px 64px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero__badge svg { width: 14px; height: 14px; }

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}

.hero__subtitle {
  font-size: 1.12rem;
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 32px;
  opacity: .9;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Primary Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all .25s var(--ease);
  text-decoration: none;
}

.btn--primary {
  background: var(--white);
  color: var(--green-800);
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
  color: var(--green-700);
}

.btn--outline {
  border: 2px solid rgba(255,255,255,.5);
  color: var(--white);
  background: transparent;
}

.btn--outline:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--white);
  color: var(--white);
}

.btn--green {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn--green:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(46,125,50,.5);
  color: var(--white);
}

.btn svg { width: 18px; height: 18px; }

/* Hero stats */
.hero__stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.15);
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.hero__stat-label {
  font-size: .82rem;
  opacity: .7;
  margin-top: 2px;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.toc {
  max-width: var(--container);
  margin: -28px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.toc__card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.toc__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc__title svg { width: 18px; height: 18px; color: var(--green-600); }

.toc__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px 24px;
  list-style: none;
}

.toc__list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: background .2s var(--ease), color .2s var(--ease);
}

.toc__list a:hover {
  background: var(--green-50);
  color: var(--green-700);
}

.toc__list a::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-400);
  flex-shrink: 0;
}

/* ============================================================
   ARTICLE / MAIN CONTENT
   ============================================================ */
.article {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 20px 60px;
}

.article p {
  margin-bottom: 18px;
  color: var(--gray-700);
  font-size: 1.02rem;
}

.article strong {
  color: var(--gray-900);
}

/* Section headings */
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 52px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green-50);
}

.section-heading__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.section-heading__icon svg {
  width: 20px;
  height: 20px;
  color: var(--green-700);
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-top: 28px;
  margin-bottom: 12px;
}

/* Lists */
.article ul,
.article ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
}

.article ol { counter-reset: step-counter; }

.article ul li,
.article ol li {
  position: relative;
  padding: 10px 16px 10px 36px;
  margin-bottom: 6px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  font-size: .98rem;
  color: var(--gray-700);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.article ul li:hover,
.article ol li:hover {
  border-color: var(--green-300);
  box-shadow: 0 2px 8px rgba(46,125,50,.08);
}

.article ul li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 18px;
  width: 7px;
  height: 7px;
  background: var(--green-500);
  border-radius: 50%;
}

.article ol li {
  counter-increment: step-counter;
}

.article ol li::before {
  content: counter(step-counter);
  position: absolute;
  left: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  background: var(--green-700);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nested list inside OL (password requirements) */
.article ol li ul {
  margin-top: 10px;
  margin-bottom: 0;
}

.article ol li ul li {
  border: none;
  background: var(--green-50);
  padding: 6px 12px 6px 28px;
  margin-bottom: 4px;
}

.article ol li ul li::before {
  top: 12px;
  left: 10px;
  width: 5px;
  height: 5px;
}

/* Code inline */
.article code {
  background: var(--green-50);
  color: var(--green-800);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .92em;
  font-family: 'Fira Code', 'Consolas', monospace;
}

/* Tip callout */
.callout {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--green-50), rgba(200,230,201,.4));
  border-left: 4px solid var(--green-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}

.callout__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--green-700);
}

.callout p {
  margin: 0;
  font-size: .95rem;
}

/* CTA Card (login button sections) */
.cta-card {
  text-align: center;
  padding: 36px 28px;
  background: linear-gradient(145deg, var(--green-900), var(--green-700));
  border-radius: var(--radius-lg);
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
}

.cta-card p {
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  margin-bottom: 20px;
}

.cta-card .btn {
  position: relative;
  z-index: 1;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list {
  margin-top: 8px;
}

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--white);
  overflow: hidden;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.faq-item:hover {
  border-color: var(--green-300);
}

.faq-item.active {
  border-color: var(--green-400);
  box-shadow: 0 2px 12px rgba(46,125,50,.1);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  text-align: left;
  gap: 12px;
  transition: color .2s var(--ease);
}

.faq-question:hover { color: var(--green-700); }

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gray-400);
  transition: transform .3s var(--ease), color .3s var(--ease);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--green-600);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s var(--ease), padding .35s var(--ease);
}

.faq-item.active .faq-answer {
  max-height: 400px;
}

.faq-answer__inner {
  padding: 0 20px 20px;
  color: var(--gray-600);
  font-size: .95rem;
  line-height: 1.75;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 48px 20px 24px;
  margin-top: 0;
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__brand svg { width: 28px; height: 28px; }

.footer__desc {
  font-size: .88rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer__heading {
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-300);
  margin-bottom: 14px;
}

.footer__links {
  list-style: none;
}

.footer__links li { margin-bottom: 8px; }

.footer__links a {
  font-size: .9rem;
  color: var(--gray-400);
  transition: color .2s var(--ease);
}

.footer__links a:hover { color: var(--green-400); }

.footer__bottom {
  max-width: var(--container);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--gray-700);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--green-700);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--green-600);
  transform: translateY(-2px);
}

.back-to-top svg { width: 22px; height: 22px; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 20px 0;
  font-size: .84rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs a { color: var(--gray-500); }
.breadcrumbs a:hover { color: var(--green-700); }
.breadcrumbs span { color: var(--gray-400); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero__inner { padding: 56px 20px 48px; }
  .hero__stats { gap: 28px; }

  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  /* Mobile menu */
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 20px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    animation: slideDown .3s var(--ease);
  }

  .nav__links.open a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .nav__links.open a:hover { background: var(--green-50); }

  .toc__list { grid-template-columns: 1fr; }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .section-heading h2 { font-size: 1.35rem; }
}

/* Mobile */
@media (max-width: 480px) {
  html { font-size: 15px; }

  .hero h1 { font-size: 1.65rem; }
  .hero__subtitle { font-size: 1rem; }
  .hero__inner { padding: 44px 16px 40px; }

  .hero__stats { flex-direction: column; gap: 16px; }

  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .toc__card { padding: 20px 18px; }

  .article { padding: 32px 16px 48px; }

  .section-heading { flex-direction: column; align-items: flex-start; gap: 8px; }

  .cta-card { padding: 28px 18px; }
  .cta-card .btn { width: 100%; justify-content: center; }

  .back-to-top { bottom: 18px; right: 18px; width: 42px; height: 42px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}
