/**
 * Homepage sections. Each block here maps to one template-part in
 * template-parts/home/.
 */

/* ---- 01 Hero slider -------------------------------------------------- */
/* A native scroll-snap track: it swipes on touch with no JS, and the dots,
   arrows and autoplay are enhancements on top. */
.hero { position: relative; background: var(--ink); overflow: hidden; }

.hero__track {
  display: flex; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.hero__track::-webkit-scrollbar { display: none; }

.hero__slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always;
  min-height: min(66vh, 640px);
  display: flex; align-items: flex-end;
}
@media (max-width: 700px) { .hero__slide { min-height: min(76vh, 580px); } }

.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(12,10,7,0.92) 0%, rgba(12,10,7,0.58) 44%, rgba(12,10,7,0.20) 74%, rgba(12,10,7,0.38) 100%),
    radial-gradient(120% 90% at 78% 20%, rgba(155,124,54,0.22), rgba(0,0,0,0) 60%);
}
.hero__body { position: relative; z-index: 2; padding-block: var(--s-8) var(--s-9); width: 100%; }
.hero .kicker { color: var(--brass); }
.hero h1, .hero__title {
  font-family: var(--display); font-size: var(--t-display); line-height: var(--lh-tight);
  color: #fff; max-width: 16ch; margin: 0 0 var(--s-5); letter-spacing: -0.028em;
}
.hero__title { font-size: clamp(2.1rem, 1.1rem + 4.2vw, 4.2rem); max-width: 19ch; }
.hero__title a { color: inherit; }
@media (hover: hover) { .hero__title a:hover { color: var(--brass); } }
.hero__sub { color: rgba(255,255,255,0.88); font-size: var(--t-lead); max-width: 46ch; margin-bottom: var(--s-6); }
.hero__cta { display: flex; gap: var(--s-4); flex-wrap: wrap; }

/* Controls sit over the bottom of the track. */
.hero__controls {
  position: absolute; inset: auto 0 0 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5); padding-bottom: var(--s-6); pointer-events: none;
}
.hero__dots { display: flex; gap: var(--s-3); pointer-events: auto; }
.hero__dot {
  width: 34px; height: 3px; background: rgba(255,255,255,0.32);
  transition: background var(--dur) var(--ease), width var(--dur) var(--ease);
}
.hero__dot.is-on { background: var(--brass); width: 52px; }
.hero__arrows { display: flex; gap: var(--s-2); pointer-events: auto; }
.hero__arrow {
  width: 42px; height: 42px; display: grid; place-items: center; color: #fff;
  border: 1px solid rgba(255,255,255,0.32); border-radius: var(--radius-pill);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hero__arrow:hover { background: #fff; border-color: #fff; color: var(--ink); }
@media (max-width: 560px) { .hero__arrows [data-hero-pause] { display: none; } }

/* Entrance: the active slide's copy arrives, the rest stay put. */
.js .hero__slide .hero__body > * { opacity: 0; transform: translateY(14px); }
.js .hero.is-ready .hero__slide[data-active] .hero__body > * {
  opacity: 1; transform: none;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}
.js .hero.is-ready .hero__slide[data-active] .hero__body > *:nth-child(2) { transition-delay: 70ms; }
.js .hero.is-ready .hero__slide[data-active] .hero__body > *:nth-child(3) { transition-delay: 140ms; }
.js .hero.is-ready .hero__slide[data-active] .hero__body > *:nth-child(4) { transition-delay: 210ms; }
@media (prefers-reduced-motion: reduce) {
  .js .hero__slide .hero__body > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---- Category chips -------------------------------------------------- */
.chips-bar { border-bottom: 1px solid var(--line); background: var(--paper); }
.chips {
  display: flex; gap: var(--s-3); overflow-x: auto; scrollbar-width: none;
  padding-block: var(--s-4);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center;
  font-size: var(--t-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 0.55em 1.1em; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.chip:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---- 02 The Latest: filter rail + card grid -------------------------- */
.latest-layout { display: grid; grid-template-columns: minmax(0, 25%) minmax(0, 75%); gap: var(--s-6); align-items: start; }
.latest-filter, .latest-grid { min-width: 0; }
@media (max-width: 900px) { .latest-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); } }

.latest-filter__inner { position: sticky; top: 96px; }
@media (max-width: 900px) { .latest-filter__inner { position: static; } }
.latest-filter__title {
  font-family: var(--sans); font-size: var(--t-label); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-4);
}
.filter-list { display: grid; gap: 2px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .filter-list { display: flex; flex-wrap: nowrap; overflow-x: auto; border-top: 0; scrollbar-width: none; gap: var(--s-2); max-width: 100%; }
  .filter-item { flex: none; }
  .filter-list::-webkit-scrollbar { display: none; }
}
.filter-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  width: 100%; text-align: left; padding: 0.85em 0.9em;
  font-size: var(--t-small); font-weight: 500; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.filter-item em {
  font-style: normal; font-family: var(--mono); font-size: var(--t-label);
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.filter-item:hover { background: var(--paper-2); color: var(--ink); }
.filter-item.is-on { background: var(--ink); color: var(--paper); }
.filter-item.is-on em { color: rgba(255,255,255,0.6); }
@media (max-width: 900px) {
  .filter-item { border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.5em 1em; white-space: nowrap; }
}
.latest-filter__note { font-size: var(--t-meta); color: var(--muted); margin-top: var(--s-4); }

.latest-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-5); }
@media (max-width: 1400px) { .latest-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1050px) { .latest-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px)  { .latest-grid { grid-template-columns: 1fr; } }
.latest-item { display: block; }
.latest-item[hidden] { display: none; }
.latest-empty { grid-column: 1 / -1; color: var(--muted); font-size: var(--t-small); }

/* ---- 03 Statement ---------------------------------------------------- */
.statement { padding-block: var(--section-y); }
/* Direct child only. `.statement p` also matched the pillar copy nested
   inside .statement__foot and blew it up to display size. */
.statement > p {
  font-family: var(--display); font-size: clamp(1.7rem, 4.4vw, 3.4rem);
  line-height: 1.16; letter-spacing: -0.022em; color: var(--ink);
  max-width: 22ch; margin: 0;
}
.statement > p em { font-style: italic; color: var(--clay); }
.statement__foot {
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-5);
}
@media (max-width: 860px) { .statement__foot { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 440px) { .statement__foot { grid-template-columns: 1fr; } }

/* ---- 03 Explore (asymmetric destination grid) ------------------------ */
.dest-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--s-4); min-width: 0; max-width: 100%; }
.dest-grid > *:nth-child(1) { grid-column: span 7; aspect-ratio: 4 / 3; }
.dest-grid > *:nth-child(2) { grid-column: span 5; aspect-ratio: 1 / 1; }
.dest-grid > *:nth-child(3) { grid-column: span 4; aspect-ratio: 3 / 4; }
.dest-grid > *:nth-child(4) { grid-column: span 4; aspect-ratio: 3 / 4; }
.dest-grid > *:nth-child(5) { grid-column: span 4; aspect-ratio: 3 / 4; }
@media (max-width: 900px) {
  .dest-grid > *:nth-child(n) { grid-column: span 6; aspect-ratio: 4 / 3; }
}
@media (max-width: 620px) {
  /* Leaves CSS Grid entirely for the phone carousel. The desktop rules set
     `grid-column: span N` on these tiles, and no media-query override can be
     relied on to beat them — but `grid-column` is simply ignored on a flex
     item, so switching layout mode ends the fight for good. */
  .dest-grid {
    display: flex; flex-wrap: nowrap;
    gap: var(--s-4); overflow-x: auto; max-width: 100%;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    padding-bottom: var(--s-3);
  }
  .dest-grid::-webkit-scrollbar { display: none; }
  .dest-grid > * {
    flex: 0 0 78%; scroll-snap-align: start; aspect-ratio: 4 / 5;
  }
}

/* ---- 04 Travel journal ----------------------------------------------- */
.journal { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s-8); }
@media (max-width: 900px) { .journal { grid-template-columns: 1fr; gap: var(--s-7); } }

/* ---- 05/06 Food collage & recipe feature ----------------------------- */
.collage { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--s-5); align-items: center; }
.collage__lead { grid-column: span 7; }
.collage__side { grid-column: span 5; display: grid; gap: var(--s-5); }
@media (max-width: 900px) { .collage__lead, .collage__side { grid-column: 1 / -1; } }

.recipe-feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--paper-2); align-items: stretch;
}
@media (max-width: 860px) { .recipe-feature { grid-template-columns: 1fr; } }
.recipe-feature__media { position: relative; min-height: 380px; }
.recipe-feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.recipe-feature__body { padding: clamp(var(--s-6), 4vw, var(--s-8)); align-self: center; }
.recipe-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: var(--s-4); margin: var(--s-6) 0;
  border-block: 1px solid var(--line); padding-block: var(--s-4);
}
.recipe-stats div { display: grid; gap: 3px; }
.recipe-stats dt { font-size: var(--t-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.recipe-stats dd { margin: 0; font-family: var(--display); font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- 07 Craft: material → maker → process → object -------------------- */
.craft-flow { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-5); }
@media (max-width: 900px) { .craft-flow { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px) { .craft-flow { grid-template-columns: 1fr; } }
.craft-step { display: grid; gap: var(--s-4); align-content: start; }
.craft-step__no {
  font-family: var(--mono); font-size: var(--t-meta); letter-spacing: 0.16em;
  color: var(--brass); padding-bottom: var(--s-3); border-bottom: 1px solid rgba(255,255,255,0.16);
}
.section--ink .craft-step p { color: rgba(255,255,255,0.68); font-size: var(--t-small); }

/* ---- 08 Shop rail ---------------------------------------------------- */
.shop-rail { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-5); }
@media (max-width: 900px) { .shop-rail { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px) {
  .shop-rail {
    grid-auto-flow: column; grid-auto-columns: 68%; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .shop-rail::-webkit-scrollbar { display: none; }
  .shop-rail > * { scroll-snap-align: start; }
}

/* ---- 09 Story → product ---------------------------------------------- */
.bridge { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s-8); align-items: center; }
@media (max-width: 900px) { .bridge { grid-template-columns: 1fr; } }
.bridge__products { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s-4); }
@media (max-width: 480px) { .bridge__products { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ---- 10 Read / Bring home split -------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; }
@media (max-width: 780px) { .split { grid-template-columns: 1fr; } }
.split__half { position: relative; display: grid; place-items: center; overflow: hidden; padding: var(--s-8) var(--s-6); text-align: center; }
.split__half img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__half::after { content: ''; position: absolute; inset: 0; background: rgba(14,11,8,0.62); transition: background var(--dur) var(--ease); }
.split__half:hover::after { background: rgba(14,11,8,0.48); }
.split__inner { position: relative; z-index: 2; color: #fff; display: grid; gap: var(--s-4); justify-items: center; }
.split__inner h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin: 0; }
.split__inner p { color: rgba(255,255,255,0.78); max-width: 34ch; font-size: var(--t-small); margin: 0; }
