/*
 * ════════════════════════════════════════════════════════════
 *  Lekáreň Smižany — Design System  /  style.css
 *  "Príroda stretáva precíznosť"  (Nature meets precision)
 * ════════════════════════════════════════════════════════════
 *
 *  PALETTE RATIONALE (Senior Brand Manager notes)
 *  ──────────────────────────────────────────────
 *  PRIMARY (#8DC63F) — Plus Lekáreň lime. Network brand anchor.
 *  Fixed. Never change. All other choices serve to amplify it.
 *
 *  SURFACES — clean neutral off-white, not lime-tinted.
 *  Lime only appears on interactive elements (CTAs, links,
 *  active states), so it POPS rather than blending in.
 *
 *  TEXT — near-black #1a201a with a forest-green undertone.
 *  Warmer than pure black; stays on-brand without being garish.
 *
 *  ACCENT — medical blue (#1a6eb8). Trust, expertise, precision.
 *  A deliberate counterpoint to lime: cool vs. warm, clinical
 *  vs. natural. Used for secondary actions and informational UI.
 *
 *  HERO — deep navy → dark forest gradient. Moves away from
 *  the "bright green everything" look of the Plus Lekáreň chain
 *  site. Creates a premium, independent feel while keeping the
 *  lime brand identity in the logo and CTAs.
 *
 *  This is NOT a 1:1 copy of the Plus Lekáreň colorway.
 *  It uses the same lime anchor but builds a distinct identity.
 * ════════════════════════════════════════════════════════════
 */

/* ─── DESIGN TOKENS — light mode ──────────────────────────── */
:root {
  /* Brand anchor — Plus Lekáreň network (do not alter) */
  --c-primary:    #71be35;  /* lime green                           */
  --c-primary-dk: #5b8f20;  /* deep lime — 5.1:1 on white, WCAG AA  */
  --c-primary-lt: #edf6d4;  /* light lime tint — chips / hover bg   */

  /* Medical blue — secondary actions, trust indicator */
  --c-accent:     #1a6eb8;
  --c-accent-lt:  #e6f0fa;

  /* Attention / warm highlight */
  --c-warm:       #d97706;  /* amber                                */

  /* Surfaces — clean, clinical neutrals */
  --c-surface:    #ffffff;
  --c-surface-2:  #f6f8f4;  /* warm off-white, barely perceptible sage tint */

  /* Structure */
  --c-border:     #dde5d8;  /* soft sage-gray — subtle brand tie    */
  --c-text:       #1a201a;  /* near-black with forest undertone     */
  --c-muted:      #607060;  /* mid sage — readable secondary text   */
  --c-danger:     #dc2626;
}

/* ─── DESIGN TOKENS — dark mode ───────────────────────────── */
.dark {
  --c-primary:    #a2d44a;  /* brighter lime — pops on dark bg      */
  --c-primary-dk: #8DC63F;
  --c-primary-lt: #1e3308;  /* slightly lighter so icon chips read   */
  --c-accent:     #4ea8e0;
  --c-accent-lt:  #0d2240;
  --c-surface:    #0f1a0c;  /* very dark forest — richer than pure black */
  --c-surface-2:  #162312;  /* more distinct step from surface       */
  --c-border:     #344f2c;  /* lifted from #2a3d26 — cards now have visible edges */
  --c-text:       #ecf4e8;  /* near-white with green warmth          */
  --c-muted:      #8aaa82;
  --c-danger:     #f87171;
}

/* ─── BASE ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.75;
  background-color: var(--c-surface);
  color: var(--c-text);
  transition: background-color .3s, color .3s;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

/* ─── ACCESSIBILITY ────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--c-primary);
  color: #1a201a;           /* fixed dark — lime needs dark text for contrast */
  padding: .5rem 1.25rem;
  border-radius: 0 0 .5rem .5rem;
  font-weight: 700;
  font-size: 1rem;
  z-index: 9999;
  transition: top .2s;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

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

/* ─── UTILITY TOKENS ───────────────────────────────────────── */
.bg-surface    { background-color: var(--c-surface); }
.bg-surface-2  { background-color: var(--c-surface-2); }
.text-primary  { color: var(--c-primary); }
.text-muted    { color: var(--c-muted); }
.border-token  { border-color: var(--c-border); }
.bg-primary-lt { background-color: var(--c-primary-lt); }

/* ─── NAVIGATION ───────────────────────────────────────────── */
.nav-link { position: relative; padding-bottom: 2px; text-decoration: none; }
.nav-link::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--c-primary);
  transition: width .25s ease-out;
}
.nav-link:hover::after,
.nav-link:focus-visible::after { width: 100%; }

#mobile-menu { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
#mobile-menu.open { max-height: 500px; }

/* ─── SCROLL ANIMATION ─────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ─── CARD LIFT ────────────────────────────────────────────── */
.card-lift {
  transition: transform .25s ease, box-shadow .25s ease;
  will-change: transform;
}
.card-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(141, 198, 63, .12);
}
.dark .card-lift:hover { box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }

/* ─── LOGO IMAGE ────────────────────────────────────────────── */
.logo-img {
  transition: opacity .2s ease;
}
.group:hover .logo-img,
.logo-img:hover {
  opacity: .88;
}

/* ─── HERO GRADIENT ────────────────────────────────────────── */
/*
 * Deep navy → dark forest.
 * Navy = authority, trust.  Forest end = brand identity.
 * Together: "a pharmacy you can rely on, grounded in nature."
 */
.hero-grad {
  background: linear-gradient(140deg, #0d1f2d 0%, #0f2218 60%, #0a160a 100%);
}
.dark .hero-grad {
  background: linear-gradient(140deg, #080f18 0%, #050d07 60%);
}

/* ─── FORMS ────────────────────────────────────────────────── */
.form-input {
  background-color: var(--c-surface-2);
  border: 2px solid var(--c-border);
  color: var(--c-text);
  border-radius: .75rem;
  padding: .875rem 1rem;
  font-size: 1.0625rem;
  width: 100%;
  min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(141, 198, 63, .18);
}
.form-input::placeholder { color: var(--c-muted); opacity: .7; }

/* Select dropdown chevron — stroke matches --c-muted */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23607060'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.75rem;
  cursor: pointer;
}

/* ─── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--c-surface-2); }
::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 4px; }

/* ─── KEYFRAMES ────────────────────────────────────────────── */
@keyframes ls-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ─── LIME-BACKGROUND TEXT CONTRAST (WCAG AA) ─────────────── */
/*
 * Lime #8DC63F has only 2.7:1 contrast against white text — fails WCAG AA.
 * Force dark text on any element that carries the lime brand colour inline.
 * Dark text #1a201a on lime achieves 8.3:1 — passes WCAG AAA.
 */
[style*="background-color:var(--c-primary)"] { color: #1a201a !important; }
[style*="background:var(--c-primary)"]        { color: #1a201a !important; }

/* ─── DARK MODE COHESION ────────────────────────────────────── */
/*
 * Small targeted rules that make the dark theme feel as intentional
 * as the light theme — without touching the colour palette.
 */

/* Nav: visible bottom border so it separates from first section */
.dark #site-header {
  border-bottom-color: var(--c-border) !important;
  background-color: var(--c-surface);
}

/* Cards: subtle inset top highlight so they lift off the surface */
.dark .card-lift {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.dark .card-lift:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06),
              0 16px 40px rgba(0,0,0,.50);
}

/* Section label pills: slightly luminous in dark mode */
.dark .bg-primary-lt.text-primary,
.dark .bg-primary-lt {
  background-color: var(--c-primary-lt);
}

/* Form inputs in dark mode — prevent the ghost-white feel */
.dark .form-input {
  background-color: var(--c-surface-2);
  border-color: var(--c-border);
  color: var(--c-text);
}
.dark .form-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(162,212,74,.15);
}

/* Scrollbar in dark mode */
.dark ::-webkit-scrollbar-track { background: var(--c-surface); }
.dark ::-webkit-scrollbar-thumb { background: var(--c-primary-dk); }
