/* ============================================================
   Declaratie-Nutritionala.ro — Design System
   Editorial food-tech: warm ivory, deep ink, tomato accent
   ============================================================ */

:root {
  /* palette */
  --ink: #1A1814;
  --ink-2: #2C2822;
  --ink-3: #5A5248;
  --ink-4: #8A8275;
  --paper: #FAF7F2;
  --paper-2: #F2ECE1;
  --paper-3: #E8DFD0;
  --line: #E0D5C0;
  --tomato: #D94A2B;       /* primary accent — from ingredient banner */
  --tomato-dark: #B73A1F;
  --tomato-soft: #FBE4DC;
  --olive: #6B7A3A;        /* secondary accent */
  --olive-soft: #E7EAD4;
  --amber: #E8A93C;
  --green-ok: #2F7D4F;

  /* radius */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;

  /* shadow */
  --shadow-sm: 0 2px 8px rgba(26,24,20,0.04), 0 1px 2px rgba(26,24,20,0.06);
  --shadow-md: 0 8px 24px rgba(26,24,20,0.06), 0 2px 6px rgba(26,24,20,0.04);
  --shadow-lg: 0 24px 56px -12px rgba(26,24,20,0.18), 0 8px 20px rgba(26,24,20,0.06);
  --shadow-tomato: 0 12px 32px -8px rgba(217,74,43,0.45);

  /* type */
  --f-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --f-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ========== LAYOUT ========== */
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 960px; margin: 0 auto; padding: 0 24px; }

section { padding: 96px 0; position: relative; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* ========== TYPE ========== */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tomato);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--tomato);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 7vw, 92px); font-weight: 300; }
h2 { font-size: clamp(32px, 4.5vw, 56px); font-weight: 400; }
h3 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; }
h4 { font-size: 18px; font-weight: 600; font-family: var(--f-body); letter-spacing: -0.01em; }

h1 em, h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--tomato);
}

p { margin: 0; text-wrap: pretty; }
p.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(224, 213, 192, 0.6);
  transform: translateZ(0);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 18px;
  position: relative;
}
.brand .mark::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tomato);
}
.brand img.mark-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  object-fit: contain;
  display: block;
}
.brand img.mark-img::after { display: none; }
.site-footer .brand img.mark-img { background: transparent; }
.brand small {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  text-transform: uppercase;
  display: block;
  line-height: 1;
  margin-top: 2px;
  font-weight: 400;
}
.brand .brand-txt { display: flex; flex-direction: column; }

nav.primary {
  display: flex; gap: 4px; align-items: center;
}
nav.primary a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: all 180ms ease;
  position: relative;
}
nav.primary a:hover { color: var(--ink); }
nav.primary a.active {
  color: var(--ink);
}
nav.primary a.active::before {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--tomato);
  border-radius: 2px;
}

.header-cta { display: flex; gap: 8px; align-items: center; }
.desktop-only-cta { display: inline-flex; }

.mobile-drawer { display: none; }

.menu-btn { display: none; }
@media (max-width: 900px) {
  .site-header {
    --mobile-header-h: 88px;
  }
  .site-header .bar {
    height: var(--mobile-header-h);
    gap: 10px;
  }
  .site-header .brand {
    font-size: 16px;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }
  .site-header .brand .brand-txt > span {
    line-height: 1.05;
  }
  .site-header .brand small {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  nav.primary, .header-cta .btn-ghost { display: none; }
  .header-cta .btn-dark.btn-sm { display: none; }
  .menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--paper-2); }
  .mobile-drawer {
    display: block;
    position: fixed;
    top: calc(var(--mobile-header-h) + 1px);
    left: 10px;
    right: 10px;
    max-height: min(72dvh, 560px);
    background: var(--paper);
    padding: 8px 20px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 260ms ease, opacity 260ms ease;
    z-index: 99;
    border: 1px solid rgba(224, 213, 192, 0.82);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 20px 44px rgba(26,24,20,0.14);
  }
  .mobile-drawer.open {
    transform: translateY(0) !important;
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-drawer a {
    display: block;
    padding: 12px 0;
    border-bottom: 0 !important;
    font-size: 18px;
    font-family: var(--f-display);
  }
  .mobile-drawer a:first-child {
    padding-top: 6px;
  }
  .mobile-drawer .btn { margin-top: 16px; width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .site-header .brand {
    font-size: 15px;
  }
  .site-header .brand small {
    font-size: 9px;
  }
  .desktop-only-cta { display: none; }
}

/* ========== STICKY CTA BAR (mobile) ========== */
.sticky-cta-bar {
  display: none;
}
@media (max-width: 900px) {
  .sticky-cta-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 88px;
    background: rgba(250, 247, 242, 0.45);
    backdrop-filter: saturate(200%) blur(40px) brightness(1.08);
    -webkit-backdrop-filter: saturate(200%) blur(40px) brightness(1.08);
    border-top: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 -8px 32px rgba(26,24,20,0.08);
    z-index: 110;
    padding: 0 16px;
  }
  .sticky-cta-bar .sticky-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 36px;
    background: var(--ink);
    color: var(--paper);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: background 180ms ease;
  }
  .sticky-cta-bar .sticky-btn:hover {
    background: var(--ink-2);
  }
  .sticky-cta-bar .to-top-btn {
    position: absolute;
    right: 10px;
    bottom: auto;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: 0;
    transform: translateY(-50%);
    display: none;
    opacity: 0;
    pointer-events: none;
  }
  .sticky-cta-bar .to-top-btn.show {
    display: grid;
    opacity: 1;
    transform: translateY(-50%);
    pointer-events: auto;
  }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1;
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--tomato);
  color: #fff;
  box-shadow: var(--shadow-tomato);
}
.btn-primary:hover {
  background: var(--tomato-dark);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 36px -8px rgba(217,74,43,0.55);
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink-4); }

.btn-sm { padding: 10px 16px; font-size: 13.5px; }
.btn-lg { padding: 18px 28px; font-size: 16px; }

.btn-pulse { position: relative; }
.btn-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--tomato);
  animation: pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes pulse {
  0%   { opacity: 0.6; transform: scale(1); }
  70%  { opacity: 0; transform: scale(1.18); }
  100% { opacity: 0; transform: scale(1.18); }
}

/* ========== BACK TO TOP (mobile only) ========== */
.to-top-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: none;
  place-items: center;
  z-index: 120;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, background 180ms ease;
}
.to-top-btn:hover { background: var(--ink-2); }
.to-top-btn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (max-width: 900px) {
  .to-top-btn { display: grid; }
}

/* ========== CARDS ========== */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
  transition: transform 280ms cubic-bezier(0.4,0,0.2,1), box-shadow 280ms, border-color 280ms;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--paper-3);
}

.card-paper { background: var(--paper); border-color: var(--line); }

/* ========== FADE-IN ON SCROLL ========== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 720ms cubic-bezier(0.22,1,0.36,1), transform 720ms cubic-bezier(0.22,1,0.36,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-140px);
  transition: opacity 4000ms cubic-bezier(0.22,1,0.36,1), transform 4000ms cubic-bezier(0.22,1,0.36,1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(140px);
  transition: opacity 4000ms cubic-bezier(0.22,1,0.36,1), transform 4000ms cubic-bezier(0.22,1,0.36,1);
}
.reveal-left.in, .reveal-right.in {
  opacity: 1;
  transform: none;
}
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }

/* ========== FOOTER ========== */
.site-footer {
  background: var(--ink);
  color: var(--paper-2);
  padding: 80px 0 32px;
  margin-top: 80px;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.site-footer .foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
  align-items: start;
}
.site-footer .foot-grid > *:first-child {
  margin-top: -3px;
}
@media (max-width: 760px) {
  .site-footer .foot-grid { grid-template-columns: 1fr; gap: 26px; }
}
.site-footer a { color: var(--paper-3); font-size: 14.5px; display: block; padding: 4px 0; transition: color 180ms; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.site-footer .brand small { color: var(--ink-4); }
.site-footer .brand .mark { background: var(--paper); color: var(--ink); }
.footer-trust {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-trust a,
.footer-trust span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 6px 10px;
  min-height: 44px;
}
.footer-trust img {
  height: 30px;
  width: auto;
  display: block;
}
.foot-bottom {
  border-top: 1px solid #2C2822;
  margin-top: 64px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-4);
}
@media (max-width: 760px) {
  .site-footer {
    padding-top: 64px;
    padding-bottom: 92px;
  }
  .footer-trust {
    margin-top: 20px;
    gap: 10px;
  }
  .footer-trust a,
  .footer-trust span {
    padding: 6px 8px;
  }
  .footer-trust img {
    height: 26px;
  }
  .foot-bottom {
    margin-top: 32px;
    padding-top: 16px;
    gap: 10px;
  }
}

/* ========== PAGE HERO (inner pages) ========== */
.page-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.page-hero .crumbs {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 20px;
}
.page-hero .crumbs a { color: var(--ink-3); }
.page-hero .crumbs a:hover { color: var(--tomato); }

.inner-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 900px) {
  .inner-hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ========== FAQ ========== */
.faq { background: var(--paper-2); }
.faq-list { max-width: 820px; margin: 48px auto 0; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 4px;
  text-align: left;
  font-family: var(--f-display);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  gap: 16px;
}
.faq-q .plus {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 18px;
  color: var(--ink-3);
  transition: transform 280ms, background 200ms;
}
.faq-item.open .faq-q .plus {
  transform: rotate(45deg);
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 360ms cubic-bezier(0.4,0,0.2,1);
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.65;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 4px 24px; }

/* ========== UTILS ========== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 720px) and (max-width: 1100px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}

.text-mono { font-family: var(--f-mono); }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }

.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag-tomato { background: var(--tomato-soft); color: var(--tomato-dark); }
.tag-olive { background: var(--olive-soft); color: var(--olive); }
.tag-ok { background: #E0F0E5; color: var(--green-ok); }

.divider-label {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-4);
  margin-bottom: 40px;
}
.divider-label::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* decorative noise */
.noise { position: relative; }
.noise::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.4;
  mix-blend-mode: multiply;
  pointer-events: none;
  border-radius: inherit;
}
