/* ==========================================================================
   Fresco Foods — stylesheet
   Design tokens live as CSS custom properties; Tailwind handles utility
   layout, this file carries brand-specific shapes, color and motion.
   ========================================================================== */

:root {
  --cream: #fffaf0;
  --paper: #fff4e0;
  --ink: #17261d;
  --ink-soft: #435046;
  --leaf: #1f7a4d;
  --leaf-dark: #14512f;
  --citrus: #f2801e;
  --citrus-dark: #cf6410;
  --pomegranate: #d62839;
  --sunshine: #ffc93c;
  --sky: #cdeaf4;
  --sky-deep: #6fb9d6;

  --font-display: "Baloo 2", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  --radius-label: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--leaf-dark);
  letter-spacing: 0.01em;
  line-height: 1.05;
}

::selection {
  background: var(--sunshine);
  color: var(--ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--citrus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */

.site-nav {
  background: rgba(255, 250, 240, 0.88);
  backdrop-filter: blur(10px);
  transition: box-shadow 220ms ease, padding 220ms ease;
}

.site-nav.is-scrolled {
  box-shadow: 0 8px 24px -18px rgba(20, 40, 25, 0.45);
}

.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 160ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--citrus);
  transition: width 220ms ease;
}

.nav-link:hover {
  color: var(--leaf-dark);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link[aria-current="page"] {
  color: var(--leaf-dark);
}

.nav-link[aria-current="page"]::after {
  width: 100%;
  background: var(--leaf);
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--citrus);
  color: #fff8ee;
  box-shadow: 0 10px 24px -10px rgba(242, 128, 30, 0.65);
}

.btn-primary:hover {
  background: var(--citrus-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--leaf-dark);
  border: 2px solid var(--leaf);
}

.btn-ghost:hover {
  background: var(--leaf);
  color: #fff;
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--leaf-dark);
  color: #fff8ee;
}

.btn-dark:hover {
  background: var(--leaf);
  transform: translateY(-2px);
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fffaf0 0%, #fef1d8 100%);
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}

.hero-frame {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 40px 60px -30px rgba(20, 40, 25, 0.5);
  transform: rotate(1.4deg);
}

.hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.droplet {
  position: absolute;
  border-radius: 50% 50% 50% 4%;
  opacity: 0;
  animation: droplet-fall 3.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .droplet { animation: none; opacity: 0.9; }
}

@keyframes droplet-fall {
  0% { transform: translateY(-6px) rotate(45deg) scale(0.8); opacity: 0; }
  15% { opacity: 0.9; }
  70% { opacity: 0.9; }
  100% { transform: translateY(14px) rotate(45deg) scale(1); opacity: 0; }
}

.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -2px;
}

/* -------------------------------------------------------------------------
   Section eyebrow / heading rhythm
   ------------------------------------------------------------------------- */

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--pomegranate);
}

.section-kicker svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* -------------------------------------------------------------------------
   Reveal-on-scroll
   ------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 640ms ease, transform 640ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   Category filter chips
   ------------------------------------------------------------------------- */

.filter-chip {
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--leaf);
  color: var(--leaf-dark);
  background: #fff;
  transition: all 160ms ease;
}

.filter-chip:hover {
  background: #eefaf2;
}

.filter-chip[aria-pressed="true"] {
  background: var(--leaf);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(31, 122, 77, 0.7);
}

/* -------------------------------------------------------------------------
   Product label cards
   ------------------------------------------------------------------------- */

.label-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 30px -22px rgba(20, 40, 25, 0.55);
  transition: transform 220ms ease, box-shadow 220ms ease;
  cursor: pointer;
}

.label-card:hover,
.label-card:focus-visible {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 26px 36px -20px rgba(20, 40, 25, 0.6);
}

.label-cap {
  height: 108px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 92% 100%, 76% 82%, 60% 100%, 44% 82%, 28% 100%, 12% 82%, 0 100%);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.9rem 1rem 0;
}

.label-cap .tag-pill {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.label-cap svg {
  width: 44px;
  height: 44px;
}

.size-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

/* category color themes */
.theme-water .label-cap { background: linear-gradient(135deg, var(--sky), var(--sky-deep)); }
.theme-cola .label-cap { background: linear-gradient(135deg, #4a1518, #2c0c0e); }
.theme-cola .tag-pill { background: rgba(255,255,255,0.9); }
.theme-anar .label-cap { background: linear-gradient(135deg, #ef5a63, var(--pomegranate)); }
.theme-lemony .label-cap { background: linear-gradient(135deg, #6fbf73, var(--leaf)); }
.theme-thunder .label-cap { background: linear-gradient(135deg, #d7e85a, #9ec22c); }
.theme-mango .label-cap { background: linear-gradient(135deg, var(--sunshine), var(--citrus)); }
.theme-funky .label-cap { background: linear-gradient(135deg, #ffb454, var(--citrus-dark)); }
.theme-plus .label-cap { background: linear-gradient(135deg, #ff8a80, var(--pomegranate)); }
.theme-apple .label-cap { background: linear-gradient(135deg, #f2f7d0, #b7d651); }

/* -------------------------------------------------------------------------
   Modal
   ------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 22, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: #fff;
  border-radius: 24px;
  max-width: 34rem;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 220ms ease;
}

.modal-backdrop.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

/* -------------------------------------------------------------------------
   Quality badges
   ------------------------------------------------------------------------- */

.badge-card {
  border: 2px dashed rgba(31, 122, 77, 0.35);
  border-radius: 20px;
  background: #fff;
}

/* -------------------------------------------------------------------------
   Form
   ------------------------------------------------------------------------- */

.field label {
  font-weight: 700;
  color: var(--leaf-dark);
  font-size: 0.9rem;
}

.field input,
.field textarea,
.field select {
  border: 2px solid #e4d9bd;
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  background: #fffdf7;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 4px rgba(31, 122, 77, 0.15);
  outline: none;
}

.field .error-msg {
  color: var(--pomegranate);
  font-size: 0.8rem;
  min-height: 1.1rem;
  display: block;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--pomegranate);
}

.form-success {
  display: none;
}

.form-success.is-visible {
  display: flex;
}

/* -------------------------------------------------------------------------
   Back to top
   ------------------------------------------------------------------------- */

#backToTop {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
}

#backToTop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
