/* Homepage */

/* ---------- Hero ---------- */
.home-hero {
	position: relative; overflow: hidden; min-height: 860px;
	/* Bone at the bottom left, brightening into Ocean Mist at the top right */
	background: linear-gradient(to top right, #EDE8DE 0%, #E4E2EA 38%, #C3C9F7 70%, #9AA4FF 100%);
	color: #10201E;
}
.home-hero .hero-topo g { stroke: rgba(16, 32, 30, .12); }
.home-hero .hero-birds { stroke: rgba(16, 32, 30, .55); }
.home-hero .hero-sun circle:first-child { fill: var(--ali-soul); opacity: 1; }
.home-hero .hero-sun circle:not(:first-child) { stroke: var(--ali-soul); }
.home-hero .eyebrow { color: #3D4F4B; }
.home-hero .eyebrow::before { border-top-color: #2D40F9; }
.hero-topo { position: absolute; width: 1700px; height: 1700px; left: 50%; top: 50%; margin: -850px 0 0 -850px; opacity: .5; animation: ali-spin 80s linear infinite; }
@keyframes ali-spin { to { transform: rotate(360deg); } }
.hero-land { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-sun { transform-origin: 880px 430px; animation: ali-breathe 8s ease-in-out infinite; }
@keyframes ali-breathe { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.07); } }
.hero-ridge { transition: transform 1.4s var(--ali-ease); }
.hero-trail { stroke-dasharray: 2 12; animation: ali-march 2.4s linear infinite; }
@keyframes ali-march { to { stroke-dashoffset: -56; } }
.hero-birds { animation: ali-fly 26s linear infinite; }
@keyframes ali-fly { from { transform: translate(-80px, 40px); } to { transform: translate(1100px, -30px); } }

.hero-inner { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; padding: 72px var(--ali-gutter) 320px; }
.hero-copy { flex: 1 1 480px; min-width: 0; max-width: 760px; }
.hero-title { margin: 0; font-size: clamp(56px, 8vw, 100px); line-height: .95; color: #10201E; }
.hero-welcome { display: flex; align-items: center; gap: 20px; margin-top: 30px; max-width: 620px; }
.hero-intro { margin: 0; font-size: 20px; line-height: 1.55; color: #33413C; }
.hero-intro p { margin: 0; }
.hero-actions { margin: 34px 0 0; }
.hero-explore { background: #10201E; color: #EDE8DE; }
.hero-explore:hover, .hero-explore:focus-visible { background: #2D40F9; color: #FFFFFF; }
.hero-explore:hover .ali-icon { transform: translateY(4px); }

/* Avatar + breathing prompt on the dark near ridge */
.home-hero { display: flex; flex-direction: column; }
.hero-inner { flex: 1 1 auto; }
.hero-campfire { position: absolute; left: var(--ali-gutter); bottom: clamp(32px, 4vw, 56px); z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero-avatar { width: 84px; height: 84px; flex: none; border-radius: 50%; object-fit: cover; border: 3px solid #FFFFFF; box-shadow: 0 0 0 6px rgba(237, 232, 222, .14), 0 16px 34px rgba(0, 0, 0, .35); animation: ali-breathe-soft 8s ease-in-out infinite; }
@keyframes ali-breathe-soft { 0%, 100% { box-shadow: 0 0 0 6px rgba(237, 232, 222, .14), 0 16px 34px rgba(0, 0, 0, .35); } 50% { box-shadow: 0 0 0 14px rgba(237, 232, 222, .06), 0 16px 34px rgba(0, 0, 0, .35); } }
.hero-breath { margin: 0; font-size: 32px; color: var(--ali-bone); text-shadow: 0 2px 12px rgba(11, 23, 22, .5); }

/* ---------- Recent moments ---------- */
.home-moments { padding: clamp(56px, 7vw, 90px) var(--ali-gutter); }
.moments-title { margin: 0 0 28px; font-size: 34px; color: var(--ali-accent); }
.moments-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.polaroid { position: relative; margin: 0; padding: 12px 12px 16px; background: var(--ali-bone); border-radius: 4px; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); transition: transform .9s var(--ali-ease), box-shadow .9s var(--ali-ease); }
.polaroid:nth-child(even) { margin-top: 28px; }
.polaroid:hover { transform: translateY(-8px); box-shadow: 0 34px 60px rgba(0, 0, 0, .45); }
.polaroid-tape { position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; margin-left: -45px; background: rgba(197, 222, 122, .75); }
.polaroid:nth-child(2) .polaroid-tape { background: rgba(154, 164, 255, .75); }
.polaroid:nth-child(3) .polaroid-tape { background: rgba(232, 153, 106, .75); }
.polaroid:nth-child(4) .polaroid-tape { background: rgba(197, 226, 5, .7); }
.polaroid-link { display: block; }
.polaroid-photo { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: var(--ali-kelp); }
.polaroid-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ali-ease); }
.polaroid:hover .polaroid-photo img { transform: scale(1.05); }
.polaroid figcaption { margin: 10px 4px 0; color: var(--ali-dusk); }
.polaroid-caption { display: block; font-size: 22px; line-height: 1.15; }
.polaroid-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 13px; }
.polaroid-date { color: #5A6862; }
.polaroid-more { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-weight: 600; color: #10201E; text-decoration: none; }
.polaroid-more .ali-icon { transition: transform .4s var(--ali-ease); }
.polaroid-more:hover { color: #2D40F9; }
.polaroid-more:hover .ali-icon { transform: translateX(3px); }
@media (max-width: 599.98px) { .polaroid:nth-child(even) { margin-top: 0; } }

/* ---------- Trailhead ---------- */
.home-trailhead { padding-top: clamp(72px, 9vw, 100px); }
.home-trailhead h2 { margin: 0 0 32px; }
.path-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.path-panel { margin-top: 32px; padding: 36px 40px; border-radius: 36px 36px 36px 8px; background: var(--ali-kelp); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; animation: ali-rise .8s var(--ali-ease) both; }
.path-panel[hidden] { display: none; }
.path-panel-copy { flex: 1 1 380px; min-width: 0; }
.path-panel .hand { margin: 0 0 6px; font-size: 30px; }
.path-blurb { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.3; }
/* Without JS every panel shows; pills are plain links. */
.no-js .path-panel[hidden] { display: flex; }

/* ---------- Focus ---------- */
.focus-cards { display: flex; flex-wrap: wrap; gap: 20px; }
.focus-card { flex: 1 1 280px; min-height: 320px; padding: 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.focus-card:hover { transform: translateY(-6px); background: var(--ali-kelp); }
.focus-icon { color: var(--c, var(--ali-accent)); }
.focus-card h3 { margin: 0; font-size: 34px; }
.focus-card p { margin: 12px 0 0; color: var(--ali-soft-text); }

/* ---------- Book ---------- */
.book-block { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: clamp(36px, 5vw, 72px) clamp(28px, 5vw, 72px) clamp(80px, 8vw, 110px); border-radius: var(--ali-radius-lg); background: var(--ali-soul); color: #17211F; }
.book-lines { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .18; }
.book-block .tag-soul { background: #10201E; color: var(--ali-soul); }
.book-lines g { stroke: #10201E; }
.book-cover-wrap { flex: 0 1 300px; margin: 0 auto; position: relative; }
.book-cover { position: relative; width: min(280px, 70vw); aspect-ratio: 5.5 / 8.5; overflow: hidden; border-radius: 4px 14px 14px 4px; background: var(--ali-ground); box-shadow: 0 30px 60px rgba(16, 32, 30, .34); animation: ali-float 7s ease-in-out infinite; transition: transform 1s var(--ali-ease); }
.book-cover:hover { transform: translateY(-8px); }
@keyframes ali-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 16px; z-index: 1; background: rgba(237, 232, 222, .12); }
.book-cover-blank { position: absolute; inset: 0 0 0 16px; display: flex; align-items: flex-end; padding: 24px; font-size: 34px; line-height: 1; background: var(--ali-ground); color: #FFFFFF; }
.book-copy { flex: 1 1 420px; min-width: 0; position: relative; }
.book-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #2E3B37; }
.book-title em, .book-cover-blank em { font-weight: 380; color: inherit; }
.book-title { margin: 0; font-size: clamp(56px, 7vw, 104px); line-height: .95; color: #10201E; }
.book-note { margin: 16px 0 0; font-size: 34px; }
.book-desc { margin: 18px 0 30px; max-width: 520px; font-size: 18px; line-height: 1.6; color: #1F2B28; }
.book-release { display: block; margin-top: 6px; color: #10201E; font-weight: 600; }
.book-copy .btn-ali { margin-top: 12px; background: #10201E; color: #EDE8DE; }
.book-copy .btn-ali:hover { background: #2D40F9; color: #FFFFFF; }
.feet { position: absolute; left: 0; right: 0; bottom: 26px; height: 30px; display: flex; gap: 22px; padding-left: 40px; pointer-events: none; }
.feet span { display: block; width: 10px; height: 17px; border-radius: 50%; background: #10201E; opacity: 0; animation: ali-step 6s ease-in-out infinite; }
.feet span:nth-child(odd) { margin-top: 10px; }
@keyframes ali-step { 0% { opacity: 0; } 6%, 40% { opacity: .5; } 70%, 100% { opacity: 0; } }
.feet span:nth-child(1){animation-delay:0s}.feet span:nth-child(2){animation-delay:.28s}.feet span:nth-child(3){animation-delay:.56s}.feet span:nth-child(4){animation-delay:.84s}.feet span:nth-child(5){animation-delay:1.12s}.feet span:nth-child(6){animation-delay:1.4s}.feet span:nth-child(7){animation-delay:1.68s}.feet span:nth-child(8){animation-delay:1.96s}.feet span:nth-child(9){animation-delay:2.24s}.feet span:nth-child(10){animation-delay:2.52s}.feet span:nth-child(11){animation-delay:2.8s}.feet span:nth-child(12){animation-delay:3.08s}.feet span:nth-child(13){animation-delay:3.36s}.feet span:nth-child(14){animation-delay:3.64s}.feet span:nth-child(15){animation-delay:3.92s}.feet span:nth-child(16){animation-delay:4.2s}.feet span:nth-child(17){animation-delay:4.48s}.feet span:nth-child(18){animation-delay:4.76s}

/* ---------- Musings ---------- */
.musing { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 22px 0; border-top: 1px solid var(--ali-line); color: var(--ali-bone); text-decoration: none; }
.musing:last-child { border-bottom: 1px solid var(--ali-line); }
.musing:hover { color: var(--ali-bone); }
.musing-thumb { width: 76px; height: 76px; flex: none; border-radius: 18px; transition: transform .7s var(--ali-ease), border-radius .7s; }
.musing:hover .musing-thumb { transform: rotate(-4deg) scale(1.06); border-radius: 50%; }
.musing-title { flex: 1 1 260px; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.1; transition: transform .6s var(--ali-ease), color .4s; }
.musing-title .tag { margin-left: 10px; font-style: normal; }
.musing:hover .musing-title { transform: translateX(12px); color: var(--ali-accent); }
.musing-date { display: flex; align-items: center; gap: 18px; font-size: 15px; color: var(--ali-sage); }
.musing .arrow { opacity: .4; transition: transform .5s var(--ali-ease), opacity .5s; }
.musing:hover .arrow { opacity: 1; transform: translateX(8px); }

/* ---------- Essays ribbon ---------- */
.home-essays { position: relative; margin: 0 0 clamp(72px, 9vw, 110px); padding: 56px 0 60px; background: var(--ali-bone); color: var(--ali-dusk); }
.essays-edge { position: absolute; top: -17px; left: 0; fill: var(--ali-bone); }
.essays-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 28px; padding: 0 var(--ali-gutter); }
.essays-head h2 { margin: 4px 0 0; color: var(--ali-dusk); }
.essays-note { margin: 0 0 14px; color: #3D4F4B; }
.essays-more { color: var(--ali-dusk); font-size: 15px; font-weight: 600; }
.essays-more:hover { color: #3D4F4B; }
.essays-track { overflow: hidden; }
.marquee { display: flex; gap: 40px; width: max-content; animation: ali-slide 70s linear infinite; }
.marquee:hover, .marquee:focus-within { animation-play-state: paused; }
@keyframes ali-slide { to { transform: translateX(-50%); } }
.essay { width: 300px; flex: none; color: var(--ali-dusk); text-decoration: none; }
.essay:hover { color: var(--ali-dusk); }
.essay-media { display: block; aspect-ratio: 3 / 2; border-radius: 20px 20px 20px 4px; background: #D8D2C5; transition: transform .7s var(--ali-ease); }
.essay:hover .essay-media { transform: translateY(-4px); }
.essay-date { display: block; margin: 16px 4px 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #4A5853; }
.essay-title { display: block; margin: 6px 4px 0; font-size: 26px; font-weight: 420; line-height: 1.18; color: #10201E; transition: color .4s; }
.essay:hover .essay-title { color: #2D40F9; }
@media (prefers-reduced-motion: reduce) { .essays-track { overflow-x: auto; } }

/* ---------- Podcast ---------- */
.home-podcast { display: flex; flex-wrap: wrap; gap: 44px; }
.podcast-intro { flex: 1 1 400px; max-width: 480px; min-width: 0; }
.podcast-intro h2 { margin: 0 0 20px; }
.podcast-intro .text-soft { max-width: 420px; margin-bottom: 28px; font-size: 18px; }
.episode-list { flex: 999 1 520px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.episode { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 18px 0; border-top: 1px solid var(--ali-line); color: var(--ali-bone); text-decoration: none; }
.episode:hover { color: var(--ali-bone); }
.episode-media { width: 72px; height: 72px; flex: none; border-radius: 16px; }
.episode-copy { flex: 1 1 240px; min-width: 0; }
.episode-num { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ali-sage); }
.episode-title { display: block; font-size: 23px; line-height: 1.25; transition: color .4s; }
.episode:hover .episode-title { color: var(--ali-accent); }
.episode:hover .episode-go { background: var(--ali-accent); border-color: var(--ali-accent); color: var(--ali-dusk); }

@media (max-width: 899.98px) {
	.home-hero { min-height: 0; }
	.hero-inner { padding-bottom: 220px; }
}

/* ---------- The trail ----------
   One dashed line down the left gutter, from the first waypoint to the last.
   It fills as you scroll and each marker lights up as the line reaches it
   (same motion as the Adventure page). Positions come from homepage.js. */
.home-trail { position: relative; --trail-x: calc(var(--ali-gutter) / 2); }
.home-trail-line {
	position: absolute; left: var(--trail-x); top: 0; height: 0; width: 0; z-index: 3;
	margin-left: -1px; border-left: 2px dashed rgba(237, 232, 222, .2); pointer-events: none;
}
.home-trail-fill { position: absolute; left: -2px; top: 0; width: 2px; height: 0; background: linear-gradient(to bottom, var(--ali-accent), var(--ali-ocean-mist)); transition: height .3s linear; }
.home-trail-markers { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.home-trail-markers ol { margin: 0; padding: 0; list-style: none; }
.trail-marker { position: absolute; left: var(--trail-x); top: 0; transform: translate(-50%, -50%); pointer-events: auto; text-decoration: none; opacity: 0; transition: opacity .4s ease; }
.home-trail.is-ready .trail-marker { opacity: 1; }
.trail-marker-dot {
	display: flex; width: 28px; height: 28px; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--ali-dusk); border: 2px solid rgba(237, 232, 222, .35);
	font: 600 11px var(--ali-font-body); color: var(--ali-sage);
	transition: background .6s var(--ali-ease), border-color .6s var(--ali-ease), color .6s var(--ali-ease), box-shadow .6s var(--ali-ease), transform .6s var(--ali-ease);
}
.trail-marker:hover .trail-marker-dot, .trail-marker:focus-visible .trail-marker-dot { border-color: var(--ali-accent); color: var(--ali-bone); }
.trail-marker.is-lit .trail-marker-dot { background: var(--ali-accent); border-color: var(--ali-accent); color: var(--ali-dusk); box-shadow: 0 0 0 7px rgba(197, 222, 122, .16); transform: scale(1.06); }
.trail-marker.is-current .trail-marker-dot { box-shadow: 0 0 0 8px rgba(197, 222, 122, .2), 0 0 24px rgba(197, 222, 122, .4); transform: scale(1.14); }
@media (max-width: 899.98px) { .home-trail-line, .home-trail-markers { display: none; } }

/* ---------- Waypoint labels: "Waypoint 06" in the accent, the section name stays grey ---------- */
.wp-num { color: var(--ali-accent); }
/* light sections: Bamboo reads on Bone */
.home-essays .wp-num { color: var(--ali-bamboo); }
.home-essays .eyebrow::before { border-top-color: var(--ali-bamboo); }
/* the book block is Soul, where Bamboo would be too faint: Dusk instead */
.book-eyebrow .wp-num { color: #10201E; font-weight: 700; }

/* ---------- Letters: a light band ---------- */
#letters .letters { background: var(--ali-bone); color: #10201E; }
#letters .letters-copy h2 { color: #10201E; }
#letters .letters-copy .text-soft { color: #4A5853 !important; }   /* .text-soft is !important */
#letters .letters-copy .hand.text-accent { color: var(--ali-bamboo) !important; }   /* .text-accent is !important */
#letters .btn-ali { background: var(--ali-bamboo); color: #FFFFFF; }
#letters .btn-ali:hover, #letters .btn-ali:focus-visible { background: #10201E; color: #EDE8DE; }
