/* =============================================================================
   SECTION — THINGS TO DO, INDEX

   The home page's card in a grid, sorted by tabs. What was here before was a
   row per guide with a one-line excerpt, which read as a caption rather than
   a reason to click.

   THE CARD IS NOT REDEFINED HERE. .todo-card, .todo-body, .todo-ico,
   .todo-more and the scrim all come from sections/things-to-do.css, which
   this page now loads - the same card the home page uses, not a copy of it.
   What follows is the tab row, the grid, and the three things a grid needs
   that a horizontal rail does not.
   ========================================================================== */
.ti-list{
  background:var(--cream);
  color:var(--ink);
  padding-block:clamp(36px,4.2vw,64px);
}

/* ---------------------------------------------------------------------------
   TABS
   Ships hidden; todo-tabs.js unhides it. Scrolls sideways on a phone rather
   than wrapping to three rows - the same choice the FAQ's category nav makes.
   --------------------------------------------------------------------------- */
.ti-tabs{
  display:flex;gap:var(--space-xs);
  margin:0 0 clamp(24px,2.8vw,38px);
  padding-bottom:2px;
  border-bottom:1px solid rgba(40,52,38,.16);
  overflow-x:auto;
  scrollbar-width:none;
}
.ti-tabs::-webkit-scrollbar{display:none}
.ti-tabs [role="tab"]{
  display:inline-flex;align-items:center;gap:8px;
  flex:0 0 auto;
  padding:11px 16px;
  border:0;border-bottom:2px solid transparent;
  margin-bottom:-3px;          /* sit the underline on the rule, not above it */
  background:none;cursor:pointer;
  font-family:var(--font-body);
  font-size:11.5px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-label);text-transform:uppercase;
  color:var(--ink-soft);
  white-space:nowrap;
  transition:color .25s ease,border-color .25s ease;
}
.ti-tabs [aria-selected="true"]{
  color:var(--forest);
  border-bottom-color:var(--rust);
}
.ti-tabs [role="tab"]:focus-visible{outline:2px solid var(--rust-deep);outline-offset:-2px}
/* NOT --ink-soft. The pill's own 9% tint darkens the ground under its digits
   to [226,223,212], where --ink-soft measures 4.43:1 - just under. #4a5447 is
   5.9:1 on the same pill and is the shade the cabin calendar already uses for
   exactly this job: a quiet state that still has to be read. */
.ti-tab-n{
  font-size:10px;
  padding:2px 6px;
  border-radius:999px;
  background:rgba(40,52,38,.09);
  color:#4a5447;
  letter-spacing:.04em;
}
.ti-tabs [aria-selected="true"] .ti-tab-n{background:rgba(185,91,53,.16);color:var(--rust-deep)}

/* ---------------------------------------------------------------------------
   THE HEADING
   --------------------------------------------------------------------------- */
.ti-head{max-width:720px;margin-bottom:clamp(22px,2.6vw,36px)}
.ti-head h2{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(28px,3vw,44px);
  line-height:1.1;font-weight:var(--fw-medium);letter-spacing:-.012em;
  color:var(--forest);
}
.ti-head-sub{
  margin:clamp(10px,1.2vw,16px) 0 0;
  font-family:var(--font-body);
  font-size:clamp(15px,1.15vw,17px);line-height:var(--lh-body);
  color:var(--ink-soft);
}

/* ---------------------------------------------------------------------------
   THE GRID
   The card used to be the home rail's - six lines of copy burned over the
   photograph - which on a listing read as a dark slab with the words
   squeezed into it. It is a panel now: the photograph on top carrying the
   season and the icon, the copy on white below at a comfortable measure,
   and a footer that says which of our cabins it suits.
   --------------------------------------------------------------------------- */
.ti-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(14px,1.6vw,24px);
}
.ti-grid:focus-visible{outline:2px solid var(--rust-deep);outline-offset:6px}
.ti-card{
  display:flex;flex-direction:column;
  background:var(--white);
  border:1px solid rgba(40,52,38,.12);
  border-radius:var(--r-card);
  overflow:hidden;
  transition:transform .45s var(--ease-out),box-shadow .45s ease,border-color .3s ease;
}
.ti-card[hidden]{display:none}
.ti-card-media{
  position:relative;display:block;
  aspect-ratio:5/4;
  overflow:hidden;
  background:#e8e2d6;
}
.ti-card-media img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;display:block;
  transition:transform 1.2s var(--ease-out);
}
/* a quiet floor so the season chip never sits on bright sky */
.ti-card-media::after{
  content:"";position:absolute;inset:auto 0 0 0;height:45%;
  background:linear-gradient(180deg,rgba(8,22,14,0),rgba(8,22,14,.42));
}
.ti-card-season{
  position:absolute;z-index:1;left:14px;bottom:14px;
  padding:6px 11px 5px;
  background:rgba(8,22,16,.82);
  border-radius:var(--r-ctl);
  font-family:var(--font-body);
  font-size:9.5px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-kicker);text-transform:uppercase;
  color:#fff;
}
/* The icon belongs to the body and is pulled up over the photograph's lower
   edge with a negative margin, so the photograph keeps overflow:hidden for
   its hover zoom and the icon is never clipped by it. */
.ti-card-ico{
  position:relative;z-index:1;
  align-self:flex-end;
  width:46px;height:46px;margin:calc(-23px - clamp(18px,1.8vw,24px)) 0 calc(clamp(18px,1.8vw,24px) - 23px);
  border-radius:var(--r-round);
  display:grid;place-items:center;
  background:var(--white);
  box-shadow:0 6px 18px -8px rgba(13,42,32,.45);
}
.ti-card-ico svg{width:22px;height:22px;fill:none;stroke:var(--rust-deep);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ti-card-body{
  display:flex;flex-direction:column;flex:1 1 auto;
  padding:clamp(18px,1.8vw,24px) clamp(18px,1.6vw,22px) clamp(16px,1.6vw,20px);
}
.ti-card-cats{
  display:block;
  font-family:var(--font-body);
  font-size:10px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-kicker);text-transform:uppercase;
  color:var(--rust-deep);
  padding-right:48px;            /* clear of the icon */
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ti-card h3{
  margin:8px 0 0;
  font-family:var(--font-display);
  font-size:clamp(21px,1.7vw,25px);
  line-height:1.18;font-weight:var(--fw-medium);
  color:var(--forest);
  transition:color .3s ease;
}
.ti-card p{
  margin:10px 0 0;flex:1 1 auto;
  font-family:var(--font-body);
  font-size:14px;line-height:1.6;
  color:#4a5547;
}
.ti-card-foot{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;
  margin-top:clamp(16px,1.6vw,20px);padding-top:clamp(12px,1.2vw,16px);
  border-top:1px solid rgba(40,52,38,.1);
}
.ti-card-more{
  display:inline-flex;align-items:center;gap:9px;
  font-family:var(--font-body);
  font-size:11px;font-weight:var(--fw-bold);
  letter-spacing:.13em;text-transform:uppercase;
  color:var(--rust-deep);
}
.ti-card-more svg{width:20px;height:8px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s var(--ease-out)}
.ti-card-suits{font-family:var(--font-body);font-size:12px;color:var(--ink-soft)}
.ti-card:focus-visible{outline:2px solid var(--rust-deep);outline-offset:3px}
@media (hover:hover) and (pointer:fine){
  .ti-card:hover{transform:translateY(-4px);box-shadow:0 24px 44px -28px rgba(13,42,32,.5);border-color:rgba(139,55,29,.28)}
  .ti-card:hover .ti-card-media img{transform:scale(1.05)}
  .ti-card:hover h3{color:var(--rust-deep)}
  .ti-card:hover .ti-card-more svg{transform:translateX(4px)}
}

.ti-count{
  margin:clamp(18px,2vw,26px) 0 0;
  font-family:var(--font-body);
  font-size:12px;font-weight:var(--fw-semi);
  letter-spacing:.04em;
  color:var(--ink-soft);
}

/* counted columns, not auto-fill, for the same reason as the cabin cards */
@media (max-width:1199px){.ti-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:899px){.ti-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.ti-grid{grid-template-columns:minmax(0,1fr)}}

@media (prefers-reduced-motion:reduce){
  .ti-tabs [role="tab"]{transition:none}
  .ti-card,.ti-card-media img,.ti-card-more svg{transition:none}
  .ti-card:hover{transform:none}
  .ti-card:hover .ti-card-media img{transform:none}
}
