/* Homepage composition; shared brand tokens and console components live in app.css. */
body.home-active { padding: 0; background: #203c36; }
.home-page {
  --home-cream: #faf4e8;
  --home-forest: #203c36;
  --home-muted: #e4e9dd;
  position: relative;
  isolation: isolate;
  min-height: 820px;
  min-height: max(820px, 100svh);
  display: flex;
  flex-direction: column;
  padding: 28px 48px 0;
  overflow: hidden;
  color: var(--home-cream);
  background: #203c36;
}
.home-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: linear-gradient(155deg, #36564b 0%, #203c36 48%, #102d28 100%);
}
/* Select the original photo only after the published preset is known, or on
   an actual load failure. Pending/random backgrounds never load this photo. */
.home-page[data-background="landscape"]::before {
  background-image: url('/assets/mountain-lake.webp');
  background-position: center 58%; background-size: cover; background-repeat: no-repeat;
}
/* Rotating photos sit between the preset base and the contrast overlay.
   Each new photo fades in on top of the previous one, so the overlay contrast
   never drops and the fallback never shows through mid-fade. */
.home-backdrop { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.home-backdrop-layer {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%;
  opacity: 0; transition: opacity 1.8s ease-in-out; transform-origin: 50% 58%;
}
.home-backdrop-layer.is-initial { transition: none; }
.home-backdrop-layer.is-active, .home-backdrop-layer.is-leaving { animation: home-drift-a 44s linear forwards; }
.home-backdrop-layer.drift-b.is-active, .home-backdrop-layer.drift-b.is-leaving { animation-name: home-drift-b; }
.home-backdrop-layer.is-active, .home-backdrop-layer.is-leaving { opacity: 1; }
.home-backdrop.is-paused .home-backdrop-layer { animation-play-state: paused; }
.home-backdrop.is-suspended .home-backdrop-layer { animation-play-state: paused; }
.home-page[data-background="wallpaper"] .home-backdrop-layer { animation: none; object-position: center; transform-origin: center; }
.home-page[data-background="wallpaper"] .wallpaper-motion .home-wallpaper { animation: home-wallpaper-drift 32s ease-in-out infinite alternate; }
.home-page[data-background="wallpaper"] .is-paused .home-wallpaper,
.home-page[data-background="wallpaper"] .is-suspended .home-wallpaper { animation-play-state: paused; }
@keyframes home-wallpaper-drift { from { transform: scale(1); } to { transform: scale(1.055); } }
@keyframes home-drift-a { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(-1.2%, 0.8%); } }
@keyframes home-drift-b { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(1.2%, -0.6%); } }
.home-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(14,36,30,.37) 0%, rgba(16,37,31,.57) 42%, rgba(14,33,28,.58) 68%, rgba(11,30,25,.91) 100%);
  opacity: var(--home-landscape-shade, 1);
}
.home-page[data-background="wallpaper"]::after {
  background: linear-gradient(180deg, rgba(7,20,25,.28), rgba(7,20,25,.13) 38%, rgba(7,20,25,.76)), rgba(7,20,25,var(--home-wallpaper-shade,.45));
  opacity: 1;
}
.home-page a { color: inherit; text-decoration: none; }
.home-page button { font: inherit; }
.home-page a:focus-visible, .home-page button:focus-visible, .home-page code:focus-visible {
  outline: 3px solid #e8d3a9; outline-offset: 5px;
}
.home-page h1:focus { outline: none; }
.home-skip { position: absolute; top: -100px; left: 24px; z-index: 3; padding: 12px 20px; background: #203c36; border-radius: 8px; }
.home-skip:focus { top: 16px; }
.home-nav { width: 100%; max-width: 1240px; margin: 0 auto; padding: 10px 12px 10px 22px; border-radius: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(250,247,239,.97); color: var(--home-forest); box-shadow: 0 6px 32px rgba(7,25,21,.1); }
.home-brand { display: flex; align-items: center; min-height: 44px; gap: 10px; font: 700 23px/1.1 Georgia, 'Times New Roman', serif; letter-spacing: .05em; flex-shrink: 0; }
.home-brand-sub { display: block; margin-top: 5px; font: 600 8px/1.2 system-ui, sans-serif; letter-spacing: .2em; }
.home-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--home-forest); }
.home-symbol svg { width: 29px; height: 29px; fill: none; stroke: var(--home-cream); stroke-width: 1.5; stroke-linejoin: round; }
.home-nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.home-nav-links a, .home-nav-links button { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 4px; font-size: 13px; color: #36534a; background: transparent; border: 0; border-radius: 4px; white-space: nowrap; box-shadow: none; }
.home-nav-links a:hover, .home-nav-links button:hover { color: #102d23; text-decoration: underline; text-underline-offset: 5px; }
.home-nav-current::before { content: ""; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: #517357; }
.home-page .home-nav-console { padding: 12px 24px; min-height: 46px; border-radius: 40px; background: var(--home-forest); color: var(--home-cream); font-size: 13px; }
.home-nav-console span { margin-left: 20px; font-size: 18px; }
.home-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 76px 20px 56px; }
.home-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-size: 10px; font-weight: 500; letter-spacing: .19em; color: var(--home-muted); }
.home-eyebrow > span:first-child { width: 6px; height: 6px; border-radius: 50%; background: #d0ddbc; }
.home-eyebrow-divider { opacity: .65; margin: 0 2px; }
.home-content h1 { font: 500 clamp(48px,5.8vw,84px)/1.28 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'SimSun', Georgia, serif; letter-spacing: .065em; margin: 0 0 24px; text-shadow: 0 2px 26px rgba(7,27,20,.12); }
.home-content h1 em { font-style: normal; color: #f5edd8; }
.home-description { font-size: 15px; line-height: 1.95; color: #eef0e5; letter-spacing: .08em; margin-bottom: 27px; }
.home-endpoint { display: flex; align-items: center; gap: 15px; border: 1px solid rgba(231,237,219,.35); border-radius: 12px; padding: 1px 3px 1px 16px; background: rgba(9,32,24,.52); }
.home-endpoint-label { color: #d2ddce; font-size: 9px; letter-spacing: .13em; padding-right: 13px; border-right: 1px solid rgba(234,241,223,.3); }
.home-endpoint code { min-width: 0; overflow-wrap: anywhere; font: 12px/1.5 'SFMono-Regular', Consolas, monospace; color: #f4f2e9; user-select: all; }
.home-endpoint button { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; padding: 12px; border: 0; border-radius: 9px; color: #eeeede; background: transparent; box-shadow: none; }
.home-endpoint button:hover { background: rgba(255,255,255,.15); }
.home-endpoint svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.home-copy-status { min-height: 25px; font-size: 12px; margin-top: 5px; color: #f7f1dd; }
.home-actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 9px; }
.home-actions a { display: flex; align-items: center; justify-content: space-between; min-width: 178px; min-height: 54px; padding: 14px 23px; border-radius: 8px; font-size: 14px; font-weight: 550; transition: background .18s, box-shadow .18s; }
.home-actions span { font-size: 18px; margin-left: 25px; }
.home-page .home-primary { color: #203c36; background: #f8f3e8; border: 1px solid #f8f3e8; }
.home-page .home-primary:hover { background: #e9dfc9; box-shadow: 0 3px 18px rgba(0,0,0,.13); }
.home-secondary { border: 1px solid rgba(255,255,255,.58); background: rgba(16,42,32,.34); }
.home-secondary:hover { background: rgba(16,42,32,.65); }
.home-account-note { margin-top: 19px; font-size: 11px; color: #e6ebdc; letter-spacing: .055em; }
.home-bottom { width: 100%; max-width: 1240px; margin: 0 auto; }
.home-features { list-style: none; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid rgba(231,237,219,.26); border-bottom: 1px solid rgba(231,237,219,.22); padding: 25px 0; }
.home-features li { display: flex; gap: 18px; align-items: flex-start; padding: 0 26px; border-right: 1px solid rgba(231,237,219,.2); }
.home-features li:first-child { padding-left: 4px; }
.home-features li:last-child { border: 0; padding-right: 0; }
.home-feature-number { font: 11px/1.8 Georgia, serif; color: #d5dfc9; }
.home-features strong { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; letter-spacing: .06em; }
.home-features div > span { font-size: 11px; color: #cedbca; letter-spacing: .035em; }
.home-colophon { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 0; font-size: 10px; color: #d9e2d0; letter-spacing: .09em; }
.home-colophon > span:first-child { margin-right: auto; }
.home-colophon > span:last-child { font-size: 9px; letter-spacing: .13em; }
.home-colophon > span:last-child > span { margin-left: 18px; font-size: 18px; }
.home-backdrop-toggle {
  display: inline-flex; align-items: center; gap: 9px; min-width: 44px; min-height: 44px; padding: 8px 16px;
  border: 1px solid rgba(231,237,219,.32); border-radius: 40px; background: rgba(9,32,24,.42); color: #e6ebdc;
  font-size: 10px; letter-spacing: .13em; cursor: pointer; transition: background .18s, border-color .18s;
}
.home-backdrop-toggle[hidden] { display: none; }
.home-backdrop-toggle:hover { background: rgba(9,32,24,.72); border-color: rgba(231,237,219,.58); }
.home-backdrop-toggle svg { width: 11px; height: 11px; fill: currentColor; flex-shrink: 0; }
.home-backdrop-toggle .home-backdrop-play, .home-backdrop-toggle.is-paused .home-backdrop-pause { display: none; }
.home-backdrop-toggle.is-paused .home-backdrop-play { display: block; }
@media (min-width:1700px) { .home-content { padding-top: 105px; padding-bottom: 85px; } .home-content h1 { font-size: 96px; } }
@media (max-width:800px) {
  .home-page { padding: 20px 24px 0; min-height: max(780px,100svh); }
  .home-nav { gap: 12px; padding-left: 16px; }
  .home-nav-links { gap: 14px; }
  .home-nav-links .home-nav-current { display: none; }
  .home-nav-console span { margin-left: 10px; }
  .home-content { padding: 65px 0 48px; }
  .home-features li { gap: 10px; padding: 0 16px; }
  .home-features div > span { font-size: 10px; }
}
@media (max-width:580px) {
  .home-page { padding: 16px 20px 0; min-height: max(820px,100svh); }
  .home-page[data-background="landscape"]::before { background-position: 43% center; }
  .home-backdrop-layer { object-position: 43% center; transform-origin: 43% 50%; }
  .home-nav { padding: 9px 11px 9px 14px; border-radius: 22px; flex-wrap: wrap; column-gap: 10px; row-gap: 2px; }
  .home-brand { font-size: 21px; gap: 8px; }
  .home-symbol { width: 34px; height: 34px; }
  .home-brand-sub { font-size: 7px; }
  .home-nav-links { order: 3; flex-basis: 100%; justify-content: center; border-top: 1px solid #dedfd3; margin-top: 5px; gap: 4px 22px; }
  .home-nav-links .home-nav-current { display: flex; }
  .home-nav-links a, .home-nav-links button { font-size: 12px; min-height: 44px; }
  .home-page .home-nav-console { padding: 10px 17px; min-height: 44px; }
  .home-content { padding: 51px 0 38px; }
  .home-eyebrow { font-size: 8px; letter-spacing: .1em; gap: 8px; margin-bottom: 20px; }
  .home-content h1 { font-size: clamp(39px,11vw,58px); margin-bottom: 21px; letter-spacing: .045em; }
  .home-description { font-size: 12px; line-height: 1.95; letter-spacing: .04em; margin-bottom: 24px; }
  .home-endpoint { gap: 6px; max-width: 100%; padding-left: 12px; }
  .home-endpoint-label { display: none; }
  .home-endpoint code { font-size: 12px; }
  .home-actions { width: 100%; gap: 11px; margin-top: 8px; }
  .home-actions a { flex: 1; min-width: 0; min-height: 52px; padding: 12px 16px; font-size: 12px; }
  .home-actions span { margin-left: 8px; font-size: 16px; }
  .home-account-note { font-size: 10px; margin-top: 17px; }
  .home-features { grid-template-columns: repeat(2,1fr); row-gap: 22px; padding: 24px 0; }
  .home-features li { padding: 0 8px 0 4px; gap: 11px; }
  .home-features li:nth-child(even) { border-right: 0; padding-left: 18px; }
  .home-features strong { font-size: 11px; }
  .home-features div > span { font-size: 10px; }
  .home-colophon { justify-content: center; text-align: center; flex-wrap: wrap; row-gap: 4px; padding: 18px 0; font-size: 9px; }
  .home-colophon > span:first-child { margin-right: 0; flex-basis: 100%; }
  .home-colophon > span:last-child { display: none; }
  .home-backdrop-toggle { font-size: 9px; padding: 8px 14px; }
}
@media (prefers-reduced-motion:reduce) {
  .home-page * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
