/* -----------------------------------------------------------------------
   "ניתוח קמפיינים" category archive (slug: atara).
   The hero is the medium the section reviews: a trivision billboard whose
   six slats turn in a staggered ripple, each carrying two campaign images.
   Below it, a two-per-row feed of campaign cards.
   ----------------------------------------------------------------------- */

/* --- Hero ------------------------------------------------------------- */
/* Pulled up by .site-content's own padding so the plane meets the header with
   no seam, and stretched past .container to the viewport edges. Short by
   design: the frame is a band across the top of the page, not a screenful. */
.atara-hero {
	position: relative;
	display: grid;
	place-items: center;
	min-block-size: clamp(290px, 44vh, 430px);
	margin-block-start: calc(-1 * var(--shivuk-space));
	padding-block: clamp(1.9rem, 4.8vw, 3.25rem);
	overflow: hidden;
	text-align: center;
	/* Ink, warmed a little towards the brand blue at the top left so the plane
	   has a direction of light before anything is drawn on it. */
	background:
		radial-gradient(120% 90% at 12% 0%, #0f3352 0%, transparent 58%),
		linear-gradient(180deg, #071827 0%, #050f1a 62%, #040c15 100%);
	color: #ffffff;
	/* Own stacking context: the stage sits on negative z and can never escape
	   behind the page itself. */
	isolation: isolate;
}

/* --- The stage -------------------------------------------------------- */
/* Below the hero's own vignette (z-index: -1), not level with it: equal z-index
   would leave the order to the DOM, and the stage would paint over the scrim
   meant to keep the title legible. */
.atara-stage {
	position: absolute;
	inset: 0;
	z-index: -2;
	pointer-events: none;
}

/* The measurement grid. Two hairline sets at a fixed 64px pitch — a grid that
   scaled with the viewport would read as decoration; one that holds its pitch
   reads as a ruler. Masked so it fades out before it reaches any edge, which
   is what keeps it from looking like a table. */
.atara-stage__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(140, 190, 230, 0.07) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(140, 190, 230, 0.07) 1px, transparent 1px);
	background-size: 64px 64px;
	-webkit-mask-image: radial-gradient(88% 82% at 50% 42%, #000 0%, transparent 78%);
	mask-image: radial-gradient(88% 82% at 50% 42%, #000 0%, transparent 78%);
}

/* Two slow washes of the accent, drifting on different clocks and axes. They
   are the only real colour in the frame, and they never repeat their meeting
   point — the durations are deliberately not multiples of each other. */
.atara-stage__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.55;
	mix-blend-mode: screen;
	will-change: transform;
}

.atara-stage__glow--a {
	inset-block-start: -18%;
	inset-inline-end: -6%;
	inline-size: min(58vw, 720px);
	block-size: min(58vw, 720px);
	background: radial-gradient(circle, var(--shivuk-color-accent), transparent 68%);
	animation: atara-drift-a 29s ease-in-out infinite alternate;
}

.atara-stage__glow--b {
	inset-block-end: -30%;
	inset-inline-start: -12%;
	inline-size: min(46vw, 560px);
	block-size: min(46vw, 560px);
	background: radial-gradient(circle, #2ea6a0, transparent 68%);
	opacity: 0.32;
	animation: atara-drift-b 41s ease-in-out infinite alternate;
}

@keyframes atara-drift-a {
	from {
		transform: translate3d(0, 0, 0) scale(1);
	}

	to {
		transform: translate3d(-6%, 7%, 0) scale(1.16);
	}
}

@keyframes atara-drift-b {
	from {
		transform: translate3d(0, 0, 0) scale(1.1);
	}

	to {
		transform: translate3d(8%, -6%, 0) scale(0.94);
	}
}

/* --- The plot --------------------------------------------------------- */
/* Stretched to the hero's shape; the strokes stay hairlines through that
   stretch because every path carries vector-effect="non-scaling-stroke". */
.atara-stage__plot {
	position: absolute;
	inset-block-end: 0;
	inset-inline: 0;
	inline-size: 100%;
	block-size: min(76%, 330px);
	overflow: visible;
}

/* The curves draw themselves once on arrival, the lead one first and the
   trailing one just behind it. pathLength is not set, so the dash values are
   in user units — 3000 comfortably exceeds either path's real length, which
   is all a draw-on needs. */
.atara-plot__line {
	stroke-linecap: round;
	stroke-dasharray: 3000;
	stroke-dashoffset: 3000;
	animation: atara-draw 2.6s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s forwards;
}

.atara-plot__line--lead {
	stroke: var(--shivuk-color-accent);
	stroke-width: 2.5;
	/* The line reads as lit rather than printed — the glow is what separates it
	   from the grid behind it. */
	filter: drop-shadow(0 0 10px rgba(26, 125, 190, 0.85));
}

.atara-plot__line--trail {
	stroke: rgba(255, 255, 255, 0.22);
	stroke-width: 1.5;
	stroke-dasharray: 6 9;
	stroke-dashoffset: 0;
	animation: atara-fade-in 1.4s ease 0.9s both;
}

.atara-plot__area {
	opacity: 0;
	animation: atara-fade-in 2s ease 1.1s forwards;
}

@keyframes atara-draw {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes atara-fade-in {
	to {
		opacity: 1;
	}
}

/* The reading head: a lit point running the lead curve on a loop, long after
   the drawing is done. One moving object in the whole frame. */
.atara-plot__marker {
	fill: #ffffff;
	filter: drop-shadow(0 0 12px rgba(26, 125, 190, 0.95));
	animation: atara-fade-in 1.2s ease 2s both;
}

/* The floor: a lit edge where the hero meets the feed, so the two surfaces
   part on a line of light instead of a colour change. */
.atara-stage__horizon {
	position: absolute;
	inset-block-end: 0;
	inset-inline: 0;
	block-size: 1px;
	background: linear-gradient(90deg, transparent, rgba(26, 125, 190, 0.7) 22%, rgba(255, 255, 255, 0.35) 50%, rgba(26, 125, 190, 0.7) 78%, transparent);
	opacity: 0.9;
}

/* Vignette + floor: holds the type legible over the brightest part of the
   plot and resolves to the hero's own colour at the bottom, so nothing the
   stage draws ever reaches the feed. */
.atara-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(64% 56% at 50% 44%, rgba(4, 12, 21, 0.62), transparent 76%),
		linear-gradient(180deg, rgba(5, 15, 26, 0.55) 0%, transparent 34%, rgba(4, 12, 21, 0.7) 100%);
	pointer-events: none;
}

/* --- Hero content ----------------------------------------------------- */
/* The type arrives once, on load, and then holds still — the movement on this
   page belongs to the board behind it. */
.atara-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.atara-hero__rule {
	inline-size: 0;
	block-size: 3px;
	margin-block-end: clamp(0.85rem, 1.8vw, 1.15rem);
	border-radius: 999px;
	background: linear-gradient(90deg, transparent, var(--shivuk-color-accent), transparent);
	animation: atara-rule 1.1s var(--shivuk-ease) 0.1s both;
}

@keyframes atara-rule {
	from {
		inline-size: 0;
		opacity: 0;
	}

	to {
		inline-size: clamp(64px, 9vw, 110px);
		opacity: 1;
	}
}

.atara-hero__title {
	margin: 0;
	font-size: clamp(2.3rem, 1rem + 6vw, 5rem);
	font-weight: 800;
	line-height: 1.03;
	letter-spacing: -0.03em;
	text-wrap: balance;
	text-shadow: 0 2px 34px rgba(4, 12, 21, 0.55);
	animation: atara-reveal 1s var(--shivuk-ease) 0.15s both;
}

/* Uncovered from below rather than faded in — a poster being pasted up. */
@keyframes atara-reveal {
	from {
		opacity: 0;
		transform: translateY(18px);
		clip-path: inset(0 0 100% 0);
	}

	to {
		opacity: 1;
		transform: translateY(0);
		clip-path: inset(0 0 -10% 0);
	}
}

.atara-hero__desc {
	margin: 1rem 0 0;
	max-inline-size: 62ch;
	font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.84);
	text-wrap: pretty;
	animation: atara-rise 0.9s var(--shivuk-ease) 0.4s both;
}

.atara-hero__count {
	margin-block-start: clamp(1.1rem, 2.4vw, 1.5rem);
	padding: 0.5em 1.25em;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(8px);
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #ffffff;
	animation: atara-rise 0.9s var(--shivuk-ease) 0.55s both;
}

@keyframes atara-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* --- Feed ------------------------------------------------------------- */
.atara-archive__body {
	padding-block-start: clamp(2rem, 5vw, 3.5rem);
}

.atara-feed {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 4vw, 3.25rem) clamp(1.5rem, 3vw, 2.5rem);
	align-items: start;
}

@media (max-width: 640px) {
	.atara-feed {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* --- The card: a campaign still ---------------------------------------- */
/* .post-card is inherited for the load-more selector's sake (navigation.js
   lifts .content-area .post-card out of the fetched page), so its horizontal
   layout and hairline rhythm are unwound here. */
.atara-card {
	display: flex;
	flex-direction: column;
	gap: clamp(0.9rem, 2vw, 1.15rem);
	padding-block-end: 0;
	border-block-end: 0;
}

.atara-feed .post-card + .post-card {
	margin-block-start: 0;
}

.atara-card__thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	border-radius: clamp(14px, 1.8vw, 22px);
	box-shadow: var(--shivuk-shadow-sm);
	transition:
		transform 0.5s var(--shivuk-ease),
		box-shadow 0.5s var(--shivuk-ease);
}

.atara-card:hover .atara-card__thumb,
.atara-card:focus-within .atara-card__thumb {
	transform: translateY(-5px);
	box-shadow: var(--shivuk-shadow-md);
}

/* A single diagonal highlight travelling across the still on hover — the
   gloss of a printed poster catching light, and the one flourish the card
   allows itself. */
.atara-card__sheen {
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.22) 50%, transparent 62%);
	transform: translateX(-120%);
	opacity: 0;
	pointer-events: none;
}

.atara-card:hover .atara-card__sheen {
	opacity: 1;
	transition: none;
	animation: atara-sheen 0.9s var(--shivuk-ease);
}

@keyframes atara-sheen {
	from {
		transform: translateX(-120%);
	}

	to {
		transform: translateX(120%);
	}
}

/* Section tag, set like a poster credit line. */
.atara-card__badge {
	position: absolute;
	inset-block-start: 0.85rem;
	inset-inline-start: 0.85rem;
	padding: 0.35em 0.9em;
	border-radius: 999px;
	background: rgba(6, 18, 31, 0.66);
	backdrop-filter: blur(8px);
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Archives freeze the shared card zoom (body.archive rule in style.css); a
   slight one comes back here, under the lift. */
body.archive .atara-card:hover .post-card__thumb img {
	transform: scale(1.04);
}

.atara-card .home-thumb-empty {
	display: grid;
	place-items: center;
	inline-size: 100%;
	block-size: 100%;
	color: var(--shivuk-color-border);
}

.atara-card .home-thumb-empty svg {
	inline-size: 36px;
	block-size: 36px;
}

.atara-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	padding-inline: clamp(0.15rem, 0.6vw, 0.4rem);
}

.atara-card__date {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--shivuk-color-muted);
}

.atara-card .entry-title {
	font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem);
	line-height: 1.24;
	letter-spacing: -0.015em;
}

.atara-card .entry-title a {
	transition: color 0.3s var(--shivuk-ease);
}

.atara-card:hover .entry-title a {
	color: var(--shivuk-color-accent);
}

/* Three lines on desktop, two on mobile — a fixed block of text, so no
   excerpt can set the height of the row it sits in. */
.atara-card .entry-summary {
	font-size: 0.97rem;
	line-height: 1.65;
	color: var(--shivuk-color-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 640px) {
	.atara-card .entry-summary {
		-webkit-line-clamp: 2;
	}
}

/* Full-width bands inside the two-column grid. */
.atara-feed__promo,
.atara-feed .load-more {
	grid-column: 1 / -1;
}

.atara-feed__promo {
	margin-block: clamp(0.5rem, 1.5vw, 1rem);
}

/* The Dream Job banner is drawn for a single card slot; across the full width
   it needs more air above and below than its card padding gives it. */
.atara-feed__promo .home-dreamjob {
	padding-block: clamp(2rem, 4vw, 3rem);
}

/* --- Motion preferences ----------------------------------------------- */
/* The plot is simply drawn and the type is simply there — nothing travels,
   nothing arrives. The curves have to be given their finished state by hand,
   since without the animation the dash offset would leave them invisible. */
@media (prefers-reduced-motion: reduce) {
	.atara-stage__glow,
	.atara-plot__line,
	.atara-plot__area,
	.atara-plot__marker,
	.atara-hero__rule,
	.atara-hero__title,
	.atara-hero__desc,
	.atara-hero__count {
		animation: none;
	}

	.atara-plot__line {
		stroke-dashoffset: 0;
	}

	.atara-plot__area {
		opacity: 1;
	}

	/* SMIL keeps running regardless of the media query, so the travelling
	   marker is taken off the frame rather than stopped. */
	.atara-plot__marker {
		display: none;
	}

	.atara-hero__rule {
		inline-size: clamp(64px, 9vw, 110px);
	}

	.atara-card__thumb {
		transition: none;
	}

	.atara-card:hover .atara-card__thumb,
	.atara-card:focus-within .atara-card__thumb {
		transform: none;
	}

	.atara-card:hover .atara-card__sheen {
		animation: none;
		opacity: 0;
	}

	body.archive .atara-card:hover .post-card__thumb img {
		transform: none;
	}
}
