/* ==========================================================================
   Diabetes Pantry Project — site-wide styles
   Brand: lavender primary, sage accent, deep plum secondary
   Type: Spectral (headings) / Archivo (body)
   ========================================================================== */

:root {
  --color-primary: #8B7EC8;
  --color-primary-dark: #6B5AA0;
  --color-accent: #7A9B76;
  --color-secondary: #3E3A5C;
  --color-ink: #262433;
  --color-ink-muted: #514c5e;
  --color-bg: #F6F7F3;
  --color-bg-tint: #EFEBF7;
  --color-bg-tint-sage: #EDF2EA;
  --color-white: #ffffff;
  --color-border: rgba(38, 36, 51, 0.12);

  --font-heading: 'Spectral', Georgia, 'Source Serif 4', serif;
  --font-body: 'Archivo', 'Public Sans', Helvetica, Arial, sans-serif;

  --max-width: 1140px;
  --radius: 14px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.18;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--color-primary-dark);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #55467f;
}

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Layout helpers ---------- */

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

.section {
  padding: 72px 24px;
}

.section--tight {
  padding: 48px 24px;
}

.section--light {
  background: var(--color-bg);
}

.section--tint {
  background: var(--color-bg-tint);
}

.section--tint-sage {
  background: var(--color-bg-tint-sage);
}

.section--dark {
  background: var(--color-secondary);
  color: #fff;
}

.section--dark .eyebrow {
  color: #C6BBE8;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.stack {
  display: flex;
  flex-direction: column;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 48px 20px;
  }
}

.center {
  text-align: center;
}

.max-prose {
  max-width: 700px;
}

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--color-primary-dark);
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
}

.lede {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-ink-muted);
}

.pull-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.5;
}

blockquote {
  margin: 0;
}

/* ---------- Buttons & tags ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn--outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-tint);
  color: #4a3f6b;
}

.tag--sage {
  background: var(--color-bg-tint-sage);
  color: #3a4a37;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Cards ---------- */

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
}

.card--tint {
  background: var(--color-bg-tint-sage);
}

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

.site-header {
  padding: 18px 24px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--color-ink);
}

.site-nav a[aria-current="page"] {
  color: var(--color-primary-dark);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-toggle {
  display: none;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
  }
  .site-nav.is-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .site-nav.is-open .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }
  .header-cta {
    display: none;
  }
}

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

.hero {
  padding: 80px 24px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 600px;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .hero {
    padding: 56px 20px;
  }
  .hero-inner {
    flex-direction: column;
    gap: 32px;
  }
  .hero-copy,
  .hero-visual {
    flex: none;
    width: 100%;
    max-width: none;
  }
  .hero-visual {
    justify-content: flex-start;
    order: 2;
  }
}

/* Shelf illustration */
.shelf-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 480px;
}

.shelf-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 3px solid rgba(38, 36, 51, 0.12);
  padding-bottom: 14px;
}

.shelf-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.jar {
  border-radius: 10px 10px 4px 4px;
  flex: 1;
}

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

.site-footer {
  background: var(--color-secondary);
  color: #fff;
  padding: 56px 24px 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.footer-brand .brand img {
  width: 26px;
  height: 26px;
}

.footer-brand .brand-name {
  color: #fff;
}

.footer-cols {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.footer-col a {
  color: #fff;
  font-size: 0.9rem;
}

.footer-rule {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 28px 0 20px;
}

.footer-fine {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Forms ---------- */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-field label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-ink);
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.radio-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
}

.form-success,
.form-error {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.form-success {
  background: var(--color-bg-tint-sage);
  color: #2e4a2a;
}

.form-error {
  background: #fdeceb;
  color: #8a2f22;
}

/* ---------- Numbered / ordered content ---------- */

.step-list {
  display: flex;
  flex-direction: column;
  max-width: 760px;
}

.step-item {
  display: flex;
  gap: 18px;
  padding-bottom: 24px;
  border-left: 2px solid #D9CFEC;
  margin-left: 19px;
  padding-left: 26px;
}

.step-item:last-child {
  border-left: none;
  padding-bottom: 0;
}

.step-item p {
  color: var(--color-ink);
}

.numbered-badge {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  flex-shrink: 0;
}
