/* ============================================
   Sweet Tart — Design Tokens & Component Styles
   ============================================ */

/* --- Fonts --- */
/* Display: Zodiak (warm, editorial, organic) from Fontshare */
/* Body: Work Sans (clean, friendly) from Google Fonts */

/* --- Type Scale --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* --- Spacing (4px base) --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Radius --- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Content widths --- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* --- Fonts --- */
  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
}

/* ============================================
   SWEET TART PALETTE — Warm, Feminine, Artisan
   Derived from: soft pinks, warm creams, dusty rose, chocolate browns
   ============================================ */

:root, [data-theme="light"] {
  /* Surfaces (warm cream/ivory) */
  --color-bg:             #faf8f5;
  --color-surface:        #fdfcfa;
  --color-surface-2:      #ffffff;
  --color-surface-offset: #f5f0eb;
  --color-surface-offset-2: #efe9e3;
  --color-surface-dynamic: #e8e0d8;
  --color-divider:        #e0d6cc;
  --color-border:         #d6cab9;

  /* Text */
  --color-text:           #2c2418;
  --color-text-muted:     #7a6e5f;
  --color-text-faint:     #b5a898;
  --color-text-inverse:   #faf8f5;

  /* Primary Accent (dusty rose / mauve) */
  --color-primary:        #c4727a;
  --color-primary-hover:  #a85a62;
  --color-primary-active: #8e4850;
  --color-primary-highlight: #f5e0e2;

  /* Chocolate accent */
  --color-chocolate:      #5c3d2e;
  --color-chocolate-light: #7d5a48;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 60 / 0.12);
}

/* DARK MODE */
[data-theme="dark"] {
  --color-bg:             #1a1714;
  --color-surface:        #201c18;
  --color-surface-2:      #262119;
  --color-surface-offset: #1e1a16;
  --color-surface-offset-2: #2a2520;
  --color-surface-dynamic: #342e28;
  --color-divider:        #2e2822;
  --color-border:         #403830;
  --color-text:           #d8d0c8;
  --color-text-muted:     #8a7e72;
  --color-text-faint:     #5e554a;
  --color-text-inverse:   #1a1714;
  --color-primary:        #d9909a;
  --color-primary-hover:  #c4727a;
  --color-primary-active: #a85a62;
  --color-primary-highlight: #3a2a2c;
  --color-chocolate:      #a67d68;
  --color-chocolate-light: #c49a80;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #1a1714;
    --color-surface:        #201c18;
    --color-surface-2:      #262119;
    --color-surface-offset: #1e1a16;
    --color-surface-offset-2: #2a2520;
    --color-surface-dynamic: #342e28;
    --color-divider:        #2e2822;
    --color-border:         #403830;
    --color-text:           #d8d0c8;
    --color-text-muted:     #8a7e72;
    --color-text-faint:     #5e554a;
    --color-text-inverse:   #1a1714;
    --color-primary:        #d9909a;
    --color-primary-hover:  #c4727a;
    --color-primary-active: #a85a62;
    --color-primary-highlight: #3a2a2c;
    --color-chocolate:      #a67d68;
    --color-chocolate-light: #c49a80;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--content-default);
}

/* ============================================
   HEADER / NAV
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  gap: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo-icon {
  width: 40px;
  height: 40px;
  color: var(--color-primary);
}

.header__brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header__nav a:hover {
  color: var(--color-primary);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  padding: var(--space-2);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

/* Mobile nav */
.mobile-nav {
  display: none;
}

.mobile-menu-btn {
  display: none;
  padding: var(--space-2);
  color: var(--color-text);
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .mobile-nav {
    position: fixed;
    display: none;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
  }
  .mobile-nav.is-open {
    display: flex;
  }
  .mobile-nav a {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 400;
  }
  .mobile-nav a:hover {
    color: var(--color-primary);
  }
  .mobile-nav__close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-6);
    padding: var(--space-2);
    color: var(--color-text);
  }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    oklch(from var(--color-bg) l c h / 0.88) 0%,
    oklch(from var(--color-bg) l c h / 0.6) 50%,
    oklch(from var(--color-bg) l c h / 0.2) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding-block: var(--space-20);
}

.hero__tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  line-height: 1.05;
}

.hero__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  line-height: 1.7;
  max-width: 440px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-full);
}

.hero__cta:hover {
  background: var(--color-primary-hover);
}

.hero__cta svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .hero {
    min-height: 70vh;
  }
  .hero__overlay {
    background: linear-gradient(
      to top,
      oklch(from var(--color-bg) l c h / 0.95) 0%,
      oklch(from var(--color-bg) l c h / 0.7) 40%,
      oklch(from var(--color-bg) l c h / 0.3) 100%
    );
  }
  .hero__content {
    padding-top: var(--space-32);
    padding-bottom: var(--space-12);
  }
  .hero__title {
    font-size: var(--text-2xl);
  }
}

/* ============================================
   PRODUCTS / SPECIALTIES
   ============================================ */

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section--alt {
  background: var(--color-surface-offset);
}

.section__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: var(--space-10);
}

/* Product cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  transition: transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-5);
  color: var(--color-primary);
}

.product-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.product-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================
   ABOUT / STORY — Two-column
   ============================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

.about-grid__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-grid__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.about-grid__text .section__title {
  margin-bottom: var(--space-4);
}

.about-grid__body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.about-stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-6);
}

.about-stat__number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-primary);
}

.about-stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ============================================
   HOW TO ORDER
   ============================================ */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  counter-reset: step;
}

.step-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  counter-increment: step;
}

.step-card::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.step-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.step-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FEATURED IMAGE BREAK
   ============================================ */

.image-break {
  width: 100%;
  overflow: hidden;
}

.image-break img {
  width: 100%;
  height: clamp(300px, 40vw, 500px);
  object-fit: cover;
}

/* ============================================
   INSTAGRAM FEED CTA
   ============================================ */

.instagram-section {
  text-align: center;
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.instagram-section .section__title {
  margin-inline: auto;
  margin-bottom: var(--space-3);
}

.instagram-section .section__desc {
  margin-inline: auto;
  text-align: center;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-full);
}

.instagram-link:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.instagram-link svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-10);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
}

.footer__logo svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
}

.footer__info {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer__socials {
  display: flex;
  gap: var(--space-4);
}

.footer__socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text-muted);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-full);
  text-decoration: none;
}

.footer__socials a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.footer__socials svg {
  width: 20px;
  height: 20px;
}

.footer__bottom {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__bottom a {
  color: var(--color-text-faint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__bottom a:hover {
  color: var(--color-text-muted);
}

/* ============================================
   ANIMATIONS (scroll reveal)
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
