/* =========================================================================
   SECTION — THINGS TO DO IN HELEN
   Dark forest header over a topographic texture, a six-card activity rail,
   and a mountain footer band carrying the signpost and the booking CTA.
   ========================================================================= */
.todo{
  position:relative;
  background:#12281c;
  color:#fff;
  overflow:hidden;
  padding-top:clamp(56px,5.4vw,78px);
}
.todo::before{                       /* topographic texture + corner forest */
  content:"";
  position:absolute;left:0;right:0;top:0;
  aspect-ratio:1400/262;height:auto;
  background-image:url("../../img/discover-helen-bg.jpg");
  background-size:100% 100%;
  background-position:center top;
  opacity:.95;
  -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 58%,transparent 100%);
          mask-image:linear-gradient(180deg,#000 0%,#000 58%,transparent 100%);
}
.todo::after{                        /* keeps the type off the busy corners */
  content:"";
  position:absolute;left:0;right:0;top:0;
  aspect-ratio:1400/262;height:auto;
  background:linear-gradient(180deg,rgba(10,26,18,.30) 0%,rgba(10,26,18,.10) 44%,rgba(10,26,18,0) 100%);
}
.todo > .wrap,.todo > .todo-rail,.todo > .todo-foot{position:relative;z-index:2}

/* ---- header ---- */
.todo-head{text-align:center;max-width:940px;margin-inline:auto}
.todo-kicker{
  display:flex;align-items:center;justify-content:center;gap:18px;
  margin:0;
  font-family:var(--font-body);
  font-size:11px;font-weight:700;letter-spacing:.28em;line-height:1.4;
  text-transform:uppercase;color:rgba(255,255,255,.9);
}
.todo-kicker::before,.todo-kicker::after{content:"";width:60px;height:1px;background:rgba(255,255,255,.5)}
.todo h2{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(33px,4vw,61px);
  line-height:1.07;letter-spacing:-.016em;font-weight:500;
  text-shadow:0 3px 20px rgba(6,18,12,.5);
}
.todo h2 span{display:block}
.todo .todo-kicker{margin:0 0 16px}
.todo h2 .gold{color:#cd996d}
.todo-sub{
  margin:18px auto 0;max-width:640px;
  font-family:var(--font-body);
  font-size:clamp(17px,1.35vw,21px);line-height:1.42;
  color:rgba(255,255,255,.94);
  text-shadow:0 2px 14px rgba(6,18,12,.6);
}
.todo-script{
  position:absolute;z-index:3;
  right:clamp(16px,3vw,52px);top:clamp(70px,7.4vw,108px);
  width:min(250px,20%);
  text-align:center;color:#e9e6da;
}
.todo-script span{
  display:block;
  font-family:var(--font-display);font-style:italic;
  font-size:clamp(18px,1.61vw,25px);line-height:1.28;
  text-shadow:0 2px 14px rgba(6,18,12,.7);
}
.todo-script svg{display:block;width:74%;margin:6px auto 0;height:11px;stroke:#d8d3c4;stroke-width:1.7;fill:none;stroke-linecap:round}

/* ---- activity rail ---- */
/* A scroller rather than a fixed grid. Seven cards no longer have to fit the
   viewport, so attractions can be added without the row re-flowing, and the
   cards keep the width they had in the six-column grid. */
.todo-rail{
  --todo-gap:clamp(10px,1vw,14px);
  width:min(1460px,100% - 48px);
  margin:clamp(34px,3.4vw,50px) auto 0;
  display:flex;gap:var(--todo-gap);
  overflow-x:auto;scroll-snap-type:x proximity;scroll-behavior:smooth;
  scroll-padding-inline:0;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:var(--space-2xs);
}
.todo-rail::-webkit-scrollbar{display:none}
.todo-rail > .todo-card{flex:0 0 clamp(214px,17.2vw,250px);scroll-snap-align:start}

/* ---- rail controls ---- */
.todo-railwrap{
  position:relative;
  /* the rail reserves a little room under the cards for the hidden
     scrollbar; the arrows centre on the cards, not on that */
  --rail-padb:4px;
}
.todo-arrow{
  position:absolute;top:calc((100% - var(--rail-padb,0px)) / 2);
  transform:translateY(-50%);z-index:4;
  width:46px;height:46px;border-radius:var(--r-round);padding:0;cursor:pointer;
  display:grid;place-items:center;
  background:rgba(8,20,14,.72);border:1px solid rgba(240,235,222,.34);color:#f0ebde;
  transition:background .3s ease,opacity .3s ease,border-color .3s ease;
}
.todo-arrow svg{width:17px;height:17px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.todo-arrow:hover{background:rgba(8,20,14,.92);border-color:rgba(240,235,222,.6)}
.todo-arrow:focus-visible{outline:2px solid #f0ebde;outline-offset:3px}
.todo-arrow[disabled]{opacity:0;pointer-events:none}
.todo-prev{left:4px}
.todo-next{right:4px}
@media (hover:none){.todo-arrow{display:none}}
.todo-card{
  position:relative;display:block;
  aspect-ratio:240/457;
  border-radius:var(--r-card);overflow:hidden;
  background:#0d2016;
  border:1px solid rgba(255,255,255,.10);
  color:#fff;
  transition:transform .5s cubic-bezier(.22,.61,.36,1),border-color .4s ease;
}
.todo-card:hover{transform:translateY(-6px);border-color:rgba(205,153,109,.55)}
.todo-card img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;
  transition:transform 1.4s cubic-bezier(.22,.61,.36,1);
}
.todo-card:hover img{transform:scale(1.05)}
/* The scrim starts its ramp at 24%, not 34%, and reaches .88 by 68%.

   The old stops put only ~.45 of cover where the text begins - the body is
   bottom-anchored and its top lands around 52% of the card - which was fine
   on six of these photographs because they are already dark down there
   (forest, river, dusk storefronts) and the scrim merely deepened black on
   black. The wedding shot is the exception: a bride's white dress sits
   exactly behind the headline, so the same scrim left it showing through and
   that one card read as though it had no fade at all.

   Measured as white text over the real photograph with the copy hidden, the
   worst case on the rail went from 10.22:1 to 14.62:1, and the spread across
   the five visible cards tightened from 10.2-18.1 to 14.6-18.4. The darker
   cards barely change, since they were already near black. Nothing here is
   per-card: one gradient, applied to all of them, chosen so the brightest
   photograph in the set still holds its text. */
.todo-card::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,
    rgba(8,22,14,0)   24%,
    rgba(8,22,14,.52) 45%,
    rgba(8,22,14,.88) 68%,
    rgba(8,22,14,.96) 100%);
}
.todo-body{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:0 18px 18px}
.todo-ico{
  width:44px;height:44px;border-radius:var(--r-round);
  border:1px solid rgba(255,255,255,.72);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:var(--space-md);
}
.todo-ico svg{width:21px;height:21px;stroke:#fff;stroke-width:1.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
/* ---- why these two have a reserved height -------------------------------
   .todo-body is anchored to the bottom of the card, so its height is set by
   however many lines the copy happens to wrap to - and everything above the
   copy floats on top of that. Measured at 1440px, the rail had THREE
   different baselines at once: the icon sat at 244px on the card with
   three-line copy, 264px on the five with two lines, and 284px on the one
   with a single line. A 40px spread, with no rule behind it other than
   sentence length.

   It also moved with the viewport. At 1180px it was Wander and Family that
   floated out of line; at 390px it was Weddings and Hit the Trails. So this
   was never one bad card - any card whose copy rewraps leaves the row, and
   which ones those are changes with the window.

   Reserving the tallest case makes every body the same height, and because
   they are bottom-anchored that lines up the icon, the title, the copy and
   EXPLORE across the whole rail at every width. In em, so it follows the
   font-size rather than needing a value per breakpoint.

   The reserved height is given in `lh` - the element's own computed
   line-height - rather than a number copied from the line-height property.
   That is not pedantry: the first attempt used calc(3 * 1.45em) to match the
   1.45 declared right here, and it left the Weddings card 6px out, because
   the typography block further down the stylesheet re-declares this same
   selector at 1.6. Three lines were really 60px, not 54.4. Anything that
   restates a value another rule owns will drift the moment that rule moves;
   `lh` reads whatever actually won. The em value above it is only a fallback
   for engines without the unit, and is deliberately the effective 1.6.

   CMS NOTE: copy longer than three lines still grows the block and will
   break the row again. Card copy wants to stay at or under three lines.
   Nothing is clamped here on purpose - silently truncating the owner's
   words is worse than a 20px misalignment. */
.todo-card h3{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(18px,1.43vw,22px);line-height:1.2;font-weight:500;
  min-height:calc(2 * 1.2em);   /* fallback */
  min-height:2lh;
}
.todo-card p{
  margin:10px 0 0;
  font-family:var(--font-body);
  font-size:12.5px;line-height:1.45;
  color:rgba(240,240,232,.84);
  min-height:calc(3 * 1.6em);   /* fallback: 1.6 is what actually applies */
  min-height:3lh;
}
.todo-more{
  display:inline-flex;align-items:center;gap:10px;
  margin-top:var(--space-md);
  font-family:var(--font-body);
  font-size:10px;font-weight:700;letter-spacing:.19em;text-transform:uppercase;
  color:#fff;
}
.todo-more svg{width:20px;height:8px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round;transition:transform .4s ease}
.todo-card:hover .todo-more svg{transform:translateX(5px)}

/* ---- mountain footer band ---- */
.todo-foot{
  position:relative;
  margin-top:clamp(10px,1.1vw,16px);
  min-height:clamp(240px,18.5vw,288px);
  display:flex;align-items:center;justify-content:center;
  background-image:url("../../img/things-to-do-footer-bg.jpg");
  background-size:cover;background-position:center bottom;background-repeat:no-repeat;
}
.todo-foot::before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(12,40,28,.62) 0%,rgba(12,40,28,.12) 32%,rgba(12,40,28,0) 100%);
}
.todo-foot-in{position:relative;z-index:2;text-align:center;padding:clamp(30px,3.4vw,48px) 20px}
.todo-peaks{display:block;width:74px;margin:0 auto 16px;stroke:#cd996d;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.todo-foot-line{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(19px,1.79vw,27px);line-height:1.28;font-weight:500;color:#fff;
  text-shadow:0 2px 16px rgba(6,18,12,.72);
}
.todo-foot .btn{margin-top:20px;background:#8e3e25;border-color:#8e3e25;color:#fff}
.todo-foot .btn:hover{background:#7a3420;border-color:#7a3420}
.todo-foot-script{
  position:absolute;z-index:3;right:clamp(16px,3vw,54px);top:clamp(24px,3vw,44px);
  width:min(210px,20%);text-align:center;color:#efe9dc;
}
.todo-foot-script span{
  display:block;
  font-family:var(--font-display);font-style:italic;
  font-size:clamp(18px,1.47vw,23px);line-height:1.28;
  text-shadow:0 2px 14px rgba(6,18,12,.8);
}
.todo-foot-script svg{display:block;width:78%;margin:4px auto 0;height:12px;stroke:#e2dbc9;stroke-width:1.7;fill:none;stroke-linecap:round}

/* ---- responsive ---- */
@media (max-width:1180px){
  .todo-rail{width:min(1000px,100% - 48px)}
  .todo-rail > .todo-card{flex:0 0 clamp(206px,26vw,300px)}
  .todo-card{aspect-ratio:300/400}
  .todo-script{position:static;width:auto;margin:22px auto 0}
  .todo-foot-script{position:static;width:auto;margin:0 auto 6px}
  .todo-foot{
    flex-direction:column;justify-content:flex-end;
    padding-top:clamp(30px,5vw,52px);
    min-height:clamp(300px,42vw,360px);
  }
  .todo-foot-in{padding-top:clamp(14px,2.4vw,26px)}
}
@media (max-width:820px){
  .todo-rail > .todo-card{flex:0 0 clamp(200px,36vw,290px)}
  .todo-card{aspect-ratio:320/380}
}
@media (max-width:560px){
  /* six tall cards would be a wall — swipe instead */
  .todo-rail{
    gap:var(--space-sm);width:auto;scroll-snap-type:x mandatory;
    padding-inline:var(--gutter);scroll-padding-inline:var(--gutter);padding-bottom:10px;
  }
  .todo-railwrap{--rail-padb:10px}
  /* Scoped to the rail's own children. Every property here is a rail
     concern - a flex basis, a swipe snap point, and a width cap that only
     makes sense next to them - and the things-to-do index now puts this same
     card in a grid, where the 280px cap left a 70px gap down the side of a
     phone. The home page is unaffected: its cards ARE rail children. */
  .todo-rail > .todo-card{flex:0 0 70vw;max-width:280px;aspect-ratio:260/380;scroll-snap-align:center}
  .todo-body{padding:0 16px 16px}
  .todo-ico{width:38px;height:38px;margin-bottom:var(--space-sm)}
  .todo-kicker::before,.todo-kicker::after{width:26px}
}
