/* Homepage only. Existing tokens, navigation and public route pages stay shared. */
.home-page .public-header { max-width: none; padding-inline: max(24px, calc((100vw - 1280px) / 2)); }
.home-page .public-header .public-brand { font-size: 1.5rem; text-decoration: none; }
.home-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-hero { position: relative; isolation: isolate; background: var(--trilho-forest); color: var(--trilho-surface); }
.home-hero-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 62% 43%; }
.home-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(13 25 19 / 88%) 0%, rgb(13 25 19 / 65%) 43%, rgb(13 25 19 / 12%) 100%); }
.home-hero-inner { max-width: 1280px; margin: auto; padding: clamp(56px, 6vw, 88px) 24px 64px; }
.home-hero h1 { margin: 20px 0; font-size: clamp(3rem, 5.8vw, 5.5rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 600; }
.home-hero h1 em, .home-feature h2 em { font-family: var(--trilho-font-editorial); font-weight: 400; }
.home-intro { margin: 24px 0 30px; font-size: 1.125rem; max-width: 35ch; }
.home-search { max-width: 610px; }
.home-search-row { display: flex; padding: 6px; gap: 6px; background: var(--trilho-surface); border-radius: var(--trilho-radius-control); }
.home-search-row .trilho-input { border: 0; flex: 1; width: 0; }
.home-search-row .trilho-button { flex-shrink: 0; }
.home-activities { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; border: 0; }
.home-activities label { position: relative; }
.home-activities input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.home-activities span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 1px solid rgb(255 255 255 / 50%); border-radius: var(--trilho-radius-control); cursor: pointer; background: rgb(13 25 19 / 65%); font-size: .875rem; }
.home-activities input:checked + span { color: var(--trilho-forest); background: var(--trilho-surface); border-color: var(--trilho-surface); }
.home-activities input:disabled + span { opacity: .5; cursor: not-allowed; }
.home-activities input:focus-visible + span { outline: 3px solid var(--trilho-rust); outline-offset: 3px; }
.home-search-help { font-size: .75rem; max-width: 65ch; }
.home-plan { display: inline-flex; gap: 24px; align-items: center; min-height: 48px; color: inherit; text-underline-offset: 6px; font-weight: 500; }
.home-hero-caption { position: absolute; right: 32px; bottom: 24px; font-size: .75rem; letter-spacing: .06em; }
.home-content { max-width: 1280px; padding-inline: 24px; margin: auto; }
.home-section { padding-block: clamp(48px, 6vw, 80px); }
.home-section h2 { margin: 10px 0 24px; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 500; line-height: 1.15; letter-spacing: -.035em; }
.home-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.home-text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 24px; color: var(--trilho-ink); text-decoration-thickness: 1px; text-underline-offset: 5px; font-size: .875rem; font-weight: 600; }
.home-nearby { display: flex; justify-content: space-between; gap: 32px; align-items: center; margin-bottom: 24px; }
.home-nearby > p { color: var(--trilho-muted); font-size: .875rem; max-width: 53ch; margin: 0; }
.home-nearby-form { display: flex; gap: 8px; flex-shrink: 0; }
.home-nearby-form input { max-width: 250px; }
#nearby-summary:not(:empty) { margin-bottom: 16px; }
.home-route-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px; border: 0; }
.home-route-list .public-route-link { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px 0; border-top: 1px solid var(--trilho-ink); border-bottom: 1px solid var(--trilho-border); min-height: 195px; }
.home-route-list .public-route-link > span { margin-top: auto; align-self: flex-end; }
.home-route-list .public-route-link h3 { font-size: 1.45rem; font-weight: 500; letter-spacing: -.02em; margin-block: 12px; }
.home-moods { border-top: 1px solid var(--trilho-border); }
.home-mood-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 32px; }
.home-mood-list a { position: relative; padding: 0 24px; border-left: 1px solid var(--trilho-border); color: inherit; text-decoration: none; }
.home-mood-list a:first-child { border: 0; padding-left: 0; }
.home-mood-number { font-size: .75rem; color: var(--trilho-muted); }
.home-mood-list h3 { font-family: var(--trilho-font-editorial); font-size: clamp(1.3rem,2.1vw,1.9rem); font-weight: 400; line-height: 1.15; margin: 18px 0 12px; }
.home-mood-list p { font-size: .875rem; color: var(--trilho-muted); }
.home-mood-arrow { display: block; margin-top: 24px; }
.home-mood-list a:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
.home-feature { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--trilho-forest); color: var(--trilho-surface); }
.home-feature figure { margin: 0; position: relative; min-height: 530px; }
.home-feature img { display: block; width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: 50% 50%; }
.home-feature figcaption { position: absolute; bottom: 0; padding: 8px 12px; font-size: .625rem; background: rgb(13 25 19 / 85%); }
.home-feature figcaption a { color: inherit; text-underline-offset: 2px; }
.home-feature-copy { padding: clamp(24px,4vw,56px); align-self: center; }
.home-feature h2 { font-size: clamp(2.5rem,4.5vw,4rem); line-height: 1.1; letter-spacing: -.035em; font-weight: 500; margin: 20px 0; }
.home-feature-copy > p:not(.trilho-eyebrow) { max-width: 34ch; }
.home-feature-copy .trilho-button { margin-top: 16px; }
.home-feature-routes a { display: block; min-height: 44px; padding: 12px 0; border-bottom: 1px solid rgb(255 255 255 / 25%); color: inherit; text-underline-offset: 4px; overflow-wrap: anywhere; }
.home-feature-routes:not(:empty) { margin-top: 24px; }
.home-feature-status { font-size: .75rem; }
.home-notes-aside { font-family: var(--trilho-font-editorial); font-style: italic; color: var(--trilho-muted); }
.home-notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 24px; }
.home-notes-grid article { border-top: 1px solid var(--trilho-border); padding-top: 24px; }
.home-notes-grid h3 { font-family: var(--trilho-font-editorial); font-weight: 400; font-size: 1.75rem; line-height: 1.25; margin-block: 16px; }
.home-notes-grid article > p:not(.trilho-eyebrow) { color: var(--trilho-muted); max-width: 49ch; }
#home-articles-list article { min-width: 0; overflow-wrap: anywhere; }
.home-page .public-footer { max-width: 1232px; border-top: 1px solid var(--trilho-border); padding-inline: 0; }
@media (max-width: 800px) {
  .home-hero-caption { display: none; }
  .home-nearby { align-items: stretch; flex-direction: column; gap: 16px; }
  .home-nearby-form input { flex: 1; max-width: none; }
  .home-feature { grid-template-columns: 1fr; }
  .home-feature figure { min-height: 0; aspect-ratio: 16 / 10; }
  .home-feature-copy { padding: 32px; }
  .home-mood-list { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .home-mood-list a:nth-child(3) { border-left: 0; padding-left: 0; }
  .home-route-list { gap: 20px; }
  .home-page .public-footer { margin-inline: 24px; }
}
@media (max-width: 600px) {
  .home-page .public-header { padding-inline: 20px; }
  .home-page .public-header .public-brand { font-size: 1.2rem; }
  .home-page .public-header .trilho-button { padding-inline: 12px; font-size: .8125rem; }
  .home-hero-inner { padding: 48px 20px 32px; }
  .home-hero-photo { object-position: 63% 42%; }
  .home-hero::after { background: linear-gradient(90deg,rgb(13 25 19 / 88%),rgb(13 25 19 / 55%)); }
  .home-intro { font-size: 1rem; }
  .home-search-row { flex-wrap: wrap; }
  .home-search-row .trilho-input { width: 100%; flex-basis: 100%; }
  .home-search-row .trilho-button { width: 100%; }
  .home-activities { gap: 5px; }
  .home-activities span { padding-inline: 10px; font-size: .8125rem; }
  .home-content { padding-inline: 20px; }
  .home-section-heading { gap: 0 16px; }
  .home-route-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 16px; margin-inline: -4px; }
  .home-route-list .public-route-link { flex: 0 0 84%; scroll-snap-align: start; }
  .home-mood-list a { padding-right: 8px; padding-left: 16px; }
  .home-mood-list h3 { font-size: 1.5rem; }
  .home-notes-grid { grid-template-columns: 1fr; gap: 28px; }
  .home-feature-copy { padding: 28px 24px; }
  .home-feature figcaption { font-size: .5625rem; }
  .home-page .public-footer { margin-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) { .home-route-list { scroll-behavior: auto; scroll-snap-type: none; } }
@media (forced-colors: active) { .home-hero::after { display: none; } .home-activities input:checked + span { outline: 2px solid Highlight; } }
.home-nearby-form .trilho-button { flex-shrink: 0; white-space: nowrap; }

/* ==========================================================
   TRILHO HOMEPAGE — editorial outdoor refinement 2026-09-26
   ========================================================== */

/* Header floats over the opening image: less app, more brand. */
.home-page .public-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  color: #fff;
  background: linear-gradient(180deg, rgb(7 17 12 / 62%), transparent);
  border: 0;
}

.home-page .public-header .public-brand {
  color: inherit;
  font-size: 1.65rem;
  letter-spacing: -.035em;
}

.home-page .public-header a,
.home-page .public-header button {
  color: inherit;
}

.home-page .public-header .trilho-button--secondary {
  border-color: rgb(255 255 255 / 55%);
  background: rgb(9 21 15 / 20%);
  backdrop-filter: blur(8px);
}

/* Opening image should feel like the beginning of a day outside. */
.home-hero {
  min-height: min(860px, 94svh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.home-hero-photo {
  object-position: center 43%;
  transform: scale(1.002);
}

.home-hero::after {
  background:
    linear-gradient(180deg, rgb(6 15 10 / 28%) 0%, transparent 27%),
    linear-gradient(90deg, rgb(7 18 12 / 82%) 0%, rgb(7 18 12 / 60%) 38%, rgb(7 18 12 / 8%) 74%),
    linear-gradient(0deg, rgb(7 18 12 / 42%) 0%, transparent 38%);
}

.home-hero-inner {
  width: 100%;
  padding-top: 160px;
  padding-bottom: clamp(68px, 9vh, 112px);
}

.home-hero .trilho-eyebrow {
  letter-spacing: .09em;
  text-transform: uppercase;
  font-size: .72rem;
}

.home-hero h1 {
  max-width: 820px;
  margin: 18px 0 20px;
  font-size: clamp(3.8rem, 7.4vw, 7.2rem);
  line-height: .93;
  letter-spacing: -.055em;
}

.home-hero h1 em {
  display: inline-block;
  font-weight: 400;
}

.home-intro {
  max-width: 31ch;
  margin: 0 0 30px;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
}

.home-search {
  max-width: 690px;
}

.home-search-row {
  padding: 7px;
  min-height: 62px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 18%);
}

.home-search-row .trilho-input {
  min-height: 48px;
  font-size: 1rem;
  background: transparent;
}

.home-activities {
  margin-top: 12px;
}

.home-activities span {
  background: rgb(8 20 14 / 42%);
  backdrop-filter: blur(7px);
}

.home-search-help {
  margin: 9px 0 0;
  color: rgb(255 255 255 / 76%);
}

.home-plan {
  margin-top: 12px;
  text-decoration: none;
  border-bottom: 1px solid rgb(255 255 255 / 55%);
}

.home-hero-caption {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  bottom: 36px;
  opacity: .78;
}

/* More breathing room. The page becomes a story, not a dashboard. */
.home-content {
  max-width: 1320px;
  padding-inline: clamp(24px, 4vw, 56px);
}

.home-section {
  padding-block: clamp(72px, 9vw, 128px);
}

.home-section-heading {
  align-items: flex-end;
  margin-bottom: 36px;
}

.home-section h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2.25rem, 4.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

/* Routes: editorial selections rather than a wall of app cards. */
.home-nearby {
  padding: 22px 0;
  margin: 0 0 20px;
  border-top: 1px solid var(--trilho-border);
  border-bottom: 1px solid var(--trilho-border);
}

.home-route-list {
  gap: clamp(22px, 3vw, 44px);
}

.home-route-list .public-route-link {
  min-height: 240px;
  padding: 28px 0 24px;
  border-top: 2px solid var(--trilho-ink);
  border-bottom: 0;
  transition: transform 180ms ease;
}

.home-route-list .public-route-link:hover {
  transform: translateY(-3px);
}

.home-route-list .public-route-link h3 {
  max-width: 16ch;
  font-family: var(--trilho-font-editorial);
  font-size: clamp(1.6rem, 2.2vw, 2.15rem);
  font-weight: 400;
  line-height: 1.12;
}

/* Mood selector becomes a calm editorial intermezzo. */
.home-moods {
  margin-inline: calc(clamp(24px, 4vw, 56px) * -1);
  padding-inline: clamp(24px, 4vw, 56px);
  background: color-mix(in srgb, var(--trilho-forest) 5%, var(--trilho-surface));
  border-top: 0;
}

.home-mood-list {
  margin-top: 52px;
}

.home-mood-list a {
  min-height: 245px;
  padding: 4px clamp(18px, 2.5vw, 34px) 24px;
}

.home-mood-number {
  letter-spacing: .08em;
}

.home-mood-list h3 {
  margin-top: 42px;
  font-size: clamp(1.65rem, 2.7vw, 2.7rem);
}

.home-mood-arrow {
  position: absolute;
  left: clamp(18px, 2.5vw, 34px);
  bottom: 12px;
  font-size: 1.2rem;
}

/* Feature breaks out of the content column to create one memorable moment. */
.home-feature {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, .85fr);
  min-height: 680px;
}

.home-feature figure {
  min-height: 680px;
}

.home-feature-copy {
  padding: clamp(48px, 6vw, 92px);
}

.home-feature h2 {
  margin: 22px 0 28px;
  font-size: clamp(3.4rem, 6vw, 6rem);
  line-height: .95;
}

.home-feature-copy > p:not(.trilho-eyebrow) {
  font-size: 1.05rem;
  line-height: 1.65;
}

.home-feature figcaption {
  color: rgb(255 255 255 / 82%);
}

/* Field notes should resemble a small outdoor journal. */
.home-notes {
  padding-top: clamp(88px, 10vw, 144px);
}

.home-notes-grid {
  gap: clamp(36px, 6vw, 92px);
}

.home-notes-grid article {
  padding-top: 28px;
  border-top-color: var(--trilho-ink);
}

.home-notes-grid h3 {
  max-width: 18ch;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.08;
}

.home-notes-grid article > p:not(.trilho-eyebrow) {
  line-height: 1.65;
}

/* CMS stories are part of the journal instead of an appended technical block. */
#home-articles {
  padding-top: 32px;
  border-top: 1px solid var(--trilho-border);
}

#home-articles .home-section-heading {
  margin-bottom: 16px;
}

/* Footer closes quietly. */
.home-page .public-footer {
  margin-top: 40px;
  padding-top: 36px;
  padding-bottom: 44px;
}

/* Tablet */
@media (max-width: 800px) {
  .home-page .public-header {
    position: absolute;
  }

  .home-hero {
    min-height: 820px;
  }

  .home-hero-inner {
    padding-top: 145px;
  }

  .home-hero h1 {
    font-size: clamp(3.5rem, 11vw, 5.8rem);
  }

  .home-feature {
    width: 100vw;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .home-feature figure {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .home-feature-copy {
    padding: 48px clamp(24px, 6vw, 48px) 60px;
  }

  .home-mood-list a {
    min-height: 210px;
  }
}

/* Phone */
@media (max-width: 600px) {
  .home-page .public-header {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-inline: 20px;
    background: linear-gradient(180deg, rgb(5 15 10 / 72%), transparent);
  }

  .home-page .public-header nav {
    gap: 2px;
  }

  .home-page .public-header nav > a:first-child {
    display: none;
  }

  .home-page .public-header .trilho-button--secondary {
    display: none;
  }

  .home-page .public-header .public-brand {
    font-size: 1.35rem;
  }

  .home-hero {
    min-height: max(760px, 100svh);
    align-items: flex-end;
  }

  .home-hero-photo {
    object-position: 61% center;
  }

  .home-hero::after {
    background:
      linear-gradient(180deg, rgb(5 15 10 / 28%) 0%, transparent 24%),
      linear-gradient(0deg, rgb(5 15 10 / 92%) 0%, rgb(5 15 10 / 58%) 48%, rgb(5 15 10 / 8%) 80%);
  }

  .home-hero-inner {
    padding: 130px 20px max(42px, env(safe-area-inset-bottom));
  }

  .home-hero h1 {
    margin-top: 14px;
    font-size: clamp(3.2rem, 15vw, 4.65rem);
    line-height: .92;
  }

  .home-intro {
    margin-bottom: 22px;
  }

  .home-search-row {
    min-height: 0;
    padding: 6px;
  }

  .home-search-row .trilho-button {
    min-height: 48px;
  }

  .home-activities {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -20px;
    padding: 2px 20px 8px;
    scrollbar-width: none;
  }

  .home-activities::-webkit-scrollbar {
    display: none;
  }

  .home-activities label {
    flex: 0 0 auto;
  }

  .home-plan {
    margin-top: 6px;
  }

  .home-content {
    padding-inline: 20px;
  }

  .home-section {
    padding-block: 72px;
  }

  .home-section h2 {
    font-size: clamp(2.25rem, 11vw, 3.2rem);
  }

  .home-section-heading {
    margin-bottom: 28px;
  }

  .home-nearby-form {
    width: 100%;
  }

  .home-route-list .public-route-link {
    flex-basis: 88%;
    min-height: 220px;
  }

  .home-moods {
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .home-mood-list {
    margin-top: 38px;
    gap: 0;
  }

  .home-mood-list a {
    min-height: 185px;
    padding-top: 14px;
    border-top: 1px solid var(--trilho-border);
  }

  .home-mood-list h3 {
    margin-top: 26px;
  }

  .home-feature {
    margin-left: calc(50% - 50vw);
  }

  .home-feature figure {
    aspect-ratio: 4 / 5;
  }

  .home-feature-copy {
    padding: 42px 24px 52px;
  }

  .home-feature h2 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .home-notes {
    padding-top: 84px;
  }

  .home-notes-grid h3 {
    font-size: 2.15rem;
  }

  #home-articles {
    padding-top: 24px;
  }

  .home-page .public-footer {
    margin-inline: 20px;
  }
}

/* TRILHO visual discovery cards */
.home-mood-visuals {
  gap: 12px;
}

.home-mood-visuals .home-mood-card {
  position: relative;
  isolation: isolate;
  min-height: 420px;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: #fff;
  background: var(--trilho-forest);
}

.home-mood-card > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.home-mood-card--forest > img { object-position: 34% center; }
.home-mood-card--ridge > img { object-position: 62% center; }
.home-mood-card--short > img { object-position: 72% center; }
.home-mood-card--rough > img { object-position: 38% center; }

.home-mood-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(7 18 12 / 5%) 25%, rgb(7 18 12 / 82%) 100%);
}

.home-mood-content {
  position: absolute;
  inset: auto 0 0;
  padding: 28px;
}

.home-mood-visuals .home-mood-number {
  color: rgb(255 255 255 / 72%);
}

.home-mood-visuals h3 {
  margin: 12px 0 8px;
  color: inherit;
  font-size: clamp(1.7rem, 2.5vw, 2.6rem);
}

.home-mood-visuals p {
  max-width: 23ch;
  margin: 0;
  color: rgb(255 255 255 / 84%);
}

.home-mood-visuals .home-mood-arrow {
  position: static;
  margin-top: 24px;
}

.home-mood-card:hover > img {
  transform: scale(1.035);
}

@media (max-width: 800px) {
  .home-mood-visuals {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .home-mood-visuals .home-mood-card {
    min-height: 360px;
  }
}

@media (max-width: 600px) {
  .home-mood-visuals {
    display: flex;
    overflow-x: auto;
    margin-inline: -20px;
    padding: 0 20px 12px;
    scroll-snap-type: x mandatory;
  }

  .home-mood-visuals .home-mood-card {
    flex: 0 0 82%;
    min-height: 410px;
    scroll-snap-align: start;
  }
}

/* TRILHO discovery — editorial rhythm */
@media (min-width: 1001px) {
  .home-mood-visuals {
    grid-template-columns: 1.12fr .92fr 1.04fr .92fr;
    align-items: start;
  }

  .home-mood-visuals .home-mood-card {
    min-height: 455px;
  }

  .home-mood-visuals .home-mood-card:nth-child(2),
  .home-mood-visuals .home-mood-card:nth-child(4) {
    min-height: 395px;
    margin-top: 60px;
  }

  .home-mood-visuals .home-mood-card:nth-child(3) {
    min-height: 485px;
  }
}

.home-mood-card--forest > img { object-position: center; }
.home-mood-card--ridge > img  { object-position: center; }
.home-mood-card--short > img  { object-position: center; }
.home-mood-card--rough > img  { object-position: center; }
