/* ============================================================
   JOURNEY ATLAS — top page final rhythm / typography pass
   ============================================================ */

:root{
  --top-section-title:20px;
  --top-card-title:16px;
  --top-body:11.5px;
  --top-small:10px;
  --top-radius:14px;
}

/* Header */
.top-header{
  min-height:78px;
  grid-template-columns:auto 1fr;
  gap:36px;
}
.brand-block{gap:5px}
.wordmark{
  font-size:clamp(23px,1.75vw,29px);
  line-height:1;
  letter-spacing:.23em;
}
.brand-block small{
  font-size:9.5px;
  line-height:1.35;
  letter-spacing:.04em;
}
.top-header nav{
  justify-content:flex-end;
  gap:clamp(22px,2.5vw,40px);
  font-size:12.5px;
  line-height:1;
}

/* Hero */
.top-hero{
  grid-template-columns:minmax(470px,.42fr) minmax(0,.58fr);
  gap:28px;
  min-height:372px;
  padding:10px 0 18px;
}
.hero-copy{
  min-width:0;
  padding:18px 0 26px 10px;
}
.hero-copy h1{
  margin:0;
  font-size:clamp(38px,3vw,48px);
  line-height:1.22;
  letter-spacing:.01em;
}
.hero-title span{
  display:block;
  white-space:nowrap;
}
.hero-copy .lead{
  max-width:31em;
  margin:21px 0 0;
  font-size:clamp(14px,1.05vw,16.5px);
  line-height:1.9;
  letter-spacing:.01em;
  color:#304354;
}
.hero-visual{padding:2px 0 26px}
.hero-controls{bottom:5px}

/* Three entry cards directly below the hero */
.explore{
  gap:16px;
  padding:14px 28px 36px;
}
.explore-card{
  border-radius:11px;
}
.explore-card__art{height:118px}
.explore-card__copy{
  grid-template-columns:auto 1fr auto;
  gap:12px;
  min-height:84px;
  padding:12px 15px 13px;
}
.explore-icon{
  width:38px;
  height:38px;
  font-size:20px;
}
.explore-card__copy h2{
  margin:0;
  font-size:var(--top-card-title);
  line-height:1.35;
  font-weight:700;
}
.explore-card__copy p{
  margin:5px 0 0;
  font-size:var(--top-body);
  line-height:1.55;
  color:#435466;
}
.explore-card__copy>b{
  font-size:23px;
  line-height:1;
}

/* ============================================================
   Discovery sections — one visual language for Country / Map / Theme
   ============================================================ */
.countries,
.detail-panel{
  border:1px solid var(--line);
  border-radius:var(--top-radius);
  background:#fff;
  box-shadow:0 1px 6px rgba(11,44,87,.035);
}

.countries{
  margin-top:4px;
  padding:26px 28px 24px;
}
.countries .section-head,
.detail-heading{
  margin:0;
  padding:0;
}
.countries .section-head{
  align-items:center;
  padding-bottom:18px;
}
.countries .section-head h2,
.detail-heading h2{
  margin:0;
  font-size:var(--top-section-title);
  line-height:1.35;
  font-weight:700;
  letter-spacing:0;
}
.countries .section-head p,
.detail-heading p{
  margin:6px 0 0;
  font-size:var(--top-body);
  line-height:1.65;
  color:#526274;
}
.all-countries-toggle,
.section-link{
  font-size:11px;
  line-height:1.4;
}
.countries .rail-wrap{margin-top:0}
.countries .rail-meta{margin-top:3px}
.countries .alphabet{padding-top:9px}
.country-card h3{font-size:12.5px;line-height:1.25}
.country-card p{font-size:10.5px;line-height:1.4}

.explore-detail{
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
  padding:22px 0 34px;
}
.detail-panel{
  min-height:252px;
  display:grid;
  grid-template-columns:minmax(240px,.34fr) minmax(0,.66fr);
  grid-template-rows:auto auto;
  column-gap:42px;
  align-items:center;
  padding:26px 28px;
}
.detail-panel .detail-heading{
  display:block;
  grid-column:1;
  grid-row:1;
  align-self:end;
}
.detail-heading>span{display:none}
.detail-heading p{max-width:28em}
.detail-panel .detail-link{
  grid-column:1;
  grid-row:2;
  align-self:start;
  margin-top:15px;
  font-size:11.5px;
  line-height:1.4;
}
.map-panel .mini-map{
  grid-column:2;
  grid-row:1 / span 2;
  height:220px;
  margin:0;
}

/* Approved theme design: illustration-led eight-card row */
.theme-panel{
  min-height:0;
  display:block;
  padding:28px 28px 30px;
}
.theme-panel .theme-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
}
.theme-panel .theme-heading p{
  max-width:660px;
}
.theme-panel .theme-all-link{
  flex:0 0 auto;
  align-self:auto;
  margin:0 0 2px;
}
.theme-panel .theme-icons{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:10px;
  margin:22px 0 0;
}
.theme-icons button{
  min-width:0;
  min-height:188px;
  padding:12px 8px 14px;
  border:1px solid rgba(28,67,92,.10);
  border-radius:14px;
  background:#fffdfa;
  text-align:center;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.theme-icons button:hover{
  transform:translateY(-2px);
  border-color:rgba(28,67,92,.24);
  box-shadow:0 7px 18px rgba(33,67,86,.08);
}
.theme-art{
  display:block;
  width:96px;
  height:102px;
  margin:0 auto 9px;
  border-radius:49% 49% 47% 47% / 45% 45% 54% 54%;
  overflow:hidden;
  background-repeat:no-repeat;
  background-size:800% 100%;
  background-color:transparent;
  box-shadow:none;
}
.theme-icons b{
  display:block;
  margin-top:2px;
  font-size:11.5px;
  line-height:1.4;
  color:#173b5d;
}
.theme-icons small{
  display:block;
  max-width:11em;
  margin:6px auto 0;
  font-size:9.2px;
  line-height:1.55;
  color:#667787;
  font-weight:500;
}

/* ============================================================
   JOURNEY LENS — compact horizontal strip from approved mockup
   ============================================================ */
.lens-world{
  min-height:188px;
  margin-top:0;
  margin-bottom:28px;
  padding:25px 24px;
  display:grid;
  grid-template-columns:minmax(280px,.38fr) minmax(0,.62fr);
  gap:30px;
  align-items:center;
  border:0;
  border-radius:14px;
  background:#f8f3e8;
  box-shadow:none;
}
.lens-world .section-head{
  display:block;
  margin:0;
  padding:0;
}
.lens-head h2{
  margin:0;
  font-size:18px;
  line-height:1.35;
  letter-spacing:0;
}
.lens-head p{
  margin:8px 0 0;
  max-width:35em;
  font-size:10.5px;
  line-height:1.7;
  color:#525e68;
}
.lens-head .section-link{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-top:16px;
  padding:8px 13px;
  border:1px solid rgba(11,44,87,.55);
  border-radius:5px;
  background:#fff;
  font-size:10.5px;
  font-weight:700;
}
.lens-head .section-link span{
  margin-left:2px;
  font-size:15px;
}
.lens-rail{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(78px,1fr);
  gap:8px;
  overflow:hidden;
  padding:0;
  align-items:stretch;
}
.lens-card{
  min-width:0;
  border:0;
  border-radius:5px;
  box-shadow:none;
  background:transparent;
  overflow:hidden;
}
.lens-card:nth-child(n+7){display:none}
.lens-card__art{
  height:108px;
  border-radius:5px;
  overflow:hidden;
  background:#e8eef0;
}
.lens-card__art img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.lens-card__body{display:none}

/* About follows JOURNEY LENS */
.about-note{
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:42px;
  align-items:start;
  margin-top:0;
  padding:36px 24px 44px;
  border-top:1px solid var(--line);
}
.about-note strong{
  font-size:var(--top-section-title);
  line-height:1.35;
  font-weight:700;
  letter-spacing:0;
}
.about-note p{
  max-width:1080px;
  margin:1px 0 0;
  font:500 12px/1.85 var(--jp);
  color:#405364;
}
.about-note p span{display:block}

/* JOURNEY LENS-like colophon structure, ATLAS palette */
.atlas-colophon{
  background:var(--paper);
  color:var(--ink);
  padding:clamp(38px,6vh,62px) clamp(18px,5vw,80px);
  border-top:1px solid var(--line);
}
.atlas-colophon .colophon-grid{
  max-width:1240px;
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:34px;
  flex-wrap:wrap;
}
.atlas-colophon .mark{
  font-family:var(--sans);
  font-weight:700;
  letter-spacing:.3em;
  text-transform:uppercase;
  font-size:.95rem;
}
.atlas-colophon .mark-tag{
  display:block;
  margin-top:9px;
  font-family:var(--jp);
  font-weight:400;
  letter-spacing:.04em;
  text-transform:none;
  font-size:.84rem;
  line-height:1.6;
  color:#657485;
}
.atlas-colophon .meta{
  font-family:var(--sans);
  font-size:.66rem;
  letter-spacing:.07em;
  line-height:1.95;
  color:#667483;
  text-align:right;
}
.atlas-colophon .meta-note{opacity:.68}
.atlas-colophon .meta-links{display:inline-flex;gap:22px;justify-content:flex-end}
.atlas-colophon a{color:inherit}
.atlas-colophon a:hover{color:var(--ink)}

@media(max-width:1050px){
  .top-header nav{gap:18px;font-size:12px}
  .top-hero{grid-template-columns:minmax(405px,.44fr) minmax(0,.56fr);gap:20px}
  .hero-copy h1{font-size:38px}
  .detail-panel{grid-template-columns:minmax(220px,.38fr) minmax(0,.62fr);column-gap:28px}
  .theme-panel{display:block;min-height:0}
  .theme-panel .theme-icons{grid-template-columns:repeat(4,minmax(0,1fr))}
  .theme-icons button{min-height:184px}
  .lens-world{grid-template-columns:minmax(240px,.42fr) minmax(0,.58fr);padding:22px}
  .lens-rail{grid-auto-columns:minmax(72px,1fr)}
  .about-note{grid-template-columns:220px minmax(0,1fr);gap:30px}
  .about-note p span{display:inline}
  .about-note p span+span:before{content:" ";}
}

@media(max-width:760px){
  .shell{width:min(100% - 28px,1460px)}
  .top-header{min-height:68px;grid-template-columns:1fr auto}
  .top-header nav a{display:none}
  .top-header nav a:first-child{display:block}
  .brand-block small{display:none}

  .top-hero{display:block;min-height:0;padding:14px 0 14px}
  .hero-copy{padding:10px 0 20px}
  .hero-copy h1{font-size:clamp(29px,8.1vw,38px);line-height:1.25}
  .hero-title span{white-space:nowrap}
  .hero-copy .lead{font-size:13.5px;line-height:1.85;margin-top:17px}
  .hero-visual{padding-bottom:22px}

  .explore{grid-template-columns:1fr;padding:10px 0 28px;gap:12px}
  .explore-card{display:grid;grid-template-columns:36% 64%}
  .explore-card__art{height:100%;min-height:108px}
  .explore-card__copy{min-height:108px;padding:12px}
  .explore-card__copy h2{font-size:15px}
  .explore-card__copy p{font-size:11px}

  .countries{padding:20px 16px 18px}
  .countries .section-head{align-items:flex-start;gap:16px;padding-bottom:16px}
  .countries .section-head h2,.detail-heading h2,.about-note strong{font-size:18px}
  .countries .section-head p,.detail-heading p{font-size:11px}

  .detail-panel{display:block;min-height:0;padding:20px 18px}
  .map-panel .mini-map{height:190px;margin-top:16px}
  .theme-panel{display:block;min-height:0;padding:20px 16px}
  .theme-panel .theme-heading{display:block}
  .theme-panel .theme-all-link{margin-top:12px}
  .theme-panel .theme-icons{margin-top:18px;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .theme-icons button{min-height:180px;padding:10px 7px 12px}
  .theme-art{width:88px;height:94px;margin-bottom:8px}
  .theme-icons b{font-size:11px}
  .theme-icons small{font-size:8.8px}
  .detail-panel .detail-link{margin-top:14px}

  .lens-world{
    min-height:0;
    grid-template-columns:1fr;
    gap:16px;
    padding:20px 16px;
  }
  .lens-rail{
    overflow-x:auto;
    grid-auto-columns:94px;
    justify-content:start;
  }
  .lens-card:nth-child(n+7){display:block}
  .lens-card__art{height:96px}

  .about-note{grid-template-columns:1fr;gap:10px;padding:28px 16px 34px}
  .about-note p{font-size:11.5px;max-width:none}
  .about-note p span{display:inline}
  .about-note p span+span:before{content:" ";}

  .atlas-colophon .meta{text-align:left}
  .atlas-colophon .meta-links{justify-content:flex-start}
}

/* ============================================================
   JOURNEY LENS — quiet, user-controlled photo rail
   ============================================================ */
.lens-rail-tools{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin:0 0 8px;
}
.lens-rail-tools button{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid rgba(23,59,93,.18);
  border-radius:50%;
  background:rgba(255,255,255,.72);
  color:#173b5d;
  font:500 17px/1 "Hanken Grotesk",sans-serif;
  cursor:pointer;
}
.lens-rail-tools button:hover:not(:disabled){
  border-color:rgba(23,59,93,.38);
  background:#fff;
}
.lens-rail-tools button:focus-visible{
  outline:2px solid #173b5d;
  outline-offset:2px;
}
.lens-rail-tools button:disabled{
  opacity:.28;
  cursor:default;
}
.lens-rail{
  display:block;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  padding:2px 2px 10px;
  scroll-snap-type:x proximity;
  scroll-padding-inline:2px;
  overscroll-behavior-inline:contain;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.lens-rail::-webkit-scrollbar{display:none}
.lens-rail:focus-visible{
  outline:1px solid rgba(23,59,93,.38);
  outline-offset:4px;
  border-radius:8px;
}
.lens-rail__track{
  display:flex;
  width:max-content;
  min-width:100%;
  gap:14px;
  padding-right:clamp(32px,6vw,80px);
}
.lens-rail .lens-card,
.lens-rail .lens-card:nth-child(n){
  display:block;
  flex:0 0 clamp(202px,18vw,220px);
  min-width:0;
  scroll-snap-align:start;
  border:1px solid rgba(11,44,87,.08);
  border-radius:8px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 2px 8px rgba(11,44,87,.05);
  transition:transform .18s ease,box-shadow .18s ease;
}
@media(hover:hover){
  .lens-rail .lens-card:hover{
    transform:translateY(-2px);
    box-shadow:0 7px 18px rgba(11,44,87,.09);
  }
}
.lens-card__art{
  height:auto;
  aspect-ratio:3 / 2;
  border-radius:0;
  background:#e5eceb;
}
.lens-card__art.is-image-missing{
  background:
    linear-gradient(135deg,rgba(18,54,92,.06),rgba(117,130,78,.08)),
    #edf1ed;
}
.lens-card__art img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.lens-card__body{
  display:block;
  min-height:78px;
  padding:10px 11px 11px;
}
.lens-card__body h3{
  margin:0;
  overflow:hidden;
  color:#173b5d;
  font-size:10.5px;
  line-height:1.3;
  letter-spacing:.055em;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.lens-card__body small{
  display:block;
  margin-top:2px;
  color:#7a858e;
  font-size:8.5px;
  line-height:1.35;
}
.lens-card__body p{
  margin:7px 0 0;
  overflow:hidden;
  color:#405364;
  font-size:9.5px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.lens-card__fallback-title{
  margin:0!important;
  font-weight:600;
  white-space:normal!important;
}
.lens-card:focus-visible{
  outline:2px solid #173b5d;
  outline-offset:2px;
}
.lens-rail__error{
  margin:0;
  padding:20px 0;
  color:#657485;
  font-size:10px;
}
@media(max-width:760px){
  .lens-rail-tools{display:none}
  .lens-rail{
    margin-right:calc(var(--page-gutter,20px) * -1);
    padding-right:var(--page-gutter,20px);
    scroll-snap-type:x mandatory;
  }
  .lens-rail__track{
    gap:10px;
    padding-right:18vw;
  }
  .lens-rail .lens-card,
  .lens-rail .lens-card:nth-child(n){
    flex-basis:min(62vw,220px);
  }
  .lens-card__body{
    min-height:72px;
    padding:9px 10px 10px;
  }
}
@media(prefers-reduced-motion:reduce){
  .lens-rail .lens-card{
    transition:none;
  }
}


/* Full-width LENS composition: heading above, photo rail across the section. */
.lens-world{
  display:block;
  min-height:0;
  padding:28px 24px 30px;
}
.lens-world .section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
}
.lens-head .section-link{
  flex:none;
  margin-top:0;
}
.lens-rail-tools{
  margin-top:20px;
}
.lens-rail__track{
  min-width:100%;
}
.lens-rail .lens-card,
.lens-rail .lens-card:nth-child(n){
  flex-basis:clamp(210px,20vw,260px);
}
@media(max-width:760px){
  .lens-world{
    padding:20px 16px 22px;
  }
  .lens-world .section-head{
    display:block;
  }
  .lens-head .section-link{
    margin-top:16px;
  }
  .lens-rail{
    margin-top:16px;
  }
  .lens-rail .lens-card,
  .lens-rail .lens-card:nth-child(n){
    flex-basis:min(62vw,220px);
  }
}


.lens-count{
  display:block;
  margin-top:9px;
  color:#9a856d;
  font:600 9px/1.3 "Hanken Grotesk",sans-serif;
  letter-spacing:.16em;
}


/* Theme selection stays in place and reveals results directly below the theme cards. */
.theme-icons button.is-active,
.theme-icons button[aria-pressed="true"]{
  transform:translateY(-2px);
  border-color:rgba(23,59,93,.52);
  background:#fff;
  box-shadow:0 7px 18px rgba(33,67,86,.10);
}
.theme-icons button.is-active b,
.theme-icons button[aria-pressed="true"] b{
  color:#173b5d;
}
.theme-results{
  margin-top:24px;
  padding-top:22px;
  border-top:1px solid rgba(23,59,93,.12);
}
.theme-results[hidden]{display:none!important}
.theme-results__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:16px;
}
.theme-results__head h3{
  margin:2px 0 0;
  color:#173b5d;
  font-size:18px;
  line-height:1.35;
}
.theme-results__head p{
  margin:5px 0 0;
  color:#7a858e;
  font-size:9.5px;
  line-height:1.4;
}
.theme-results__actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.theme-results__search{
  min-width:240px;
}
.theme-results__actions>button{
  height:38px;
  padding:0 12px;
  border:1px solid rgba(23,59,93,.14);
  border-radius:7px;
  background:#f8f5ee;
  color:#667787;
  font-size:9.5px;
  cursor:pointer;
}
.theme-results__actions>button:hover{
  border-color:rgba(23,59,93,.28);
  background:#fff;
  color:#173b5d;
}
.theme-results__actions>button:focus-visible{
  outline:2px solid #173b5d;
  outline-offset:2px;
}
.theme-results__grid{
  margin-top:0;
}
@media(max-width:760px){
  .theme-results{
    margin-top:18px;
    padding-top:18px;
  }
  .theme-results__head{
    display:block;
  }
  .theme-results__actions{
    margin-top:12px;
    align-items:stretch;
    flex-direction:column;
  }
  .theme-results__search{
    min-width:0;
    width:100%;
  }
  .theme-results__actions>button{
    align-self:flex-start;
  }
}
