/* AME home: farm → forge scroll story. */

.home-main { overflow: clip; }

/* ---------- 1. Hero / farm ---------- */
.hero { position: relative; min-height: clamp(560px, calc(100svh - 142px), 900px); display: flex; align-items: center; isolation: isolate; overflow: hidden; color: var(--navy); }
.hero__scene { position: absolute; inset: 0; z-index: -1; }
.hero__sky { position: absolute; inset: 0; background: linear-gradient(180deg, #F9D9A6 0%, #FCE9C4 38%, #EAF4DA 70%, #CFE7B0 100%); }
.hero__sun { position: absolute; left: 66%; top: 18%; width: clamp(140px, 18vw, 260px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #FFE7A3 0%, #FFC94A 55%, #FFB238 100%); box-shadow: 0 0 120px 60px rgba(255, 196, 80, .45); }
.hero__hills { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__hills path { transform-box: fill-box; }
.hero__herd { position: absolute; left: 0; right: 0; bottom: 8%; height: clamp(54px, 9vw, 110px); pointer-events: none; }
.walker { position: absolute; bottom: 0; left: 0; height: 100%; aspect-ratio: 4 / 3; background: #2C5A1E; -webkit-mask: var(--sil) center bottom / contain no-repeat; mask: var(--sil) center bottom / contain no-repeat; animation: walk var(--dur) linear var(--delay) infinite; opacity: .92; }
.walker--calf, .walker--sheep, .walker--goat { height: 72%; }
.walker--horse { height: 112%; }
@keyframes walk { from { transform: translateX(-20vw); } to { transform: translateX(115vw); } }
.hero__dusk { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 16, 30, .0), rgba(14, 16, 30, .95)); opacity: 0; }

.hero__inner { display: grid; gap: 2rem; align-items: center; padding-block: clamp(3rem, 8vw, 5rem) clamp(9rem, 16vw, 12rem); }
@media (min-width: 960px) { .hero__inner { grid-template-columns: 1.25fr .75fr; } }
.hero__eyebrow { color: var(--orange-2); }
.hero__title { font-size: clamp(2.8rem, 7.4vw, 6rem); line-height: .96; letter-spacing: -.025em; margin: 0 0 1.1rem; color: #23286B; max-width: 12ch; text-wrap: balance; }
.hero__lead { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 40ch; color: #2B2F4A; margin-bottom: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__actions .button--light { box-shadow: 0 0 0 1px rgba(27, 31, 75, .15); }
.hero__logo { display: none; justify-items: center; gap: 1rem; }
@media (min-width: 960px) { .hero__logo { display: grid; } }
.hero-mark { width: clamp(180px, 20vw, 280px); height: auto; filter: drop-shadow(0 20px 40px rgba(60, 50, 10, .25)); overflow: visible; }
.hero__motto { font-family: var(--font-head); font-style: italic; font-weight: 700; font-size: 1.15rem; color: #2E3192; text-align: center; margin: 0; }
.hero__scroll { position: absolute; left: 50%; bottom: 1.25rem; width: 28px; height: 46px; margin-left: -14px; border: 2px solid rgba(27, 31, 75, .5); border-radius: 16px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--navy); animation: scrollcue 1.6s ease-in-out infinite; }
@keyframes scrollcue { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }

/* ---------- 2. Forge ----------
 * The photo is laid out like object-fit: cover but as a real box (.forge__plate), so the glow,
 * heat haze and spark origin are placed in photo coordinates and stay on the hot metal on any screen.
 * Default (no JS / reduced motion) shows the final state: finished instrument on a dimmed forge.
 */
.forge { --tx: .70; --ty: .50; position: relative; isolation: isolate; overflow: hidden; background: #0B0C12; color: #E7E9F2; height: 100svh; min-height: 560px; display: flex; align-items: center; }
.forge__media { position: absolute; inset: 0; z-index: 0; }
.forge__bg { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.forge__cam, .forge__shake { position: absolute; inset: 0; }
.forge__cam { transform-origin: 0 0; }
.forge__plate {
	--pw: calc(max(100cqw, 178.5714cqh) * var(--z, 1));
	--ph: calc(var(--pw) * .56);
	position: absolute; width: var(--pw); height: var(--ph);
	left: clamp(calc(100cqw - var(--pw)), calc(var(--fx, .66) * 100cqw - .522 * var(--pw)), 0px);
	top: clamp(calc(100cqh - var(--ph)), calc(var(--fy, .54) * 100cqh - .576 * var(--ph)), 0px);
}
.forge__plate > * { position: absolute; pointer-events: none; }
.forge__plate img { inset: 0; width: 100%; height: 100%; max-width: none; display: block; }
.forge__haze { left: 44%; top: 30%; width: 17%; height: 30%; background: 53.012% 42.857% / 588.235% 333.333% no-repeat; filter: url(#forge-haze);
	-webkit-mask: radial-gradient(ellipse 50% 50% at 48% 62%, #000 35%, transparent 72%); mask: radial-gradient(ellipse 50% 50% at 48% 62%, #000 35%, transparent 72%); }
.forge.is-near .forge__haze { background-image: url(../img/home/forge-plate.webp); }
.forge__core, .forge__flash, .forge__amb { left: 52.2%; top: 57.6%; translate: -50% -50%; border-radius: 50%; mix-blend-mode: screen; }
.forge__core { width: 15%; aspect-ratio: 1.8; background: radial-gradient(closest-side, rgba(255, 236, 180, .95), rgba(255, 160, 60, .5) 38%, rgba(255, 110, 20, .12) 70%, transparent); animation: forge-breathe 2.4s ease-in-out infinite; }
.forge__amb { width: 110%; aspect-ratio: 1.6; background: radial-gradient(closest-side, rgba(255, 150, 60, .22), rgba(255, 110, 40, .08) 45%, transparent); animation: forge-flicker 3.7s steps(1) infinite; }
.forge__flash { width: 95%; aspect-ratio: 1.5; opacity: 0; background: radial-gradient(closest-side, rgba(255, 214, 140, .75), rgba(255, 150, 60, .25) 35%, rgba(255, 120, 40, .06) 65%, transparent); }
@keyframes forge-breathe { 0%, 100% { opacity: .65; } 50% { opacity: .95; } }
@keyframes forge-flicker { 0% { opacity: .8; } 13% { opacity: .65; } 21% { opacity: .9; } 34% { opacity: .7; } 47% { opacity: 1; } 58% { opacity: .75; } 71% { opacity: .9; } 86% { opacity: .68; } }
.forge__dim { position: absolute; inset: 0; background: rgba(11, 12, 18, .72); -webkit-backdrop-filter: blur(6px) saturate(.75); backdrop-filter: blur(6px) saturate(.75); pointer-events: none; }
.forge__shade { position: absolute; inset: 0; pointer-events: none; background:
	linear-gradient(90deg, rgba(11, 12, 18, .92) 0%, rgba(11, 12, 18, .65) 32%, rgba(11, 12, 18, 0) 55%),
	linear-gradient(180deg, #0B0C12 0%, rgba(11, 12, 18, 0) 14%, rgba(11, 12, 18, 0) 86%, #0B0C12 100%); }
.forge__sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.forge__filters { position: absolute; width: 0; height: 0; }
.forge__pool { position: absolute; left: calc(var(--tx) * 100%); top: calc(var(--ty) * 100%); translate: -50% -50%; width: min(96vh, 860px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(7, 8, 13, .95) 0%, rgba(7, 8, 13, .82) 50%, rgba(7, 8, 13, 0) 100%); pointer-events: none; }
.forge__tool { position: absolute; left: calc(var(--tx) * 100%); top: calc(var(--ty) * 100%); translate: -50% -50%; height: min(78%, 640px); aspect-ratio: 315 / 896; pointer-events: none; }
.forge__tool img { display: block; width: 100%; height: 100%; filter: brightness(1.08) contrast(1.12) drop-shadow(0 0 16px rgba(190, 205, 255, .28)); }
.forge__shine { position: absolute; inset: 0; mix-blend-mode: screen; background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .7) 50%, transparent 58%) 130% 0 / 300% 100% no-repeat;
	-webkit-mask: url(../img/home/instrument-cut.webp) center / 100% 100% no-repeat; mask: url(../img/home/instrument-cut.webp) center / 100% 100% no-repeat; }
.forge__inner { position: relative; z-index: 2; padding-block: clamp(4rem, 9vw, 7rem); }
.forge__copy { max-width: 500px; }
.eyebrow--light { color: var(--orange); }
.forge__title { font-size: clamp(2.2rem, 5.2vw, 4.1rem); line-height: 1; color: #fff; margin-bottom: 1rem; }
.forge__text { font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: #B7BCCF; max-width: 44ch; margin: 0; }
.process { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .55rem; }
.process li { display: flex; align-items: center; gap: .9rem; padding: .75rem 1rem; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; background: rgba(11, 12, 18, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: #8E94AA; transition: color .4s, border-color .4s, background .4s; }
.process li .icon { width: 24px; height: 24px; flex: none; color: #5C6278; transition: color .4s; }
.process li.is-active { color: #fff; border-color: rgba(240, 128, 48, .5); background: rgba(240, 128, 48, .1); }
.process li.is-active .icon { color: var(--orange); }
@media (max-width: 959px) {
	.forge { --tx: .5; --ty: .56; align-items: flex-start; }
	.forge__media { top: auto; height: 58svh; }
	.forge__plate { --fx: .5; --fy: .6; }
	.forge__shade { background: linear-gradient(180deg, #0B0C12 0%, rgba(11, 12, 18, 0) 26%, rgba(11, 12, 18, 0) 86%, #0B0C12 100%); }
	.forge__pool { width: 120vw; }
	.forge__inner { padding-block: 2.25rem 0; }
	.forge__text { font-size: 1rem; }
	.process { grid-template-columns: 1fr 1fr; margin-top: 1.25rem; gap: .45rem; }
	.process li { font-size: .92rem; padding: .5rem .6rem; gap: .5rem; }
	.process li .icon { width: 18px; height: 18px; }
}

/* Phones: blueprint drawing (option C) instead of the forge photo. Default = finished drawing. */
.forge__bp { display: none; }
.bp-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bp-line { fill: none; stroke: #9CC0FF; stroke-dasharray: 1; stroke-dashoffset: 0; }
.bp-out { stroke-width: 2; }
.bp-det { stroke-width: 1; opacity: .75; }
.bp-centre { stroke: rgba(156, 192, 255, .45); stroke-width: 1; }
.bp-lead, .bp-dim { fill: none; stroke: #F08030; stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 0; }
.bp-label, .bp-dimtxt { fill: #C9D8FF; font: 600 27px var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.bp-dimtxt { text-anchor: middle; fill: #F3A46B; }
.bp-call circle { fill: #F08030; }
@media (max-width: 959px) {
	.forge { flex-direction: column; align-items: stretch; background-color: #0C1733;
		background-image: linear-gradient(rgba(120, 160, 255, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 160, 255, .13) 1px, transparent 1px), linear-gradient(rgba(120, 160, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 160, 255, .05) 1px, transparent 1px);
		background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px; background-position: center top; }
	.forge__media { display: none; }
	.forge__bp { display: block; flex: 1 1 auto; min-height: 0; width: 100%; padding: 1.25rem 1rem 1.5rem; }
	.forge__text { color: #AFC3F0; }
	.forge .process li { background: rgba(12, 23, 51, .85); border-color: rgba(156, 192, 255, .18); color: #AFC3F0; }
	.forge .process li .icon { color: #7F96C8; }
	.forge .process li.is-active { color: #fff; border-color: rgba(240, 128, 48, .55); background: rgba(240, 128, 48, .12); }
	.forge .process li.is-active .icon { color: var(--orange); }
}

/* Pinned sections (home.js wraps them in a tall .sticky-pin box). */
.sticky-pin > .forge, .sticky-pin > .journey { position: sticky; top: 0; }

/* ---------- 3. Story ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: grid; gap: .25rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--card); }
.stat__num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .stat__num { color: var(--orange); }
.stat__label { color: var(--muted); font-weight: 500; }
.timeline { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); position: relative; }
.timeline__item { position: relative; padding: 1.5rem 1.4rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.timeline__item::before { content: ""; position: absolute; left: 1.4rem; top: 0; width: 48px; height: 4px; background: var(--orange); border-radius: 0 0 4px 4px; }
.timeline__year { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2.2rem; color: var(--blue); line-height: 1; margin-bottom: .6rem; }
[data-theme="dark"] .timeline__year { color: #fff; }
.timeline__item h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.timeline__item p { margin: 0; color: var(--muted); }
.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- 4. Range ---------- */
.section-head--split { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; max-width: none; }
.range__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.range-card a { position: relative; display: flex; flex-direction: column; height: 100%; padding: 1.25rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; overflow: hidden; transition: transform .3s, box-shadow .3s; }
.range-card a::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--section-color); }
.range-card a::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--section-color); opacity: .08; transition: transform .4s, opacity .4s; }
.range-card a:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.range-card a:hover::after { transform: scale(1.4); opacity: .14; }
.range-card__num { font-family: var(--font-head); font-weight: 800; font-size: .95rem; color: var(--section-color); }
.range-card__media { display: block; aspect-ratio: 4 / 3; margin: .5rem 0 1rem; border-radius: 10px; background: var(--well); overflow: hidden; }
.range-card__media img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; mix-blend-mode: multiply; transition: transform .4s; }
.range-card a:hover .range-card__media img { transform: scale(1.06) rotate(-2deg); }
.range-card__name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
.range-card__count { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .9rem; color: var(--section-color); font-weight: 600; font-size: .95rem; }

/* ---------- 5. Production journey ----------
 * Without JS it is a swipeable strip; home.js adds .is-pinned and turns vertical scroll into sideways travel.
 */
.journey { position: relative; overflow: hidden; background: #0B0C12; color: #E7E9F2; }
.journey__track { display: flex; align-items: center; overflow-x: auto; scroll-snap-type: x mandatory; padding-block: clamp(3.5rem, 8vw, 6rem); scrollbar-width: thin; }
.journey__panel { flex: 0 0 auto; position: relative; width: min(84vw, 800px); margin: 0; padding-inline: clamp(.6rem, 1.6vw, 1.25rem); scroll-snap-align: center; }
.journey__panel--intro { width: min(92vw, 600px); padding-left: max(1rem, calc((100vw - var(--container)) / 2 + 1rem)); padding-right: clamp(1.5rem, 4vw, 3rem); }
.journey__title { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.02; color: #fff; margin-bottom: 1rem; }
.journey__lead { color: #B7BCCF; font-size: clamp(1.05rem, 1.8vw, 1.2rem); max-width: 40ch; }
.journey .link-arrow { color: #FFB27A; }
.journey__card { position: relative; height: min(58svh, 460px); border-radius: 16px; overflow: hidden; background: #15161E; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.journey__card img { position: absolute; top: 0; left: -6%; width: 112%; height: 100%; max-width: none; object-fit: cover; }
.journey__card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 12, 18, 0) 45%, rgba(11, 12, 18, .92) 100%); }
.journey__num { position: absolute; z-index: 2; top: -.2em; right: clamp(1rem, 3vw, 2.5rem); font: 800 clamp(4.5rem, 11vw, 9.5rem) / 1 var(--font-head); color: transparent; -webkit-text-stroke: 1.5px rgba(240, 128, 48, .75); pointer-events: none; }
.journey__cap { position: absolute; z-index: 1; left: 1.5rem; right: 1.5rem; bottom: 1.25rem; }
.journey__cap h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.05; color: #fff; margin: 0 0 .3rem; }
.journey__cap p { margin: 0; color: #C3C8D8; }
.journey__bar, .journey__sparks { display: none; }
.journey.is-pinned { height: 100svh; }
.journey.is-pinned .journey__track { overflow: visible; height: 100%; width: max-content; padding-block: 0; scroll-snap-type: none; will-change: transform; }
.journey.is-pinned .journey__bar { display: block; position: absolute; z-index: 2; left: 6vw; right: 6vw; bottom: 6svh; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .1); }
.journey.is-pinned .journey__sparks { display: block; position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.journey__fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #B4500E, #F08030); transform-origin: 0 50%; transform: scaleX(0); }
.journey__head { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #FFF3D6; box-shadow: 0 0 12px 4px rgba(255, 150, 50, .9), 0 0 32px 10px rgba(255, 110, 30, .45); }
@media (max-width: 959px) {
	.journey__card { height: 50svh; }
}

/* ---------- 6. Marks ---------- */
.marks { padding-block: 0 clamp(3rem, 7vw, 5rem); }

/* ---------- 7. CTA ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; }
.cta__bg { position: absolute; inset: 0; z-index: -1; }
.cta__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.cta__inner { display: grid; gap: 1.5rem; align-items: center; padding-block: clamp(3.5rem, 8vw, 5.5rem); }
@media (min-width: 900px) { .cta__inner { grid-template-columns: 1fr auto; } }
.cta__title { font-size: clamp(2rem, 4.5vw, 3.2rem); color: #fff; margin-bottom: .5rem; }
.cta p { color: #C9CDE3; font-size: 1.1rem; margin: 0; max-width: 52ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Dark mode tweaks for the farm scene */
[data-theme="dark"] .hero__sky { background: linear-gradient(180deg, #1A1F3D 0%, #3B3560 40%, #A0675A 78%, #D99A62 100%); }
[data-theme="dark"] .hero__sun { background: radial-gradient(circle, #FFD58A 0%, #F59A3C 70%); box-shadow: 0 0 120px 50px rgba(245, 154, 60, .35); }
[data-theme="dark"] .hero__hills path[data-layer="far"] { fill: #4B6A3A; }
[data-theme="dark"] .hero__hills path[data-layer="back"] { fill: #3B5A2C; }
[data-theme="dark"] .hero__hills path[data-layer="mid"] { fill: #2D4A21; }
[data-theme="dark"] .hero__hills path[data-layer="front"] { fill: #1F3618; }
[data-theme="dark"] .walker { background: #0E1A0A; }
[data-theme="dark"] .hero__title, [data-theme="dark"] .hero__motto { color: #fff; }
[data-theme="dark"] .hero__lead { color: #E7E2EA; }
[data-theme="dark"] .hero__scroll { border-color: rgba(255, 255, 255, .5); }
[data-theme="dark"] .hero__scroll span { background: #fff; }

@media (prefers-reduced-motion: reduce) {
	.walker { animation: none; }
	.walker:nth-child(1) { transform: translateX(8vw); }
	.walker:nth-child(3) { transform: translateX(40vw); }
	.walker:nth-child(4) { transform: translateX(62vw); }
	.walker:nth-child(n+5), .walker:nth-child(2) { display: none; }
	.forge__core, .forge__amb { animation: none; }
	.forge__haze { display: none; }
}
