.kadet-home {
  --home-serif: "Source Serif 4", Georgia, Cambria, serif;
  --home-ink: #153922;
  --home-green: #194d31;
  --home-muted: #344a38;
  --home-paper: #faf4e3;
  --home-gold: #9a7630;
  --home-outline: #bfa15e;
  --home-soft-line: #d7c59a;
  --home-map-wash: rgb(253 250 239 / .21);
  --home-panel-gap: clamp(1.25rem, 3vw, 2.15rem);
  --focus-ring: #24613d;
  --text: var(--home-ink);
  --muted: var(--home-muted);
  --accent: var(--home-green);
  --accent-hover: #103b24;
  position: relative;
  isolation: isolate;
  color: var(--home-ink);
  background: var(--home-paper);
}

/* The upper and lower landscape share the original image geometry. Fading the
   latter over the first keeps both landmarks visible when the page is wide. */
.kadet-home::before,
.kadet-home::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(var(--home-map-wash), var(--home-map-wash)), url("./kadet-homepage-background.webp");
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
  content: "";
}

.kadet-home::before { background-position: center top; }
.kadet-home::after {
  background-position: center bottom;
  mask-image: linear-gradient(transparent 34%, #000 72%);
}

.kadet-home .site-header,
.kadet-home .site-footer {
  border-color: var(--home-soft-line);
  background: #fcf7e9;
}

.kadet-home .header-inner { min-height: 4.5rem; }
.kadet-home .brand {
  gap: .78rem;
  font-family: var(--home-serif);
  font-size: clamp(1.35rem, 2vw, 1.78rem);
  font-weight: 700;
  letter-spacing: -.025em;
}

.kadet-home .brand .brand-motif { width: 3.45rem; height: 3.02rem; }
.kadet-home .brand > span { padding-inline-start: .75rem; border-inline-start: 1px solid var(--home-outline); }
.kadet-home .brand-name-line { display: inline; }
.kadet-home .primary-nav a { color: var(--home-ink); font-family: var(--home-serif); font-size: 1rem; font-weight: 700; }
.kadet-home .account-actions { border-color: var(--home-soft-line); }
.kadet-home .header-cta { font-family: var(--home-serif); font-weight: 700; font-size: 1rem; }
.kadet-home .navigation-toggle { border-color: var(--home-soft-line); background: #fff9ea; }
.kadet-home .site-navigation { border-color: var(--home-soft-line); }
.kadet-home .footer-inner { padding-block: 1.1rem; }

.kadet-home .footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  font-size: .87rem;
  text-align: center;
}

.kadet-home .footer-grid > * { padding-inline: .6rem; }
.kadet-home .footer-grid > * + * { border-inline-start: 1px solid var(--home-soft-line); }
.kadet-home .site-footer a { color: var(--home-ink); }

.kadet-home main.shell-container {
  padding-block: 0 clamp(3rem, 8vw, 7.5rem);
}

.kadet-home h1,
.kadet-home h2,
.kadet-home h3 {
  font-family: var(--home-serif);
  font-weight: 700;
  letter-spacing: -.028em;
}

.kadet-home h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); }
.kadet-home .eyebrow { color: #456148; font-size: .69rem; }

.home-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3.5rem, 7.3vw, 6.3rem) 0 clamp(1.65rem, 4vw, 2.7rem);
  text-align: center;
}

.home-hero::before {
  position: absolute;
  z-index: -1;
  inset: 3% 0;
  background: radial-gradient(ellipse 52% 64% at 50% 50%, rgb(253 249 234 / .93), rgb(253 249 234 / .78) 57%, transparent);
  pointer-events: none;
  content: "";
}

.home-kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .85rem;
  margin: 0 0 .8rem;
  font-family: var(--home-serif);
  font-size: clamp(.69rem, 1.55vw, 1.15rem);
  font-weight: 700;
  letter-spacing: .085em;
  line-height: 1.35;
  text-transform: uppercase;
}

.home-kicker::before,
.home-kicker::after {
  flex: 0 1 3rem;
  height: 1px;
  background: var(--home-gold);
  content: "";
}

.home-hero h1 {
  color: var(--home-ink);
  font-size: clamp(3rem, 9.1vw, 6.5rem);
  letter-spacing: -.036em;
  line-height: .94;
}

.home-hero h1 span { display: block; }
.home-motto {
  margin: 1rem 0 .65rem;
  font-family: var(--home-serif);
  font-size: clamp(1.38rem, 3.4vw, 2.3rem);
  font-style: italic;
  line-height: 1.18;
  text-wrap: balance;
}

.home-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 17.5rem);
  gap: .55rem;
  margin-inline: auto;
  color: var(--home-gold);
  pointer-events: none;
}

.home-ornament::before,
.home-ornament::after {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  content: "";
}

.home-ornament::after { transform: rotate(180deg); }
.home-ornament span {
  width: 1.45rem;
  height: 1.45rem;
  background: currentColor;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
}

.home-intro {
  max-width: 50ch;
  margin: .8rem auto 1.25rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--home-ink);
  text-wrap: balance;
}

.home-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.2rem; justify-content: center; }
.home-actions .button, .home-summary-panel > .button {
  border-radius: .7rem;
  font-family: var(--home-serif);
  font-size: 1.08rem;
  font-weight: 700;
}

.home-actions .button { padding-inline: clamp(1.1rem, 3vw, 2.4rem); }
.home-actions .button.secondary,
.home-summary-panel > .button.secondary {
  border-color: var(--home-green);
  background: #fcf7e9;
  color: var(--home-green);
}

.home-actions .button.secondary:hover,
.home-summary-panel > .button.secondary:hover { background: #eceddd; }

.home-status {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  padding: .42rem .9rem;
  margin: 1rem 0 0;
  border: 1px solid #decea6;
  border-radius: 2rem;
  color: #3e3a25;
  background: #efe5c9;
  font-size: .87rem;
  font-weight: 650;
}

.home-status.is-open { border-color: #b1c199; color: #23432b; background: #e6edda; }
.home-status .home-icon {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  color: currentColor;
}

.home-panel {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--home-outline);
  border-radius: clamp(.9rem, 2vw, 1.2rem);
  background: var(--brand-panel);
  text-align: center;
}

.home-icon { color: var(--home-green); }
.home-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.home-facts li {
  display: grid;
  min-width: 0;
  grid-template-rows: 2.6rem auto;
  justify-items: center;
  gap: .48rem;
  padding: 0 clamp(.25rem, 1.2vw, .9rem);
  font-family: var(--home-serif);
  font-size: clamp(1.15rem, 2.55vw, 1.85rem);
  font-weight: 700;
  line-height: 1.17;
  text-wrap: balance;
}

.home-facts li + li { border-inline-start: 1px solid var(--home-soft-line); }
.home-facts .home-icon { width: 2.85rem; height: 2.6rem; }

.home-about-copy {
  position: relative;
  padding-block-start: clamp(1.1rem, 2.5vw, 1.65rem);
  margin-block-start: clamp(1.1rem, 2.5vw, 1.65rem);
}

.home-about-copy::before {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--home-outline), transparent);
  content: "";
}

.home-about-copy > p:not(.eyebrow) {
  max-width: 75ch;
  margin: .5rem auto 0;
  color: var(--home-muted);
  text-wrap: pretty;
}

.home-journey {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-block: var(--home-panel-gap);
}

.home-journey::before {
  position: absolute;
  z-index: -1;
  inset: 22% 0 0;
  background: url("./kadet-homepage-background.webp") center 64% / cover no-repeat;
  opacity: .22;
  mask-image: linear-gradient(transparent, #000 75%);
  pointer-events: none;
  content: "";
}

.home-journey .home-ornament { margin: .72rem auto .5rem; }
.home-journey-intro { margin: 0 auto 1rem; color: var(--home-muted); text-wrap: balance; }

.home-rounds {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-inline: auto;
  max-width: 59rem;
}

.home-route-line {
  position: absolute;
  z-index: -1;
  inset: 2.5rem auto auto 25%;
  width: 50%;
  height: 3.5rem;
  stroke: var(--home-gold);
  stroke-width: 1.8;
  stroke-dasharray: 6 5;
  stroke-linecap: round;
  pointer-events: none;
}

.home-round { min-width: 0; padding-inline: clamp(.4rem, 2vw, 1.5rem); }
.home-route-stop { position: relative; width: 3.375rem; height: 4.75rem; margin: 0 auto .55rem; }
.home-route-stop span {
  position: absolute;
  inset: .5rem 0 auto;
  font-family: var(--home-serif);
  font-size: 1.28rem;
  font-weight: 700;
  text-align: center;
  line-height: 2rem;
}

.home-round h3 { margin: .2rem 0 .5rem; font-size: clamp(1.45rem, 2.7vw, 2rem); }
.home-round p { max-width: 39ch; margin: 0 auto; color: var(--home-muted); line-height: 1.55; text-wrap: pretty; }
.home-round-label {
  display: inline-block;
  padding: .24rem .65rem;
  margin-top: .8rem;
  border-radius: .35rem;
  color: #23472f;
  background: rgb(228 235 210 / .9);
  font-size: .74rem;
  font-weight: 700;
}

.home-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--home-panel-gap);
  width: min(100%, 68rem);
  margin-inline: auto;
}

.home-summary-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .6rem .85rem;
}

.home-summary-panel .home-summary-heading h2,
.home-summary-label {
  margin: 0;
  font-family: var(--home-serif);
  font-size: clamp(1.4rem, 2.65vw, 2.05rem);
  font-weight: 700;
  line-height: 1.15;
}

.home-summary-panel .home-ornament { width: min(100%, 12.5rem); margin: .55rem auto .8rem; }
.home-summary-panel .home-ornament span { width: 1.05rem; height: 1.05rem; }
.home-current h2, .home-history .kadet-archive-empty h3 {
  margin: 0 auto .6rem;
  font-family: var(--home-serif);
  font-size: clamp(1.45rem, 2.5vw, 1.92rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
}

.home-summary-panel > p:not(.eyebrow) { max-width: 48ch; margin: 0 auto .65rem; color: var(--home-muted); text-wrap: pretty; }
.home-current > .button { margin-top: .45rem; }
.home-summary-panel .kadet-text-link { justify-content: center; }
.home-history > .eyebrow { margin-block-end: .35rem; }
.home-history .kadet-archive-empty { display: block; padding: 0; margin-top: 0; border: 0; background: transparent; }
.home-history .kadet-archive-empty .kadet-empty-icon { display: none; }
.home-history .kadet-archive-empty p { max-width: 42ch; margin-inline: auto; }
.home-history .kadet-archive-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; margin-top: .65rem; }
.home-history .kadet-year-card { padding: 1rem; background: rgb(255 252 240 / .75); border-color: var(--home-soft-line); text-align: start; }

@media (max-width: 67.999rem) {
  .kadet-home .header-inner { min-height: 4.55rem; }
  .kadet-home .brand { font-size: clamp(1.2rem, 3.4vw, 1.55rem); }
  .kadet-home .brand .brand-motif { width: 2.65rem; height: 2.35rem; }
}

@media (max-width: 45rem) {
  .kadet-home { --home-map-wash: rgb(253 250 239 / .42); }
  .kadet-home::before { background-position: left top; }
  .kadet-home::after { background-position: right bottom; }
  .kadet-home .brand { gap: .48rem; }
  .kadet-home .brand > span { padding-inline-start: .5rem; }
  .home-hero { padding-top: 3rem; }
  .home-hero::before { inset: 0 -1rem; background: radial-gradient(ellipse at center, rgb(253 249 234 / .92), rgb(253 249 234 / .62) 66%, transparent); }
  .home-kicker { gap: .35rem; }
  .home-kicker::before, .home-kicker::after { flex-basis: 1.1rem; }
  .home-hero h1 { font-size: clamp(2.75rem, 11vw, 4.6rem); }
  .home-about-copy > p:not(.eyebrow) { text-align: start; }
  .home-facts .home-icon { width: 2.15rem; height: 2.15rem; }
  .home-facts li { grid-template-rows: 2.15rem auto; font-size: clamp(.96rem, 3.65vw, 1.4rem); }
  .home-rounds {
    --home-route-gap: 1.45rem;
    --home-waypoint-center: 3.78rem;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--home-route-gap);
  }
  .home-route-line { display: none; }
  .home-round { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); align-items: start; gap: .85rem; padding: 0; text-align: left; }
  .home-round:first-of-type::before {
    position: absolute;
    z-index: -1;
    inset: var(--home-waypoint-center) auto calc(-1 * (var(--home-route-gap) + var(--home-waypoint-center))) 1.45rem;
    border-inline-start: 2px dashed var(--home-gold);
    pointer-events: none;
    content: "";
  }
  .home-route-stop { width: 3rem; height: 4.1rem; margin: 0; }
  .home-route-stop svg { display: block; width: 100%; height: auto; }
  .home-route-stop span { inset-block-start: .34rem; font-size: 1.15rem; }
  .home-round p { margin: 0; }
  .home-summary { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 28rem) {
  .kadet-home .brand .brand-motif { width: 2.25rem; }
  .kadet-home .brand-name-line { display: block; }
  .kadet-home .footer-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .kadet-home .footer-grid > * + * { border-inline-start: 0; }
}

@media print {
  .kadet-home::before, .kadet-home::after, .home-hero::before, .home-journey::before { display: none; }
  .kadet-home, .home-panel { background: #fff; }
}
