/* ============================================
   M&G Nutrition — Stylesheet
   Palette: Terracotta + Sand | Fresh & Airy
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-terracotta:        #C4724E;
  --color-terracotta-dark:   #A85A3A;
  --color-terracotta-light:  #D4916F;
  --color-sand:              #E8D5C0;
  --color-sand-light:        #F5EDE3;
  --color-sand-lighter:      #FBF7F3;
  --color-cream:             #FDF9F5;
  --color-warm-white:        #FFFDFB;
  --color-text:              #3D2B1F;
  --color-text-muted:        #7A6255;
  --color-text-light:        #A08B7E;
  --color-border:            #E8DDD4;
  --color-overlay:           rgba(61, 43, 31, 0.55);
  --color-white:             #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Nunito Sans', 'Segoe UI', system-ui, sans-serif;

  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;
  --space-4xl:  6rem;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 1px 3px rgba(61,43,31,0.06), 0 1px 2px rgba(61,43,31,0.04);
  --shadow-md:  0 4px 16px rgba(61,43,31,0.08), 0 2px 4px rgba(61,43,31,0.04);
  --shadow-lg:  0 12px 40px rgba(61,43,31,0.10), 0 4px 12px rgba(61,43,31,0.05);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--color-terracotta);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-terracotta-dark); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

ul { list-style: none; }

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-terracotta);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { top: var(--space-md); }

::selection {
  background: var(--color-sand);
  color: var(--color-text);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- Typography ---------- */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.section-sub {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 540px;
  line-height: 1.7;
}

.section-header { margin-bottom: var(--space-3xl); }
.section-header--centered { text-align: center; }
.section-header--centered .section-sub { margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8em 1.8em;
  border-radius: 50px;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn--terracotta {
  background: var(--color-terracotta);
  color: var(--color-white);
  border-color: var(--color-terracotta);
}
.btn--terracotta:hover {
  background: var(--color-terracotta-dark);
  border-color: var(--color-terracotta-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-terracotta);
  border-color: var(--color-terracotta);
}
.btn--outline:hover {
  background: var(--color-terracotta);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--lg { padding: 1em 2.2em; font-size: 1.05rem; }
.btn--full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 249, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-terracotta);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}
.logo:hover { color: var(--color-terracotta-dark); }
.logo--light { color: var(--color-sand-light); }
.logo--light:hover { color: var(--color-white); }

.logo-icon { flex-shrink: 0; }
.logo-text { letter-spacing: 0.02em; }

/* Nav */
.nav-toggle {
  display: none;
  padding: var(--space-sm);
  color: var(--color-terracotta);
}
.nav-toggle svg { transition: transform var(--transition); }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav-menu a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  padding: var(--space-xs) 0;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-terracotta);
  transition: width var(--transition);
}
.nav-menu a:hover::after,
.nav-menu a:focus::after { width: 100%; }
.nav-menu a:hover { color: var(--color-terracotta); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(253, 249, 245, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
  }
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-menu a { font-size: 1.1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-text);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(61, 43, 31, 0.72) 0%,
    rgba(61, 43, 31, 0.50) 50%,
    rgba(196, 114, 78, 0.40) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sand);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-white);
  margin-bottom: var(--space-xl);
}

.hero-accent {
  color: var(--color-sand);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 253, 251, 0.85);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255,253,251,0.6);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Trust Bar ---------- */
.trust-bar {
  background: var(--color-sand-light);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
}

.trust-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.trust-item svg {
  color: var(--color-terracotta);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .trust-bar-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .trust-bar-inner { grid-template-columns: 1fr; }
}

/* ---------- Products ---------- */
.products {
  padding: var(--space-4xl) 0;
  background: var(--color-cream);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.product-card {
  background: var(--color-warm-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--color-border);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card-img {
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover .product-card-img img { transform: scale(1.05); }

.product-card-body {
  padding: var(--space-xl);
}

.product-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.product-card-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */
.about {
  padding: var(--space-4xl) 0;
  background: var(--color-sand-lighter);
}

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

.about-images {
  position: relative;
}

.about-img-main {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-img-secondary {
  position: absolute;
  bottom: -40px;
  right: -30px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--color-sand-lighter);
}
.about-img-secondary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-content { padding-top: var(--space-2xl); }

.about-text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.85;
  margin-bottom: var(--space-lg);
}

.about-stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.stat { text-align: center; }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-terracotta);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-img-secondary { right: -10px; bottom: -20px; }
}

/* ---------- Values ---------- */
.values {
  padding: var(--space-4xl) 0;
  background: var(--color-cream);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.value-card {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition);
}
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-terracotta-light);
}

.value-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  background: var(--color-sand-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-terracotta);
  transition: all var(--transition);
}
.value-card:hover .value-icon {
  background: var(--color-terracotta);
  color: var(--color-white);
}

.value-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.value-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

@media (max-width: 1024px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .values-grid { grid-template-columns: 1fr; }
}

/* ---------- Featured Banner ---------- */
.featured-banner {
  position: relative;
  padding: var(--space-4xl) 0;
  overflow: hidden;
}

.featured-banner-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.featured-banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.featured-banner-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.featured-banner-sub {
  font-size: 1.1rem;
  color: rgba(255,253,251,0.85);
  line-height: 1.8;
  margin-bottom: var(--space-2xl);
}

/* ---------- Visit ---------- */
.visit {
  padding: var(--space-4xl) 0;
  background: var(--color-sand-lighter);
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.visit-content { padding-top: var(--space-lg); }

.visit-info { margin-bottom: var(--space-2xl); }

.visit-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.visit-item svg {
  color: var(--color-terracotta);
  flex-shrink: 0;
  margin-top: 4px;
}

.visit-item a {
  color: var(--color-terracotta);
  font-weight: 600;
}
.visit-item a:hover { color: var(--color-terracotta-dark); }

.visit-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.visit-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  min-height: 350px;
}

@media (max-width: 900px) {
  .visit-grid { grid-template-columns: 1fr; }
  .visit-map { aspect-ratio: 16 / 9; }
}

/* ---------- Contact ---------- */
.contact {
  padding: var(--space-4xl) 0;
  background: var(--color-cream);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xl);
}

.contact-form {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8em 1em;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-sand-lighter);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-terracotta);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(196, 114, 78, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-light);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-success {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: #E8F5E9;
  color: #2E7D32;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .contact-wrapper { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-text);
  color: var(--color-sand);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(232, 213, 192, 0.15);
}

.footer-tagline {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: rgba(232, 213, 192, 0.6);
  line-height: 1.7;
  max-width: 280px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-sand-light);
  margin-bottom: var(--space-lg);
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--space-sm); }

.footer-col li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: rgba(232, 213, 192, 0.65);
  line-height: 1.6;
}

.footer-col a {
  color: rgba(232, 213, 192, 0.65);
}
.footer-col a:hover { color: var(--color-sand-light); }

.footer-col svg { flex-shrink: 0; opacity: 0.7; }

.hours-highlight {
  color: var(--color-terracotta-light) !important;
  font-weight: 600;
}

.footer-bottom {
  padding-top: var(--space-xl);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: rgba(232, 213, 192, 0.4);
}

.footer-bottom a {
  color: rgba(232, 213, 192, 0.4);
}
.footer-bottom a:hover { color: var(--color-sand-light); }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}

/* ---------- Reveal animations (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
  .reveal:nth-child(5) { transition-delay: 0.35s; }
  .reveal:nth-child(6) { transition-delay: 0.4s; }
}

/* Ensure content is visible when JS is disabled */
.no-js .reveal,
.js-enabled .reveal {
  opacity: 1;
  transform: none;
}
