/* ============================================================
   Ghlefly — "Aero" Design System  (light · airy · modern)
   Legacy CSS var names are REMAPPED to the new palette so the
   inline styles in admin.html / on-s-en-charge.html inherit the
   new brand automatically.
   ============================================================ */

:root {
  /* --- Legacy names remapped to the Ghlefly palette --- */
  --cream: #E4EBE8;        /* page background (calm muted sage — less glare) */
  --white: #FCFDFC;        /* surfaces (soft off-white) */
  --paper: #D8E2DD;        /* subtle surface / hover / skeleton */
  --dark: #0E1A18;         /* deep teal-ink (nav, footer, hero) */
  --olive: #4C635E;        /* muted secondary text */
  --light-olive: #7E9A93;  /* lighter muted */
  --sand: #B9D7CF;         /* soft tint (patterns) */
  --terracotta: #0E9E92;   /* PRIMARY (teal) — buttons, badges, accents */

  /* --- New semantic tokens --- */
  --primary: #0E9E92;
  --primary-dark: #0B847A;
  --primary-soft: rgba(14, 158, 146, 0.10);
  --accent: #FF6B5C;       /* coral spark */
  --accent-soft: rgba(255, 107, 92, 0.12);
  --ink: #12211E;
  --muted: #4C635E;
  --muted-on-dark: rgba(229, 240, 237, 0.66);
  --border: rgba(18, 33, 30, 0.12);
  --border-strong: rgba(18, 33, 30, 0.20);
  --border-on-dark: rgba(229, 240, 237, 0.14);

  --warn-bg: #FBF1CE; --warn-fg: #7A4D08;
  --info-bg: #DCE7F8; --info-fg: #1E3F86;
  --ok-bg:   #D6F0E4; --ok-fg:   #0B6B45;

  /* --- Typography --- */
  --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* --- Radii & elevation --- */
  --r-xs: 6px; --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 24, 0.04), 0 2px 10px rgba(14, 26, 24, 0.05);
  --shadow: 0 6px 16px rgba(14, 26, 24, 0.06), 0 16px 40px rgba(14, 26, 24, 0.08);
  --shadow-lg: 0 10px 28px rgba(14, 26, 24, 0.10), 0 30px 70px rgba(14, 26, 24, 0.16);
  --shadow-dark: 0 18px 50px rgba(0, 0, 0, 0.4);

  /* --- Motion --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;

  --maxw: 1200px;
  --nav-h: 66px;
}

*, *::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);
  background-color: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(65% 55% at 82% -8%, rgba(14, 158, 146, 0.10), transparent 70%),
    radial-gradient(55% 50% at -5% 10%, rgba(255, 107, 92, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(14,26,24,0.015), transparent 220px);
  background-attachment: fixed;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--primary); color: #fff; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0 0 var(--r-sm) 0;
  z-index: 2000; font-size: 0.85rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ================================ Navigation ================================ */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background-color: rgba(228, 235, 232, 0.75);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); }

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.logo::before {
  content: "";
  width: 22px; height: 22px;
  border-radius: 7px 7px 7px 2px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-sm);
  display: inline-block;
}

.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
}
.nav-link a {
  position: relative; color: var(--muted); padding: 0.35rem 0;
  transition: color var(--dur) var(--ease);
}
.nav-link a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px;
  height: 2px; background: var(--primary); border-radius: 2px;
  transition: right var(--dur) var(--ease);
}
.nav-link a:hover { color: var(--ink); }
.nav-link a:hover::after, .nav-link.active a::after { right: 0; }
.nav-link.active a { color: var(--ink); }

.nav-toggle {
  display: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: none; border-radius: var(--r-sm);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; margin: 0 auto;
  background-color: var(--ink); border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================ Buttons & utilities ================================ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: var(--r-pill); border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.07em; line-height: 1; min-height: 46px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background-color: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(14,158,146,0.28); }
.btn-primary:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(14,158,146,0.34); }
.btn-primary.alt { background-color: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary.alt:hover { background-color: #000; }
.btn-outline { background-color: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { padding: 0.55rem 1.1rem; min-height: 38px; font-size: 0.72rem; }

/* on-dark variants (hero) */
.hero .btn-outline { border-color: var(--border-on-dark); color: var(--cream); }
.hero .btn-outline:hover { border-color: #fff; color: #fff; }

.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.32rem 0.75rem; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
}
.badge-orange { background-color: var(--primary-soft); color: var(--primary-dark); }
.badge-soft { background-color: var(--white); color: var(--primary-dark); border: 1px solid var(--border-strong); }
.tag-muted { font-size: 0.8rem; color: var(--muted); }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary); display: inline-flex; align-items: center; gap: 0.55rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--accent); display: inline-block; }

/* ================================ Cards & layout ================================ */
.card {
  position: relative; background-color: var(--white); border-radius: var(--r);
  border: 1px solid var(--border); padding: 1.7rem; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(14,158,146,0.3); }

.page-section { padding: 4.5rem 0; }
.page-section + .page-section { padding-top: 0; }
.section-head { max-width: 48rem; margin-bottom: 2.6rem; }

.page-title {
  font-family: var(--font-display); font-size: clamp(2rem, 1.3rem + 2.2vw, 2.9rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin: 0.7rem 0 0.5rem; color: var(--ink);
}
.page-subtitle { font-size: 1.04rem; color: var(--muted); max-width: 44rem; }

/* ================================ Hero ================================ */
.hero {
  position: relative; overflow: hidden; color: var(--cream);
  background:
    radial-gradient(120% 130% at 88% -20%, rgba(14, 158, 146, 0.45), transparent 55%),
    radial-gradient(90% 90% at -5% 110%, rgba(255, 107, 92, 0.28), transparent 60%),
    var(--dark);
  padding: 5.5rem 0 5rem;
}
.hero-inner { position: relative; z-index: 1; }
.hero-pattern {
  position: absolute; inset: -2%; pointer-events: none; opacity: 0.06;
  background-image: radial-gradient(var(--sand) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(75% 75% at 60% 40%, #000, transparent 92%);
  mask-image: radial-gradient(75% 75% at 60% 40%, #000, transparent 92%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.hero .badge-soft { background: rgba(229,240,237,0.08); color: var(--cream); border-color: var(--border-on-dark); }
.hero-heading {
  font-family: var(--font-display); font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4rem);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; margin: 1.1rem 0 1.2rem; color: #fff;
}
.hero-heading .accent {
  background: linear-gradient(120deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subheading { font-size: 1.1rem; max-width: 34rem; color: var(--muted-on-dark); margin-bottom: 1.9rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-meta { margin-top: 1.4rem; font-size: 0.86rem; color: rgba(229,240,237,0.45); max-width: 30rem; }

.hero-illustration { position: relative; }

/* Interactive horizontal slideshow */
.hero-carousel {
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
  /* Smooth gradient fade at both edges — boxes appear to emerge from a tunnel */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 83%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 83%, transparent 100%);
}
.hero-track {
  display: flex;
  gap: 1rem;
  will-change: transform;
  transition: transform 0.5s var(--ease);
}
.hero-box {
  flex: 0 0 60%;
  background-color: rgba(255,255,255,0.96); border-radius: var(--r); border: 1px solid rgba(255,255,255,0.55);
  padding: 1.2rem; min-height: 138px; box-shadow: var(--shadow-dark);
  display: flex; flex-direction: column; justify-content: space-between;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0.78;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
              border-color 0.5s var(--ease), background-color 0.5s var(--ease), opacity 0.5s var(--ease);
}
/* The spotlighted box pops out (scale 1.2x, elevated) */
.hero-box.is-active {
  transform: scale(1.12);
  opacity: 1;
  z-index: 3;
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55);
}
.hero-box.is-active .hero-box-title { color: var(--primary-dark); }

/* Static fallback (reduced motion): clean 2-up wrap, no autoplay */
.hero-carousel.static { -webkit-mask-image: none; mask-image: none; padding: 0; }
.hero-carousel.static .hero-track { flex-wrap: wrap; transform: none !important; gap: 0.9rem; }
.hero-carousel.static .hero-box { flex: 0 0 calc(50% - 0.45rem); opacity: 1; transform: none; }

.hero-box-title { transition: color 0.5s var(--ease); }
.hero-box-icon { color: var(--primary); transition: transform 0.5s var(--ease); }
.hero-box-icon svg { width: 26px; height: 26px; }
.hero-box-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-top: 0.5rem; color: var(--ink); letter-spacing: -0.01em; }
.hero-box-text { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; line-height: 1.45; }

/* ================================ Steps ================================ */
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.step-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.step-number { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; color: var(--primary); }
.step-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--primary); }
.step-icon svg { width: 22px; height: 22px; }
.step-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.step-description { font-size: 0.92rem; color: var(--muted); }

/* ================================ Categories ================================ */
.categories-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.category-card { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.category-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); }
.category-icon svg { width: 24px; height: 24px; }
.category-label { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--ink); letter-spacing: -0.01em; }

/* ================================ Suppliers directory ================================ */
.filters-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin: 1.6rem 0 1.6rem; }
.filters-bar > div { display: flex; flex-direction: column; gap: 0.3rem; }
.filters-bar .tag-muted { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; }
.filters-bar select, .filters-bar input[type='search'] {
  padding: 0.75rem 0.95rem; border-radius: var(--r-pill); border: 1.5px solid var(--border-strong);
  background-color: var(--white); font-family: var(--font-body); font-size: 0.92rem; color: var(--ink); min-width: 190px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.filters-bar select:focus, .filters-bar input[type='search']:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.filters-bar input[type='search'] { flex: 1; min-width: 230px; }

.suppliers-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }

.supplier-card { cursor: pointer; }
.supplier-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; gap: 0.5rem; }
.supplier-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--primary); }
.supplier-icon svg { width: 22px; height: 22px; }
.supplier-name { font-family: var(--font-display); font-weight: 700; font-size: 1.14rem; color: var(--ink); margin-bottom: 0.2rem; letter-spacing: -0.01em; }
.supplier-meta { font-size: 0.88rem; margin: 0.35rem 0; color: var(--muted); display: flex; align-items: center; gap: 0.45rem; }
.supplier-contact { font-size: 0.86rem; margin: 0.15rem 0; color: var(--ink); display: flex; align-items: center; gap: 0.45rem; }
.supplier-contact a { color: var(--primary-dark); }
.supplier-contact a:hover { text-decoration: underline; }
.supplier-meta svg, .supplier-contact svg { width: 15px; height: 15px; color: var(--light-olive); flex-shrink: 0; }
.supplier-actions { margin-top: 1.1rem; display: flex; justify-content: flex-end; }

/* ================================ Modal ================================ */
.modal-backdrop {
  position: fixed; inset: 0; background-color: rgba(14, 26, 24, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 1500; padding: 1.5rem;
}
.modal-backdrop.open { display: flex; animation: fade 0.2s var(--ease); }
.modal {
  background-color: var(--white); border-radius: var(--r-lg); border: 1px solid var(--border);
  max-width: 500px; width: 100%; padding: 2rem; box-shadow: var(--shadow-lg);
  animation: pop 0.3s var(--ease-out);
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.8rem; gap: 1rem; }
.modal-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.modal-close {
  background: var(--paper); border: none; width: 38px; height: 38px; border-radius: var(--r-sm);
  font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--muted); flex-shrink: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.modal-close:hover { background: var(--primary); color: #fff; }
.modal-body { font-size: 0.94rem; color: var(--ink); }
.modal-body p { margin: 0.4rem 0; display: flex; gap: 0.5rem; align-items: flex-start; }
.modal-body svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ================================ Finder / forms ================================ */
.finder-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr); gap: 2rem; margin-top: 2rem; align-items: start; }
.form-section { background-color: var(--white); border-radius: var(--r); border: 1px solid var(--border); padding: 1.9rem; box-shadow: var(--shadow-sm); }
.form-group { margin-bottom: 1rem; }
.form-group-inline { display: flex; gap: 0.85rem; }
.form-group-inline .form-group { flex: 1; margin-bottom: 0; }
label { display: block; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='password'], input[type='search'], select, textarea {
  width: 100%; padding: 0.82rem 0.95rem; border-radius: var(--r-sm); border: 1.5px solid var(--border-strong);
  background-color: var(--white); font-family: var(--font-body); font-size: 0.95rem; color: var(--ink); outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { min-height: 104px; resize: vertical; }
::placeholder { color: #93a5a0; }
.unit-select-wrapper { display: flex; gap: 0.5rem; }
.unit-select-wrapper input[type='number'] { flex: 2; }
.unit-select-wrapper select { flex: 1; }
.results-section { min-height: 150px; }
.results-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.results-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.results-empty {
  font-size: 0.92rem; color: var(--muted); border-radius: var(--r); border: 1.5px dashed var(--border-strong);
  padding: 1.25rem; background-color: rgba(231, 240, 237, 0.5); text-align: center;
}
.form-error-banner { border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--ink); padding: 0.9rem 1rem; border-radius: var(--r-sm); border: 1px solid rgba(255,107,92,0.25); }
.field-error { border-color: var(--accent) !important; box-shadow: 0 0 0 4px var(--accent-soft) !important; }
.field-error-label { color: var(--accent); }

/* ================================ Empty state ================================ */
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 3.5rem 1.5rem;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--white);
}
.empty-state .empty-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: var(--r); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.empty-state .empty-icon svg { width: 30px; height: 30px; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); margin-bottom: 0.4rem; }
.empty-state p { color: var(--muted); max-width: 30rem; margin: 0 auto 1.2rem; font-size: 0.95rem; }

/* ================================ Skeleton / shimmer ================================ */
.skeleton { position: relative; overflow: hidden; background: var(--paper); border-radius: var(--r-xs); }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: shimmer 1.3s infinite;
}
.skeleton-text { height: 0.7rem; border-radius: var(--r-pill); margin: 0.45rem 0; }
.skeleton-text.sm { width: 40%; } .skeleton-text.md { width: 65%; } .skeleton-text.lg { width: 90%; }
.skeleton-title { height: 1.15rem; width: 55%; border-radius: var(--r-xs); margin-bottom: 0.7rem; }
.skeleton-chip { height: 1.5rem; width: 6rem; border-radius: var(--r-pill); }
.skeleton-avatar { width: 42px; height: 42px; border-radius: var(--r-sm); flex-shrink: 0; }
.skeleton-btn { height: 38px; width: 7rem; border-radius: var(--r-pill); }
.skeleton-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 1.7rem; box-shadow: var(--shadow-sm); }
.skeleton-card .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }

/* ================================ Footer ================================ */
.site-footer { margin-top: auto; background-color: var(--dark); color: var(--cream); padding: 2.8rem 0; font-size: 0.86rem; border-top: 1px solid var(--border-on-dark); }
.site-footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.site-footer .tag-muted { color: var(--muted-on-dark); }
.site-footer .logo { color: #fff; }

/* ================================ Reveal + page transitions ================================ */
/* Pure-CSS scroll reveal. No JS, no observer, no timers — so it can never get
   stuck hidden. Content is VISIBLE BY DEFAULT; where the browser supports
   scroll-driven animations, each .reveal block fades up as it scrolls in.
   Browsers without support simply show the content (no animation). */
.reveal { opacity: 1; transform: none; }
.reveal.is-visible { opacity: 1; transform: none; }

@supports (animation-timeline: view()) {
  .reveal {
    animation: acmeUp 0.7s var(--ease-out) both;
    animation-timeline: view();
    animation-range: entry 8% entry 55%;
  }
}

/* ================================ Category accordion ================================ */
/* Expanding image panels: hover a panel and it grows while the others slim down. */
.category-accordion {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  height: 400px;
}
.cat-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-color: #1d2e2a;
  transition: flex-grow 0.55s var(--ease-out);
}
.category-accordion:hover .cat-panel { flex-grow: 0.6; }
.cat-panel:hover { flex-grow: 4.5; }
.cat-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,20,18,0.92) 0%, rgba(7,20,18,0.45) 45%, rgba(7,20,18,0.10) 100%);
}
.cat-panel-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 300px;            /* fixed width so text doesn't reflow as the panel resizes */
  max-width: 100%;
  padding: 1.3rem;
  color: #fff;
}
.cat-panel .category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  color: #fff;
  margin-bottom: 0.75rem;
}
.cat-panel .category-icon svg { width: 21px; height: 21px; }
.cat-panel-title {
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.2;
  white-space: nowrap;
}
.cat-panel-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.9);
  margin: 0.55rem 0 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease-out) 0.05s, transform 0.45s var(--ease-out) 0.05s;
}
.cat-panel:hover .cat-panel-desc { opacity: 1; transform: none; }

/* Mobile: no hover, so stack the panels and show everything. */
@media (max-width: 820px) {
  .category-accordion { flex-direction: column; height: auto; gap: 0.8rem; }
  .cat-panel { flex: none; height: 160px; }
  .category-accordion:hover .cat-panel,
  .cat-panel:hover { flex: none; }
  .cat-panel-content { width: 100%; }
  .cat-panel-desc { opacity: 1; transform: none; }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pageOut { to { opacity: 0; transform: translateY(-8px); } }

main { animation: pageIn 0.45s var(--ease-out) both; }
main > * { animation: fadeUp 0.5s var(--ease-out) both; }
main > *:nth-child(2) { animation-delay: 0.06s; }
main > *:nth-child(3) { animation-delay: 0.12s; }

/* JS-driven cross-page fade (fallback for browsers without View Transitions) */
body.is-leaving main { animation: pageOut 0.22s var(--ease) forwards; }

.stagger > * { animation: fadeUp 0.5s var(--ease-out) both; }
.stagger > *:nth-child(1){animation-delay:.04s} .stagger > *:nth-child(2){animation-delay:.09s}
.stagger > *:nth-child(3){animation-delay:.14s} .stagger > *:nth-child(4){animation-delay:.19s}
.stagger > *:nth-child(5){animation-delay:.24s} .stagger > *:nth-child(6){animation-delay:.29s}
.stagger > *:nth-child(7){animation-delay:.34s} .stagger > *:nth-child(8){animation-delay:.39s}
.stagger > *:nth-child(9){animation-delay:.44s}

/* Native cross-document View Transitions (Chromium) */
@view-transition { navigation: auto; }

/* ================================ Brand preloader ================================ */
/* Plays only when explicitly triggered: clicking the logo, or logging in on page 3.
   Hidden by default. The fade-out is a CSS animation ending in a hidden, non-interactive
   state, so a broken script can never trap the page behind the overlay. */
#preloader { display: none; }
html.preload #preloader {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 4000;
  align-items: center;
  justify-content: center;
  background-color: var(--cream);
  background-image:
    radial-gradient(65% 55% at 82% -8%, rgba(14, 158, 146, 0.10), transparent 70%),
    radial-gradient(55% 50% at -5% 10%, rgba(255, 107, 92, 0.07), transparent 70%);
  animation: preloaderOut 1.7s var(--ease-out) forwards;
}
.preloader-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--ink);
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 1;
}
.preloader-mark {
  width: 0.9em; height: 0.9em;
  border-radius: 0.3em 0.3em 0.3em 0.08em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
  opacity: 0;
  filter: blur(14px);
  transform: scale(1.1);
  animation: revealLetter 0.7s var(--ease-out) 0.1s forwards;
}
.preloader-word { display: inline-flex; }
.preloader-word span {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translateX(0.22em) scale(1.08);
  animation: revealLetter 0.7s var(--ease-out) forwards;
}
.preloader-word span:nth-child(1) { animation-delay: 0.18s; }
.preloader-word span:nth-child(2) { animation-delay: 0.25s; }
.preloader-word span:nth-child(3) { animation-delay: 0.32s; }
.preloader-word span:nth-child(4) { animation-delay: 0.39s; }
.preloader-word span:nth-child(5) { animation-delay: 0.46s; }
.preloader-word span:nth-child(6) { animation-delay: 0.53s; }
.preloader-word span:nth-child(7) { animation-delay: 0.60s; }

@keyframes revealLetter {
  from { opacity: 0; filter: blur(14px); transform: translateX(0.22em) scale(1.08); }
  to   { opacity: 1; filter: blur(0);    transform: none; }
}
@keyframes preloaderOut {
  0%, 72% { opacity: 1; }
  100%    { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ================================ Responsive ================================ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero-illustration { order: -1; }
  .steps-grid, .categories-grid, .suppliers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finder-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .page-section { padding: 3rem 0; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; right: 1.5rem; top: calc(var(--nav-h) - 4px);
    flex-direction: column; align-items: flex-start; gap: 1rem;
    background-color: rgba(255,255,255,0.98); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    padding: 1.2rem 1.4rem; border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; animation: pop 0.22s var(--ease-out); }
  .steps-grid, .categories-grid, .suppliers-grid { grid-template-columns: minmax(0, 1fr); }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filters-bar > div { width: 100%; }
  .filters-bar input[type='search'] { min-width: 0; }
  .form-group-inline { flex-direction: column; gap: 1rem; }
  .hero { padding-top: 3.2rem; }
}

/* ── Acme-style entrance cascade ───────────────────────────── */
/* Bolder travel + clearer stagger so the effect is unmistakable. */
@keyframes acmeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* HOMEPAGE HERO: stop the whole block from sliding as one unit, then
   cascade its inner text (badge → title → subtitle → buttons → meta). */
.hero { animation: none !important; }
.hero-grid > div:first-child > * { animation: acmeUp .6s var(--ease-out) both; }
.hero-grid > div:first-child > *:nth-child(1){ animation-delay:.10s }
.hero-grid > div:first-child > *:nth-child(2){ animation-delay:.22s }
.hero-grid > div:first-child > *:nth-child(3){ animation-delay:.34s }
.hero-grid > div:first-child > *:nth-child(4){ animation-delay:.46s }
.hero-grid > div:first-child > *:nth-child(5){ animation-delay:.58s }

/* OTHER PAGES: class="cascade" container — block-fade off, children cascade. */
.cascade { animation: none !important; }
.cascade > * { animation: acmeUp .6s var(--ease-out) both; }
.cascade > *:nth-child(1){ animation-delay:.10s }
.cascade > *:nth-child(2){ animation-delay:.22s }
.cascade > *:nth-child(3){ animation-delay:.34s }
.cascade > *:nth-child(4){ animation-delay:.46s }
.cascade > *:nth-child(5){ animation-delay:.58s }
.cascade > *:nth-child(6){ animation-delay:.70s }

@media (prefers-reduced-motion: reduce) {
  /* Keep short hover/press transitions (satisfying feedback) but drop
     large entrance animations, parallax, and looping shimmer. */
  main, main > *, .stagger > *, .cascade > *, .hero-grid > div:first-child > *, .reveal { animation: none !important; }
  html.reveal-on .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .skeleton::after { animation: none; }
  #preloader, html.preload #preloader { display: none !important; }
  @view-transition { navigation: none; }
}

/* ================================ Satisfying micro-interactions ================================ */
/* Sheen sweep across primary buttons on hover */
.btn-primary { overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform 0.6s var(--ease); pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(130%); }

/* Icons spring slightly when their card is hovered/focused */
.step-icon, .category-icon, .supplier-icon, .hero-box-icon {
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.card:hover .step-icon, .card:hover .category-icon, .card:hover .supplier-icon { transform: scale(1.06); }

/* Press feedback */
.card:active { transform: translateY(-1px) scale(0.995); }
.supplier-card:active { transform: scale(0.99); }

/* Navbar gains elevation once the page is scrolled */
.navbar { transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.navbar.scrolled { box-shadow: 0 6px 24px rgba(14,26,24,0.10); background-color: rgba(228,235,232,0.92); }

/* Inputs lift subtly on focus */
.form-section input:focus, .form-section select:focus, .form-section textarea:focus { transform: translateY(-1px); }

/* Link affordance in supplier contacts */
.supplier-contact a { transition: color var(--dur) var(--ease); }

/* Hero slideshow — wider boxes on small screens */
@media (max-width: 720px) {
  .hero-box { flex: 0 0 80%; }
  .hero-carousel.static .hero-box { flex: 0 0 calc(50% - 0.45rem); }
}
