/* Atlas Wild Experiences — the block renderers. LAYOUT ONLY, same rule as site.css.
 *
 * site.css is the shell: wrap, bands, header, hero, footer. This file is the
 * blocks chrome.py can emit — one section per BLOCKS entry. Split because the
 * two change for different reasons: the shell changes when the site's furniture
 * changes, a block changes when a page needs a new shape.
 *
 * Not one raw colour below. Every value comes from the design system, and
 * build.py fails the build if that stops being true.
 */

/* ── skip link and breadcrumbs ──────────────────────────────────────────── */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-on);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-data);
  font-size: var(--text-sm);
  z-index: 20;
}
.skip:focus { left: 0; }

.crumbs {
  border-bottom: var(--awe-rule);
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: var(--awe-tracking-data);
  color: var(--muted);
  padding-block: var(--space-4);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin-inline: var(--space-3); opacity: .5; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }

/* ── hero with an image ─────────────────────────────────────────────────── */
.hero-media { margin-top: var(--space-8); }
.hero-media figure { margin: 0; }
.hero-media img { width: 100%; height: auto; display: block; }

@media (min-width: 1040px) {
  .hero-img {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-12);
    align-items: center;
  }
  /* The hero text keeps the page's left gutter but stops at the midline, so
     the photograph runs to the right edge without the copy re-centring. */
  .hero-img > .wrap { margin-right: 0; padding-right: 0; }
  .hero-media { margin-top: 0; padding-right: var(--container-gutter-desktop); }
}

/* ── split ──────────────────────────────────────────────────────────────── */
.split { display: grid; gap: var(--space-8); align-items: center; }
.split figure { margin: 0; }
.split img { width: 100%; height: auto; display: block; }
.split .btn { margin-top: var(--space-6); }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-12); }
  .split.flip .split-media { order: 2; }
}

/* ── gallery ────────────────────────────────────────────────────────────── */
.gallery {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; display: block; }
/* A print that is for sale links to the product page. The anchor is
   the grid cell, so the layout does not move; it only has to stop
   behaving like body text. */
.gtile { display: block; text-decoration: none; color: inherit; }
.gtile img { transition: opacity .18s ease; }
.gtile:hover img { opacity: .9; }
.gtile:focus-visible { outline: 2px solid var(--accent);
  outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .gtile img { transition: none; }
}

/* ── carousel ───────────────────────────────────────────────────────────────
   A manual, swipeable photo strip. The track IS the scroll container and the
   slides snap; the arrows and dots (added by chrome.py's CAROUSEL_JS) only
   drive that native scroll, so it works on touch with no script and never
   pushes the page sideways — it scrolls inside its own box. */
.carousel { position: relative; margin-top: var(--space-6); }
.ctrack {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-1);
}
.ctrack::-webkit-scrollbar { display: none; }
.cslide {
  flex: 0 0 86%;
  scroll-snap-align: center;
  margin: 0;
}
@media (min-width: 768px) { .cslide { flex-basis: 60%; } }
@media (min-width: 1040px) { .cslide { flex-basis: 46%; } }
.cslide picture { display: block; }
/* Every slide is the same 3:2 box regardless of the frame's own crop, so a
   portrait and a landscape sit at one height instead of a ragged row. The
   photograph fills that box (cover) rather than letterboxing; subjects in this
   set sit central, so centre is the safe anchor. */
.cslide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--radius-md);
  background: var(--awe-black);
}
.cslide figcaption {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: var(--awe-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-2);
  margin-top: var(--space-3);
}
/* The arrows overlay the photographs, so they cannot borrow the ground's
   colour — a black disc on the night ground is invisible, and any single fill
   fights some frames. A near-solid cream disc with a dark chevron and a soft
   shadow reads as a control on top of a bright tiger and on top of pure black
   alike. It is the one place the carousel earns a real, tappable affordance. */
.cbtn {
  position: absolute;
  top: calc(50% - var(--space-6));
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--awe-black), transparent 84%);
  background: color-mix(in oklab, var(--awe-cream), transparent 8%);
  color: var(--awe-black);
  font-size: var(--text-2xl);
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 3px 14px color-mix(in oklab, var(--awe-black), transparent 58%);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: background var(--motion-fast) var(--ease-standard),
              transform var(--motion-fast) var(--ease-standard),
              opacity var(--motion-fast) var(--ease-standard);
}
.cbtn:hover {
  background: var(--awe-cream);
  transform: translateY(-50%) scale(1.06);
}
.cbtn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* At the first/last frame there is nowhere further to go, so the spent arrow
   fades out rather than sitting there dead. */
.cbtn[disabled] { opacity: 0; pointer-events: none; }
.cprev { left: var(--space-3); }
.cnext { right: var(--space-3); }
.cdots {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-5);
}
.cdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--awe-sand), transparent 55%);
  background: transparent;
  transition: background var(--motion-fast) var(--ease-standard),
              border-color var(--motion-fast) var(--ease-standard);
}
.cdot[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
}
.cdot:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* Arrows show on every device. Touch also swipes, and a hover-less webview
   (the editor preview, many touch laptops) reports `hover: none` — hiding the
   arrows there is exactly what made them look missing. They are always
   available; on the smallest screens they shrink so they cover less of a
   slide. */
@media (max-width: 560px) {
  .cbtn { width: 40px; height: 40px; font-size: var(--text-xl); }
  .cprev { left: var(--space-2); }
  .cnext { right: var(--space-2); }
}

/* ── quotes ─────────────────────────────────────────────────────────────── */
.quotes {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.quote {
  margin: 0;
  padding: var(--space-6);
  border: var(--awe-rule);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.quote p { margin: 0; color: var(--fg-2); }
.quote cite {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-data);
  font-size: var(--text-xs);
  font-style: normal;
  letter-spacing: var(--awe-tracking-data);
  text-transform: uppercase;
  color: var(--muted);
}

/* ── steps — numbered because order is genuinely information here ───────── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-top: var(--awe-rule);
}
.step:last-child { border-bottom: var(--awe-rule); }
.step-n {
  font-family: var(--font-data);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--awe-tracking-data);
  color: var(--accent);
  padding-top: 5px;
}
.step h3 { margin-block: 0 var(--space-3); font-size: var(--text-xl); }
.step p { margin: 0; color: var(--fg-2); max-width: var(--awe-measure); }

/* ── table ──────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: var(--awe-rule);
  border-radius: var(--radius-sm);
}
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th, td {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
}
th {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--awe-tracking-data);
  text-transform: uppercase;
  color: var(--muted);
  /* No fill on the header row.
     `--surface` is WHITE on the cream ground, and the table body has no
     background of its own — so a filled header rendered as a detached white
     strip floating above cream rows, the only white in the section. It looked
     like a separate element rather than the top of the table.
     The design system's own tables (build_kit.py) rule the header off instead
     of filling it, which is also the house style: borders, not fields. Doing
     the same here fixes it on all four grounds at once, where a per-surface
     override would have to be written four times. */
  border-bottom: var(--awe-rule);
}
td { font-size: var(--text-sm); color: var(--fg-2); }
td:first-child { color: var(--fg); }
tbody tr:last-child td { border-bottom: none; }
.table-note {
  margin-top: var(--space-4);
  font-family: var(--font-data);
  font-size: var(--text-xs);
  color: var(--muted);
  max-width: var(--awe-measure);
}

/* ── faq ────────────────────────────────────────────────────────────────── */
.faqs { border-top: var(--awe-rule); max-width: 76ch; }
.faq { border-bottom: var(--awe-rule); }
.faq summary {
  cursor: pointer;
  padding-block: var(--space-5);
  font-size: var(--text-lg);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-data);
  color: var(--accent);
  flex: none;
}
.faq[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.faq p {
  margin-block: 0 var(--space-5);
  color: var(--fg-2);
  max-width: var(--awe-measure);
}

/* ── callout — the thing a brochure would leave out ─────────────────────── */
.callout {
  border: var(--awe-rule);
  border-left: 2px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  background: var(--surface);
  max-width: 76ch;
}
.callout h3 { margin-block: 0 var(--space-4); font-size: var(--text-xl); }
.callout p { margin-block: 0 var(--space-4); color: var(--fg-2); }
.callout p:last-child { margin-bottom: 0; }

/* ── facts ──────────────────────────────────────────────────────────────── */
.facts { margin: 0; border-top: var(--awe-rule); }
.fact {
  display: grid;
  gap: var(--space-2) var(--space-6);
  padding-block: var(--space-4);
  border-bottom: var(--awe-rule);
}
.fact dt {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: var(--awe-tracking-data);
  text-transform: uppercase;
  color: var(--muted);
}
.fact dd { margin: 0; color: var(--fg); }

@media (min-width: 720px) {
  .fact { grid-template-columns: 260px 1fr; align-items: baseline; }
}

/* ── link list ──────────────────────────────────────────────────────────── */
.linklist {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--awe-rule);
  max-width: 76ch;
}
.linklist li {
  border-bottom: var(--awe-rule);
  padding-block: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: baseline;
  justify-content: space-between;
}
.linklist a {
  color: var(--fg);
  text-decoration: none;
  font-size: var(--text-lg);
}
.linklist a:hover { color: var(--accent); }
.linklist span {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  color: var(--muted);
}

/* ── cta band ───────────────────────────────────────────────────────────── */
/* On the default cream page a call to action needs to be lifted off the ground,
   so it gets a panel. On a band that has already changed ground — sand, forest
   — the colour field IS the emphasis, and a panel inside it is a second box
   saying the same thing. */
.cta {
  border: var(--awe-rule);
  border-radius: var(--radius-sm);
  padding: var(--space-8);
  background: var(--surface);
}
[data-surface] .cta {
  border: 0;
  padding: 0;
  background: none;
}
.cta .head-block { margin-bottom: 0; }
.cta .acts { margin-top: var(--space-6); }
.standfirst {
  color: var(--fg-2);
  max-width: var(--awe-measure);
  margin-block: var(--space-4) 0;
}

/* ── footer additions ───────────────────────────────────────────────────── */
/* `.foot-top` and `.foot-brand` used to live here as well as in site.css, and
   because blocks.css loads second this copy silently won. The footer lockup is
   defined once now, in site.css. */
.band.tight { padding-block: var(--space-8); }
