/* ==========================================================================
   Naty retail landing — styles.css
   Matched to naty.com's live brand system:
     · Font  : Futura Std  → Jost (free geometric substitute)
     · BG    : clean white
     · Text  : charcoal #2b2b2b
     · Accent: petrol-blue #00597e (links / highlights)
     · Eco   : green #436352 (secondary)
     · Style : flat, minimal, generous whitespace, uppercase spaced labels
   Mobile-first. Brand tokens as CSS variables (easy to retheme for Shopify).
   ========================================================================== */

:root {
  /* — Palette (from naty.com) — */
  --white:    #ffffff;
  --paper:    #f6f6f6;   /* subtle section tint */
  --ink:      #2b2b2b;   /* primary text + dark buttons */
  --ink-900:  #1a1a1a;
  --muted:    #5e5e5e;
  --faint:    #adadad;
  --line:     #e6e6e6;   /* hairline borders */
  --blue:     #00597e;   /* primary brand accent (links/highlights) */
  --blue-900: #073c52;
  --green:    #436352;   /* secondary eco accent */
  --green-700:#42705c;
  --blue-tint:#e6eef2;
  --green-tint:#e7eee9;

  /* — Type — */
  --font: 'Jost', 'Futura Std Book', 'Century Gothic', system-ui, sans-serif;

  /* — Shape (Naty is squared/minimal, small radii) — */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --shadow-card: 0 10px 30px -22px rgba(43, 43, 43, 0.5);

  --maxw: 1140px;
  --ls-wide: 0.075em; /* Naty's common letter-spacing on labels/buttons */
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.005em; }
ul { margin: 0; padding: 0; list-style: none; }

/* — Wordmark (Naty: lowercase Futura) — */
.wordmark {
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.65rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.wordmark--sm { font-size: 1.3rem; }

/* — Shared label style (eyebrows, section kickers) — */
.eyebrow,
.directory__label,
.result__chain {
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  font-weight: 500;
}

/* ============================ TOP BAR ============================ */
.hero__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 30px;
}
.brand-logo { height: 30px; width: auto; display: block; }
.brand-logo--sm { height: 24px; }

/* Market switch */
.market-switch { position: relative; }
.market-switch__btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 400; font-size: 0.88rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 14px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.market-switch__btn:hover { border-color: var(--blue); }
.hero .market-switch__btn { border-color: transparent; box-shadow: 0 4px 16px -6px rgba(0, 0, 0, 0.5); }
.market-switch__flag { font-size: 1.05rem; line-height: 1; }
.market-switch__label { display: none; }
.market-switch__caret { transition: transform .25s; color: var(--muted); }
.market-switch__btn[aria-expanded="true"] .market-switch__caret { transform: rotate(180deg); }

.market-switch__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 210px; padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  animation: pop .16s ease;
}
.market-switch__menu li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: var(--r-sm);
  font-weight: 400; cursor: pointer; transition: background .15s;
}
.market-switch__menu li:hover { background: var(--paper); }
.market-switch__menu li[aria-selected="true"] { background: var(--blue-tint); color: var(--blue-900); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ============================ BUTTONS ============================ */
.btn {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font); font-weight: 500; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: var(--ls-wide);
  border-radius: var(--r-sm);
  padding: 15px 28px; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn__icon { flex: none; }

/* Primary = Naty's dark charcoal button */
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--ink-900); }

/* Solid accent = petrol blue (used for the finder search) */
.btn--solid { background: var(--blue); color: var(--white); }
.btn--solid:hover { background: var(--blue-900); }

/* Ghost / outline */
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }

/* ============================ HERO ============================ */
/* Full-bleed lifestyle photo with a dark gradient scrim; all hero text and
   controls flip to white so they stay legible over the image. */
.hero {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  min-height: 88vh;
  padding: 22px 20px 40px;
  background: var(--ink-900) url('../img/hero.jpg') 50% 30% / cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(17, 24, 25, 0.74) 0%,
    rgba(17, 24, 25, 0.40) 26%,
    rgba(17, 24, 25, 0.30) 50%,
    rgba(17, 24, 25, 0.80) 100%);
}
.hero__inner {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; flex: 1;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
}
/* On dark: lift the wordmark to white and soften shadows under text. */
.hero .brand-logo { filter: brightness(0) invert(1); }
.hero__title, .hero__lead { text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35); }

.eyebrow {
  font-size: 0.76rem; color: #a9d2bf;   /* lightened eco green for dark bg */
  margin: 0 0 20px;
}
.hero__title {
  font-family: var(--font);
  font-weight: 500;
  font-size: clamp(2.7rem, 10vw, 5rem);
  line-height: 1.02; letter-spacing: -0.015em;
  color: var(--white);
  white-space: pre-line;
  margin-bottom: 22px;
}
.hero__lead {
  max-width: 34ch; font-size: 1.12rem; font-weight: 300;
  color: rgba(255, 255, 255, 0.84);
  margin: 0 0 32px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }

/* Buttons restyled for the photo hero (charcoal/outline would vanish on dark). */
.hero .btn--primary { background: var(--white); color: var(--ink); }
.hero .btn--primary:hover { background: #efefef; }
.hero .btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.55); }
.hero .btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

.trust {
  display: flex; flex-wrap: nowrap; gap: 18px;
  margin-top: auto;   /* anchor the trust strip to the bottom of the hero */
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin-left: -20px; margin-right: -20px; padding: 14px 20px 2px;
}
.trust::-webkit-scrollbar { display: none; }
.trust__item {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-size: 0.82rem; font-weight: 400; color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}
.trust__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex: none;
}

/* ============================ SECTIONS ============================ */
.section-title {
  font-family: var(--font); font-weight: 500;
  font-size: clamp(1.8rem, 5.5vw, 2.5rem); line-height: 1.1;
  letter-spacing: -0.01em; color: var(--ink);
}
.section-lead { color: var(--muted); font-weight: 300; margin: 12px 0 0; max-width: 50ch; }

/* ============================ FINDER ============================ */
.finder {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px 20px 20px;
  border-top: 1px solid var(--line);
}
.finder__head { margin-bottom: 18px; }

.finder__controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.field {
  display: flex; gap: 8px;
  background: var(--white); border: 1px solid var(--ink);
  border-radius: var(--r-sm); padding: 5px;
}
.field:focus-within { border-color: var(--blue); }
.field__input {
  flex: 1; min-width: 0; border: none; background: transparent;
  font-family: var(--font); font-size: 1rem; font-weight: 300; color: var(--ink);
  padding: 11px 14px;
}
.field__input::placeholder { color: var(--faint); }
.field__input:focus { outline: none; }
.field__submit { padding: 13px 22px; }
.finder__geo { align-self: flex-start; }

.finder__body { display: flex; flex-direction: column; gap: 18px; }

.map-wrap {
  position: relative;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}
.map { width: 100%; height: 340px; }
.map__placeholder {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 24px;
  color: var(--faint); background: var(--paper);
}
.map__placeholder p { max-width: 24ch; margin: 0; font-size: 0.95rem; font-weight: 300; }
.map__placeholder.is-hidden { display: none; }

/* MapLibre custom pins */
.naty-pin { display: grid; place-items: center; cursor: pointer; }
.naty-pin__dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--blue); border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.32);
}
.naty-pin--me .naty-pin__dot {
  background: var(--ink);
  box-shadow: 0 0 0 5px rgba(43,43,43,.16);
}
.maplibregl-popup-content {
  font-family: var(--font); font-weight: 300; font-size: 0.9rem;
  border-radius: var(--r-sm); padding: 10px 14px;
}
.maplibregl-popup-content strong { font-weight: 500; color: var(--ink); }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* Map disclaimer (under the map) */
.map-disclaimer {
  margin: 14px 0 0; font-size: 0.78rem; font-weight: 300;
  color: var(--faint); max-width: 70ch;
}

/* Results list */
.results { display: flex; flex-direction: column; gap: 10px; }
.results__list { display: flex; flex-direction: column; gap: 10px; }
.results__more { width: 100%; margin-top: 4px; font-size: 0.78rem; padding: 13px 22px; }
.results__title {
  font-size: 0.76rem; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: var(--ls-wide);
  margin-bottom: 2px;
}
.result__meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  flex: none; text-align: right;
}
.result__eta { font-size: 0.74rem; font-weight: 400; color: var(--blue); }
.result {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md);
  animation: rise .35s ease both;
}
.result__pin {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue-tint); color: var(--blue-900);
  font-weight: 500; font-size: 0.85rem;
}
.result__body { flex: 1; min-width: 0; }
.result__chain { font-size: 0.72rem; color: var(--blue); margin-bottom: 1px; }
.result__name { font-weight: 400; color: var(--ink); }
.result__addr { font-size: 0.85rem; font-weight: 300; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result__dist { font-size: 0.78rem; font-weight: 500; color: var(--muted); flex: none; }
.result__dir {
  flex: none; font-size: 0.72rem; font-weight: 500; color: var(--ink);
  text-transform: uppercase; letter-spacing: var(--ls-wide);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 12px; transition: border-color .2s, color .2s;
}
.result__dir:hover { border-color: var(--blue); color: var(--blue); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Empty / loading states */
.results__state {
  text-align: center; padding: 30px 20px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); color: var(--muted);
}
.results__state h4 { color: var(--ink); margin: 0 0 6px; font-weight: 500; font-size: 1.05rem; }
.results__state p { font-weight: 300; margin: 0; }
.results__state .btn { margin-top: 16px; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 12px;
  border: 3px solid var(--blue-tint); border-top-color: var(--blue);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ DIRECTORY ============================ */
.directory {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px 20px 56px;
  border-top: 1px solid var(--line);
}
.directory .section-title { margin-bottom: 24px; }
.directory__group { margin-top: 30px; }
.directory__label {
  font-size: 0.76rem; color: var(--muted);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px;
}
.directory__label::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.retailer-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
.retailer {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 18px 16px; min-height: 76px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s ease, box-shadow .25s ease;
}
.retailer:hover { border-color: var(--ink); box-shadow: var(--shadow-card); }
.retailer__copy {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  align-items: center; text-align: center;
}
/* Equalized logo box: every logo is contained in the same height/width
   envelope and centered, so the grid reads as a uniform logo wall. */
.retailer__logo {
  height: 26px; max-height: 26px; max-width: 100px;
  width: auto; object-fit: contain; object-position: center;
}
.retailer__name { font-weight: 500; font-size: 1.04rem; color: var(--ink); letter-spacing: 0.01em; }
.retailer__go {
  position: absolute; top: 11px; right: 11px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; color: var(--faint);
  font-size: 0.85rem;
  transition: transform .2s, color .2s;
}
.retailer:hover .retailer__go { transform: translate(2px,-2px); color: var(--blue); }

/* Amazon = featured (Naty dark) */
.retailer--amazon { background: var(--ink); border-color: var(--ink); }
.retailer--amazon:hover { box-shadow: var(--shadow-card); }
.retailer--amazon .retailer__name { color: var(--white); }
.retailer--amazon .retailer__go { color: var(--white); }
.retailer--amazon:hover .retailer__go { color: var(--white); }
.retailer__tag {
  display: block; font-size: 0.64rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: var(--ls-wide);
  color: var(--green-tint); margin-bottom: 4px;
}

/* ============================ FOOTER ============================ */
.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.footer__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 36px 20px;
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
}
.footer__note { font-size: 0.82rem; font-weight: 300; color: var(--muted); max-width: 56ch; margin: 0; }
.footer__site { font-weight: 400; color: var(--blue); border-bottom: 1px solid var(--blue); padding-bottom: 1px; }

/* ============================ REVEAL ANIM ============================ */
.reveal { opacity: 0; transform: translateY(12px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in[data-delay="1"] { transition-delay: .07s; }
.reveal.is-in[data-delay="2"] { transition-delay: .14s; }
.reveal.is-in[data-delay="3"] { transition-delay: .21s; }
.reveal.is-in[data-delay="4"] { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  * { animation: none !important; scroll-behavior: auto; }
}

/* ============================ RESPONSIVE ============================ */
@media (min-width: 560px) {
  .market-switch__label { display: inline; }
  .retailer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 860px) {
  body { font-size: 18px; }
  .hero { padding: 34px 32px 60px; }
  .finder, .directory { padding-left: 32px; padding-right: 32px; }
  .finder__controls { flex-direction: row; align-items: center; }
  .field { flex: 1; }
  .finder__body { flex-direction: row; align-items: stretch; }
  .map-wrap { flex: 1.5; }
  .map { height: 470px; }
  .results {
    flex: 1; max-height: 470px; overflow-y: auto; padding-right: 4px;
    min-width: 310px;
  }
  .retailer-grid { grid-template-columns: repeat(4, 1fr); }
  .topbar { padding: 18px 32px; }
  .footer__inner { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .footer__note { flex: 1; }
}
