/* ==========================================================================
   Home page sections
   ========================================================================== */

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 56px) 0 clamp(60px, 8vw, 100px); }
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__grid {
	position: absolute; inset: 0;
	background-image: radial-gradient(circle at 1px 1px, rgba(14, 27, 44, .12) 1px, transparent 0);
	background-size: 26px 26px;
	mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 30%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: blob 18s ease-in-out infinite alternate; }
.blob--green { width: 520px; height: 520px; right: -120px; top: -140px; background: #BFE3D3; }
.blob--gold { width: 420px; height: 420px; left: -160px; bottom: -160px; background: #F6DFA6; animation-delay: -6s; }
.hero__calligraphy {
	position: absolute; right: 4%; bottom: -6%;
	font-size: clamp(8rem, 22vw, 20rem); line-height: 1.4;
	color: transparent; -webkit-text-stroke: 1.2px rgba(201, 154, 46, .22);
	transform: rotate(-4deg);
}
.hero__inner { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.hero__kicker {
	display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
	padding: 7px 16px 7px 10px; margin-bottom: clamp(12px, 2.6vh, 26px);
	border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line);
	box-shadow: var(--shadow-sm);
	font-size: var(--fs-sm); font-weight: 550; color: var(--ink-2);
}
.hero__kicker strong { color: var(--ink); }
.hero__kicker-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); animation: pulse-green 2s infinite; }
.hero__kicker-sep { width: 1px; height: 14px; background: var(--line-2); }

.hero__title {
	font-size: clamp(2.4rem, min(1.6rem + 4.6vw, 9.4vh), 5.4rem); font-weight: 700; line-height: 1.02; letter-spacing: -.035em;
	font-variation-settings: "SOFT" 100, "opsz" 144;
	margin-bottom: clamp(6px, 1.4vh, 14px);
}
.rotator { position: relative; display: inline-grid; vertical-align: bottom; color: var(--green); font-style: italic; font-weight: 600; }
.rotator::after {
	content: ""; position: absolute; left: 0; right: .2em; bottom: .04em; height: .12em; z-index: -1;
	background: var(--gold-2); opacity: .55; border-radius: 4px;
	transform-origin: 0 50%; animation: underline 3s var(--ease) infinite;
}
.rotator__word {
	grid-area: 1 / 1; opacity: 0; transform: translateY(.45em) rotateX(-60deg); filter: blur(6px);
	transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease);
}
.rotator__word.is-active { opacity: 1; transform: none; filter: none; }
.rotator__word.is-leaving { opacity: 0; transform: translateY(-.45em) rotateX(60deg); filter: blur(6px); }

.hero__ur { font-size: clamp(1.1rem, min(1rem + 1vw, 3.7vh), 1.9rem); color: var(--green); margin: 0 0 clamp(6px, 1.6vh, 18px); line-height: 2; }
.hero__lead { font-size: clamp(.98rem, min(1rem + .3vw, 2.5vh), 1.22rem); max-width: 54ch; margin-bottom: clamp(14px, 2.8vh, 28px); }
.hero__lead mark { background: linear-gradient(transparent 60%, var(--gold-soft) 60%); color: var(--ink); font-weight: 600; padding: 0 2px; }

.hero-search {
	display: flex; align-items: center; gap: 12px;
	max-width: 560px; padding: 8px 8px 8px 20px; margin-bottom: clamp(12px, 2.4vh, 24px);
	border-radius: var(--r-pill); background: var(--surface); border: 1.5px solid var(--line);
	box-shadow: var(--shadow);
	transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.hero-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 5px rgba(11, 122, 90, .12), var(--shadow-lg); transform: translateY(-2px); }
.hero-search > .icon { color: var(--green); }
.hero-search input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font-size: 1.02rem; outline: none; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Visual */
.hero__visual { position: relative; aspect-ratio: 4 / 5; max-width: 500px; justify-self: center; width: min(100%, calc((100svh - var(--hero-top, 156px) - 96px) * .8)); }
.arch { position: absolute; inset: 4% 10% 0 6%; }
.arch__frame {
	position: absolute; inset: 0; overflow: hidden;
	border-radius: 999px 999px var(--r-lg) var(--r-lg);
	box-shadow: var(--shadow-lg);
	border: 8px solid var(--surface);
}
.arch__frame .ph { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; height: 100%; }
.arch__img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
	transform: scale(1.08); transition: transform 1.6s var(--ease);
}
.is-visible .arch__img { transform: scale(1); }
.hero__visual:hover .arch__img { transform: scale(1.04); }
/* Slow light sweep across the photo */
.arch__shine {
	position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
	transform: translateX(-120%); animation: shine 7s var(--ease) 1.5s infinite;
}
@keyframes shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.arch__ring {
	position: absolute; inset: -16px; border-radius: 999px 999px 36px 36px;
	border: 1.5px dashed rgba(201, 154, 46, .55);
}
.scales {
	position: absolute; left: -9%; bottom: -3%; width: 42%; padding: 12px !important;
	filter: drop-shadow(0 18px 24px rgba(14, 27, 44, .18));
	padding: 18px; border-radius: 28px;
	background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, .9);
}
.scales__beam { transform-origin: 120px 48px; transform: rotate(var(--tilt, 0deg)); transition: transform 1.2s var(--ease-spring); }
.scales__pan { transition: transform 1.2s var(--ease-spring); }
.scales__pan--l { transform-origin: 40px 48px; transform: rotate(calc(var(--tilt, 0deg) * -1)); }
.scales__pan--r { transform-origin: 200px 48px; transform: rotate(calc(var(--tilt, 0deg) * -1)); }

.float-card {
	position: absolute; display: flex; align-items: center; gap: 12px;
	padding: 12px 16px 12px 12px; border-radius: 18px;
	background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--line); box-shadow: var(--shadow-lg);
	max-width: 260px; font-size: var(--fs-sm); line-height: 1.35;
	animation: bob 6s ease-in-out infinite;
}
.float-card strong { display: block; color: var(--ink); }
.float-card span:not(.float-card__icon) { color: var(--ink-3); font-size: var(--fs-xs); }
.float-card .ur { font-size: .9rem !important; color: var(--green) !important; line-height: 1.8; }
.float-card__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; }
.float-card__icon--green { background: var(--green-soft); color: var(--green); }
.float-card__icon--sky { background: var(--sky-soft); color: var(--sky); }
.float-card__icon--rose { background: var(--rose-soft); color: var(--rose); }
.float-card--a { top: 6%; right: -4%; }
.float-card--b { top: 44%; right: -10%; animation-delay: -2s; }
.float-card--c { bottom: -2%; right: 8%; animation-delay: -4s; }
.float-card > div { transform: translate3d(0, 0, 0); }

.hero__scroll {
	position: absolute; left: 50%; bottom: 18px; z-index: 2;
	width: 26px; height: 42px; border: 2px solid var(--line-2); border-radius: 14px;
	transform: translateX(-50%);
}
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--green); animation: scroll-cue 1.8s var(--ease) infinite; }

/* Desktop: hero fills the screen below the ticker/header (--hero-top measured in JS) */
@media (min-width: 1025px) {
	.hero {
		display: flex; align-items: center;
		min-height: calc(100svh - var(--hero-top, 156px));
		padding-block: clamp(16px, 3vh, 48px) clamp(28px, 5vh, 64px);
	}
}
@media (min-width: 1025px) and (max-height: 760px) { .hero__scroll { display: none; } }
@media (min-width: 1025px) and (max-height: 620px) { .hero__lead { display: none; } }

/* ---------- Areas ---------- */
.areas__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.area-tile {
	--c: var(--green); --c-soft: var(--green-soft);
	position: relative; overflow: hidden; isolation: isolate;
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
	padding: 18px 20px; border-radius: var(--r);
	background: var(--surface); border: 1px solid var(--line);
	color: var(--ink); text-decoration: none;
	transition: transform .45s var(--ease), box-shadow .45s var(--ease), color .35s, border-color .3s;
}
.area-tile::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: var(--c); clip-path: circle(0 at 44px 50%);
	transition: clip-path .6s var(--ease);
}
.area-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: #fff; border-color: transparent; }
.area-tile:hover::before { clip-path: circle(150% at 44px 50%); }
.area-tile__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--c-soft); color: var(--c); transition: transform .5s var(--ease-spring), background .3s; }
.area-tile:hover .area-tile__icon { background: rgba(255, 255, 255, .18); color: #fff; transform: rotate(-8deg) scale(1.06); }
.area-tile__text { display: grid; line-height: 1.2; }
.area-tile__name { font-weight: 650; font-size: 1.05rem; }
.area-tile__ur { font-size: .95rem; color: var(--c); line-height: 1.9; transition: color .3s; }
.area-tile:hover .area-tile__ur { color: rgba(255, 255, 255, .85); }
.area-tile__count { font-family: var(--font-mono); font-size: .78rem; padding: 3px 8px; border-radius: 8px; background: var(--paper); color: var(--ink-3); transition: opacity .3s; }
.area-tile__arrow { position: absolute; right: 18px; opacity: 0; transform: translate(-8px, 8px); transition: opacity .35s, transform .45s var(--ease); }
.area-tile:hover .area-tile__count { opacity: 0; }
.area-tile:hover .area-tile__arrow { opacity: 1; transform: none; }

/* ---------- Cases bento ---------- */
.bento { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; gap: clamp(16px, 2vw, 24px); }
.bento > :first-child { grid-row: span 2; }
.status-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.status-legend .pill { text-decoration: none; transition: transform .25s var(--ease); }
.status-legend .pill:hover { transform: translateY(-2px); }

/* ---------- Tabs & news ---------- */
.tabs {
	position: relative; display: inline-flex; gap: 4px; margin-bottom: 28px;
	padding: 5px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line);
}
.tabs__btn {
	position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 20px; border: 0; border-radius: var(--r-pill); background: none;
	font-weight: 600; color: var(--ink-2); transition: color .3s;
}
.tabs__btn .ur { font-size: .9rem; line-height: 1; transform: translateY(2px); }
.tabs__btn[aria-selected="true"] { color: #fff; }
.tabs__indicator {
	position: absolute; top: 5px; bottom: 5px; left: 0; width: var(--w, 0); border-radius: var(--r-pill);
	background: var(--ink); transform: translateX(var(--x, 0));
	transition: transform .5s var(--ease), width .5s var(--ease);
}
.tab-panel { animation: panel-in .6s var(--ease); }
.news-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.news-split__lead .card__title { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); }
.empty { padding: 32px; text-align: center; color: var(--ink-3); border: 1.5px dashed var(--line-2); border-radius: var(--r); }

/* ---------- Laws filter ---------- */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-bar__search {
	display: flex; align-items: center; gap: 10px; flex: 1; max-width: 460px;
	padding: 0 18px; border-radius: var(--r-pill); background: var(--surface); border: 1.5px solid var(--line);
	transition: border-color .25s, box-shadow .25s;
}
.filter-bar__search:focus-within { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(47, 111, 214, .12); }
.filter-bar__search .icon { color: var(--sky); }
.filter-bar__search input { flex: 1; height: 52px; border: 0; background: none; outline: none; }
.filter-bar__count { margin: 0; color: var(--ink-3); font-size: var(--fs-sm); }
.filter-bar__count strong { color: var(--ink); font-family: var(--font-mono); }

/* ---------- Rights flip cards ---------- */
.rights__hint { display: flex; align-items: center; gap: 8px; margin: -16px 0 24px; color: var(--ink-3); font-size: var(--fs-sm); }
.rights__hint .ur { font-size: .9rem; }
.rights__hint .icon { color: var(--gold); }
.flip {
	--c: var(--green); --c-soft: var(--green-soft);
	position: relative; min-height: 270px; padding: 0; border: 0; background: none; text-align: left;
	perspective: 1200px; color: inherit;
}
.flip__inner { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform .9s var(--ease-spring); }
.flip[aria-pressed="true"] .flip__inner { transform: rotateY(180deg); }
.flip:hover .flip__inner { transform: rotateY(8deg); }
.flip[aria-pressed="true"]:hover .flip__inner { transform: rotateY(172deg); }
.flip__face {
	position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px;
	padding: 26px; border-radius: var(--r-lg);
	backface-visibility: hidden; -webkit-backface-visibility: hidden;
	border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.flip__front { background: var(--surface); }
.flip__back { background: var(--c); color: #fff; transform: rotateY(180deg); justify-content: center; }
.flip__art { font-family: var(--font-mono); font-size: .78rem; font-weight: 500; color: var(--c); letter-spacing: .02em; }
.flip__back .flip__art { color: rgba(255, 255, 255, .8); }
.flip__icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 8px 0 6px; border-radius: 18px; background: var(--c-soft); color: var(--c); }
.flip__icon .icon { width: 28px; height: 28px; }
.flip__title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 650; color: var(--ink); line-height: 1.2; }
.flip__ur { font-size: 1.1rem; color: var(--c); line-height: 2; }
.flip__cue { position: absolute; right: 22px; bottom: 22px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: transform .4s var(--ease), background .3s, color .3s; }
.flip:hover .flip__cue { background: var(--ink); color: #fff; transform: rotate(-45deg); }
.flip__text { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.45; }

/* ---------- Voices ---------- */
.voices-home__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.voices-home__intro { position: sticky; top: calc(var(--header-h) + 32px); }
.voices-home__intro .section-title { max-width: 14ch; }
.voices-home__intro > p:not(.eyebrow):not(.ur) { margin-top: 18px; max-width: 46ch; }
.voices-home__steps { display: grid; gap: 10px; margin: 26px 0 30px; }
.voices-home__steps div { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--ink); }
.voices-home__steps span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--rose-soft); color: var(--rose); font-family: var(--font-mono); font-size: .85rem; }
.voices-home__list { display: grid; gap: 18px; }

/* ---------- Stats ---------- */
.stats { padding-block: clamp(20px, 4vw, 40px); }
.stats__grid {
	display: grid; grid-template-columns: repeat(4, 1fr);
	border-radius: var(--r-lg); overflow: hidden;
	background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stat { position: relative; padding: clamp(24px, 3vw, 40px); text-align: center; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 1px; background: var(--line); }
.stat__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--green-soft); color: var(--green); margin-bottom: 10px; }
.stat__num { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); color: var(--ink); line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat__label { margin: 6px 0 0; font-weight: 600; color: var(--ink-2); }
.stat__ur { margin: 0; color: var(--green); font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band {
	position: relative; overflow: hidden; isolation: isolate;
	display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px;
	padding: clamp(32px, 5vw, 64px);
	border-radius: 36px; color: #fff;
	background:
		radial-gradient(circle at 85% 20%, rgba(226, 182, 73, .35), transparent 40%),
		linear-gradient(135deg, #0B7A5A 0%, #075A43 60%, #0E1B2C 130%);
	box-shadow: 0 30px 60px -24px rgba(11, 122, 90, .55);
}
.cta-band h2 { color: #fff; max-width: 20ch; margin-bottom: 6px; }
.cta-band .ur { color: var(--gold-2); font-size: 1.2rem; margin: 0; }
.eyebrow--light { color: var(--gold-2); }
.cta-band__actions { display: flex; flex-direction: column; gap: 12px; }
.btn--on-dark { --fg: #fff; --bd: rgba(255, 255, 255, .35); }
.btn--on-dark:hover { --bg: rgba(255, 255, 255, .1); --fg: #fff; }
.cta-band__deco { position: absolute; right: 22%; top: 50%; z-index: -1; transform: translateY(-50%); }
.cta-band__gavel { width: 220px; height: 220px; color: rgba(255, 255, 255, .07); transform-origin: 80% 80%; animation: gavel 4s var(--ease) infinite; }
.cta-band__ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); transform: translate(-50%, -50%); animation: ripple 4s var(--ease) infinite; }
.cta-band__ring--1 { width: 260px; height: 260px; }
.cta-band__ring--2 { width: 400px; height: 400px; animation-delay: .4s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__visual { max-width: 420px; margin-top: 16px; }
	.areas__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bento { grid-template-columns: 1fr 1fr; }
	.bento > :first-child { grid-column: 1 / -1; grid-row: auto; }
	.news-split, .voices-home__inner { grid-template-columns: 1fr; }
	.voices-home__intro { position: static; }
	.stats__grid { grid-template-columns: repeat(2, 1fr); }
	.stat:nth-child(3)::before { display: none; }
	.cta-band { grid-template-columns: 1fr; }
	.cta-band__actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 640px) {
	.hero { padding-top: 28px; }
	.hero__kicker { font-size: .8rem; }
	.hero-search { padding-left: 16px; }
	.hero-search .btn { padding: 0 14px; }
	.hero__actions .btn { flex: 1; }
	.hero__visual { max-width: 340px; }
	.float-card { max-width: 200px; padding: 8px 12px 8px 8px; }
	.float-card--a { right: -2%; }
	.float-card--b { display: none; }
	.scales { width: 50%; left: -2%; }
	.hero__actions .btn { padding: 0 16px; }
	.areas__grid { grid-template-columns: 1fr; }
	.bento { grid-template-columns: 1fr; }
	.tabs { display: flex; }
	.tabs__btn { flex: 1; justify-content: center; padding-inline: 10px; }
	.stats__grid { grid-template-columns: 1fr 1fr; }
	.stat { padding: 22px 12px; }
	.flip { min-height: 250px; }
	.hero__scroll { display: none; }
}
