/* ==========================================================================
   XV Всероссийская Беломорская конференция — 2026
   Stylesheet

   Theme: the White Sea on the edge of the Arctic. Deep navy water, ice-white
   text, and a single crimson "boundary line" accent that echoes «на границе»
   (on the border). One spacing scale, one type scale, used everywhere.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
	/* Colour palette */
	--navy:         #003658;   /* primary deep-water sections */
	--navy-deep:    #00263f;   /* hero gradient floor */
	--abyss:        #000628;   /* footer, deepest tone */
	--ice:          #f8f9f4;   /* light section background */
	--ice-paper:    #eef1ee;   /* alternate light surface (cards) */
	--crimson:      #c80032;   /* the one brand red, used everywhere */
	--crimson-lit:  #fa003e;   /* brighter red for focus outlines */

	--text-on-dark:      #f8f8f4;
	--text-on-dark-soft: rgba(248, 248, 244, 0.82);  /* talk titles, lead text */
	--text-on-dark-dim:  rgba(248, 248, 244, 0.6);   /* true captions */
	--text-on-light:     #16303f;
	--text-on-light-soft:rgba(22, 48, 63, 0.82);
	--text-on-light-dim: rgba(22, 48, 63, 0.7);   /* 0.58 failed AA on captions */
	--hairline-dark:     rgba(248, 248, 244, 0.16);
	--hairline-light:    rgba(0, 54, 88, 0.14);

	/* Crimson ink at varied alpha — builds the survey-instrument depth hierarchy */
	--ink-faint: rgba(200, 0, 50, 0.20);
	--ink-key:   rgba(200, 0, 50, 0.55);

	/* Motion language: one calm, plotter-like ease and three duration tiers */
	--ease-plot:  cubic-bezier(0.33, 0, 0.1, 1);
	--dur-micro:  0.22s;   /* hovers, ticks */
	--dur-reveal: 0.55s;   /* section fade-ups */
	--dur-beat:   1.1s;    /* the hero's slow strokes */

	/* Typography */
	--font-display: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
	--font-body:    'Open Sans', 'Helvetica Neue', Arial, sans-serif;

	/* Spacing scale */
	--space-1: 0.5rem;
	--space-2: 1rem;
	--space-3: 1.5rem;
	--space-4: 2rem;
	--space-5: 3rem;
	--space-6: 4rem;
	--space-section: clamp(3.5rem, 7vw, 6rem);  /* vertical padding per section */

	/* Layout */
	--content-width: 1040px;
	--gutter: clamp(1.25rem, 5vw, 3rem);
	--radius: 6px;
}

/* ---- Reset --------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body,
h1, h2, h3, h4, p, ul, li, figure {
	margin: 0;
	padding: 0;
}

ul {
	list-style: none;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

html {
	background: var(--navy);
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	font-weight: 400;
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
	line-height: 1.6;
	color: var(--text-on-light);
	-webkit-font-smoothing: antialiased;
}

/* ---- Links --------------------------------------------------------------- */
a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	color: var(--crimson);
}

:focus-visible {
	outline: 2px solid var(--crimson-lit);
	outline-offset: 3px;
	border-radius: 2px;
}

strong {
	font-weight: 600;
}

/* ---- Layout primitives --------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--content-width);
	margin: 0 auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--space-section);
}

.prose {
	max-width: 68ch;
}

.prose p + p {
	margin-top: var(--space-3);
}

/* Surface colours --------------------------------------------------------- */
.light {
	background: var(--ice);
	color: var(--text-on-light);
}

.navy {
	background: var(--navy);
	color: var(--text-on-dark);
}

.darkest {
	background: var(--abyss);
	color: var(--text-on-dark);
}

/* ---- Shared headings ----------------------------------------------------- */
/* Eyebrow: small uppercase label that sits on a short crimson boundary line */
.eyebrow {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--text-on-dark-dim);
	margin: 0;
}

/* Accent eyebrow: a crimson tag with inverted white text. Keeps the exact
   brand crimson and stays legible (white-on-crimson ≈ 5.7:1) on every surface,
   so it needs no per-section colour overrides. */
.eyebrow--accent {
	display: inline-block;
	color: var(--text-on-dark);
	background: var(--crimson);
	padding: 0.34em 0.62em;
	border-radius: 3px;
	margin-bottom: var(--space-2);
}

.section-title {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin-bottom: var(--space-4);
}

/* Only the plain eyebrow recolours on light surfaces; the accent chip must keep
   its white-on-crimson text everywhere (this :not() avoids overriding it). */
.light .eyebrow:not(.eyebrow--accent) { color: var(--text-on-light-dim); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	min-height: 100vh;
	display: flex;
	position: relative;
	overflow: hidden;
	color: var(--text-on-dark);
	/* Directional wash: clears a readable pocket lower-left for the title,
	   lets the coastline breathe in the upper-right. */
	background:
		linear-gradient(to top right, rgba(0, 6, 24, 0.66) 0%, rgba(0, 6, 24, 0) 55%),
		radial-gradient(130% 100% at 80% 12%, rgba(0, 38, 63, 0) 0%, rgba(0, 38, 63, 0.5) 50%, var(--navy-deep) 100%),
		url(images/white_sea.png) right top / cover no-repeat,
		var(--navy);
}

.hero-inner {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--space-5);
	padding-block: clamp(2rem, 5vh, 4rem);
}

.hero-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	flex-wrap: wrap;
}

.hero-logo {
	height: clamp(96px, 14vh, 140px);
	width: auto;
}

/* Date + place badge, divided by the crimson boundary line */
.hero-when {
	font-family: var(--font-display);
	text-align: right;
	border-right: 2px solid var(--crimson);
	padding-right: var(--space-3);
}

.hero-when-dates {
	display: block;
	font-weight: 800;
	font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.hero-when-place {
	display: block;
	font-weight: 500;
	color: var(--text-on-dark-dim);
	letter-spacing: 0.04em;
}

.hero-title {
	margin-block: auto;
}

.hero-title .eyebrow {
	color: var(--text-on-dark-dim);
	margin-bottom: var(--space-2);
}

.hero-title h1 {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(2.6rem, 1.5rem + 6vw, 5.5rem);
	line-height: 0.98;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

/* Animated scroll cue, the only down-arrow on the page */
.scroll-cue {
	align-self: center;
	color: var(--text-on-dark-dim);
	width: 2.5rem;
	height: 2.5rem;
	animation: scroll-bob 1.8s ease-in-out infinite;
}

.scroll-cue svg {
	width: 100%;
	height: 100%;
}

.scroll-cue:hover {
	color: var(--text-on-dark);
}

@keyframes scroll-bob {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(6px); }
}

/* ==========================================================================
   Document / link buttons
   ========================================================================== */
.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	justify-content: center;
}

.button {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.85rem 1.4rem;
	background: var(--ice);
	color: var(--navy);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	border: 2px solid var(--ice);
	border-radius: var(--radius);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
	color: var(--navy);
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(0, 6, 24, 0.45);
}

.button-ext {
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	color: var(--crimson);
	border: 1px solid currentColor;
	border-radius: 3px;
	padding: 0.1rem 0.4rem;
}

/* Ghost variant for the secondary action */
.button--ghost {
	background: transparent;
	color: var(--text-on-dark);
	border-color: var(--hairline-dark);
}

.button--ghost:hover {
	color: var(--text-on-dark);
	border-color: var(--crimson);
	background: var(--crimson);
}

/* ==========================================================================
   Conference themes
   ========================================================================== */
.topics {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-4);
}

.topics li {
	padding-top: var(--space-3);
	border-top: 2px solid var(--crimson);
}

.topic-name {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.3rem;
	margin-bottom: var(--space-1);
}

.topics p {
	color: var(--text-on-light-soft);
}

/* ==========================================================================
   Speakers
   ========================================================================== */
.speakers {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-4);
}

.speaker {
	display: flex;
	gap: var(--space-3);
	align-items: flex-start;
	padding: var(--space-3);
	border: 1px solid var(--hairline-dark);
	border-radius: var(--radius);
	background: rgba(248, 248, 244, 0.03);
	transition: transform var(--dur-micro) ease,
	            border-color var(--dur-micro) ease,
	            background var(--dur-micro) ease,
	            box-shadow var(--dur-micro) ease;
}

.speaker:hover {
	transform: translateY(-6px);
	border-color: var(--crimson);
	background: rgba(248, 248, 244, 0.08);
	box-shadow: 0 18px 38px rgba(0, 6, 24, 0.5);
}

.speaker-photo {
	flex: 0 0 auto;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--hairline-dark);
	background: var(--navy-deep);
	transition: border-color var(--dur-micro) ease,
	            transform var(--dur-micro) ease;
}

.speaker:hover .speaker-photo {
	border-color: var(--crimson);
	transform: scale(1.06);
}

/* The person's name labels the card; the talk title is the headline content */
.speaker-name {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.25;
	letter-spacing: 0.01em;
	color: var(--text-on-dark-soft);
	margin-bottom: 0.4rem;
}

.speaker-talk {
	font-size: 1.05rem;
	line-height: 1.4;
	color: var(--text-on-dark);
}

/* ==========================================================================
   Important dates
   ========================================================================== */
.dates {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-3);
}

.date {
	padding-top: var(--space-3);
	position: relative;
}

/* Each date's survey-axis segment — together they read as one line being
   plotted left-to-right across the row (see the reveal block below). */
.date::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--hairline-light);
	transform-origin: left;
}

.date--highlight::after {
	background: var(--crimson);
}

/* The crimson node sitting on each date's boundary line.
   The line is 2px tall at top:0 (its centre is y=1px); the 10px node's top is
   set to -4px so the node's centre (y=1px) lands exactly on the line. */
.date::before {
	content: "";
	position: absolute;
	top: -4px;
	left: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--ice);
	border: 2px solid var(--text-on-light-dim);
}

.date-when {
	display: block;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.35rem;
	line-height: 1.1;
	margin-bottom: 0.5rem;
	font-variant-numeric: tabular-nums;
}

.date-what {
	display: block;
	font-size: 0.9rem;
	color: var(--text-on-light-dim);
}

/* The conference days themselves — the moment everything points to */
.date--highlight::before {
	background: var(--crimson);
	border-color: var(--crimson);
}

.date--highlight .date-when {
	color: var(--crimson);
}

/* ==========================================================================
   Partners
   ========================================================================== */
.partners {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: clamp(2.5rem, 7vw, 5.5rem);
}

.partner {
	display: inline-flex;
	align-items: center;
	transition: transform var(--dur-micro) ease;
}

.partner:hover,
.partner:focus-visible {
	transform: translateY(-2px);
}

.partner img {
	width: auto;
	filter: grayscale(1) opacity(0.72);
	transition: filter var(--dur-micro) ease;
}

.partner:hover img,
.partner:focus-visible img {
	filter: grayscale(0) opacity(1);
}

/* These three logos have very different proportions (a near-square mark, a
   wide lockup, and a thin wordmark), so each is sized by eye for equal
   optical weight rather than by a single shared height. */
.partner--itera img   { height: clamp(48px, 7.6vw, 64px); }
.partner--monomax img { height: clamp(34px, 5.5vw, 46px); }
.partner--naeco img   { height: clamp(18px, 3.1vw, 25px); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-5);
}

.footer-text {
	max-width: 48ch;
}

.footer-text p + p {
	margin-top: var(--space-3);
}

.footer-address {
	color: var(--text-on-dark-dim);
	line-height: 1.7;
}

.footer-logo {
	max-height: 180px;
	width: auto;
}

/* ==========================================================================
   Motion — the survey that charts itself, then settles

   Principle: one bold signature (the hero graticule drawing in), quiet
   discipline everywhere else. Every reveal is gated behind the `.js` class so
   that with JavaScript off the page renders complete and legible.
   ========================================================================== */

/* ---- Hero survey graticule ---------------------------------------------- */
.survey {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	pointer-events: none;
}

.hero-inner {
	position: relative;
	z-index: 1;
}

/* Strokes live in the map's 1290×1021 pixel space. Each line's dash length
   equals its own length (parallels span the width, meridians the height) so the
   draw-on is even. Stroke width is small because it is scaled up with the map. */
.survey line {
	fill: none;
	stroke: var(--ink-faint);
	stroke-width: 1.4;
	stroke-dashoffset: 0;            /* drawn by default — safe with JS off */
}

.survey .grat--par { stroke-dasharray: 1290; }
.survey .grat--mer { stroke-dasharray: 1021; }

.survey .grat-key {
	stroke: var(--ink-key);
	stroke-width: 2;
}

/* With JS, hold the strokes back until the survey charts itself */
.js .survey .grat--par { stroke-dashoffset: 1290; }
.js .survey .grat--mer { stroke-dashoffset: 1021; }

.js .survey.is-charting .grat--par,
.js .survey.is-charting .grat--mer {
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 0.9s var(--ease-plot);
}

.js .survey.is-charting .grat-key {
	transition-duration: var(--dur-beat);
}

/* Stagger: meridians, then parallels, then the Arctic-Circle parallel last */
.js .survey.is-charting line:nth-of-type(1) { transition-delay: 0ms; }
.js .survey.is-charting line:nth-of-type(2) { transition-delay: 90ms; }
.js .survey.is-charting line:nth-of-type(3) { transition-delay: 180ms; }
.js .survey.is-charting line:nth-of-type(4) { transition-delay: 280ms; }
.js .survey.is-charting line:nth-of-type(5) { transition-delay: 370ms; }
.js .survey.is-charting .grat-key           { transition-delay: 560ms; }

/* Label riding just above the Arctic-Circle line, in the map's coordinate
   space so it stays put on the coastline. Font size is in user units (scaled). */
.survey-label {
	fill: rgba(248, 248, 244, 0.72);
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.js .survey-label {
	opacity: 0;
}

.js .hero-drawn .survey-label {
	opacity: 1;
	transition: opacity var(--dur-reveal) ease 0.2s;
}

/* ---- Hero title: lands as the survey's conclusion ----------------------- */
.js .hero-title .eyebrow,
.js .hero-title h1 {
	opacity: 0;
	transform: translateY(10px);
}

.js .hero-drawn .hero-title .eyebrow {
	opacity: 1;
	transform: none;
	transition: opacity var(--dur-reveal) ease, transform var(--dur-reveal) var(--ease-plot);
}

.js .hero-drawn .hero-title h1 {
	opacity: 1;
	transform: none;
	transition: opacity var(--dur-reveal) ease 0.08s, transform var(--dur-reveal) var(--ease-plot) 0.08s;
}

/* ---- Scroll cue: share the page rhythm, rest once the hero is past ------- */
.scroll-cue {
	animation-duration: 3.6s;
}

.hero-scrolled-past .scroll-cue {
	opacity: 0;
	animation-play-state: paused;
	transition: opacity var(--dur-reveal) ease;
}

/* ---- Section reveal: a quiet fade-up for each heading ------------------- */
.js .section .eyebrow--accent,
.js .section .section-title {
	opacity: 0;
	transform: translateY(10px);
}

.js .section.in-view .eyebrow--accent {
	opacity: 1;
	transform: none;
	transition: opacity var(--dur-reveal) ease, transform var(--dur-reveal) var(--ease-plot);
}

.js .section.in-view .section-title {
	opacity: 1;
	transform: none;
	transition: opacity var(--dur-reveal) ease 0.08s, transform var(--dur-reveal) var(--ease-plot) 0.08s;
}

/* ---- Timeline: the axis plots station to station, climax pulses once ---- */
.js .date::after  { transform: scaleX(0); }
.js .date::before { transform: scale(0); }

.js .section.in-view .date::after {
	transform: scaleX(1);
	transition: transform var(--dur-reveal) var(--ease-plot);
}

.js .section.in-view .date::before {
	transform: scale(1);
	transition: transform 0.4s var(--ease-plot);
}

.js .section.in-view .date:nth-child(1)::after,
.js .section.in-view .date:nth-child(1)::before { transition-delay: 0.15s; }
.js .section.in-view .date:nth-child(2)::after,
.js .section.in-view .date:nth-child(2)::before { transition-delay: 0.30s; }
.js .section.in-view .date:nth-child(3)::after,
.js .section.in-view .date:nth-child(3)::before { transition-delay: 0.45s; }
.js .section.in-view .date:nth-child(4)::after,
.js .section.in-view .date:nth-child(4)::before { transition-delay: 0.60s; }

/* One bounded pulse on the conference days — never loops */
.js .section.in-view .date--highlight::before {
	animation: date-pulse 2s ease-out 0.9s 1;
}

@keyframes date-pulse {
	from { box-shadow: 0 0 0 0 rgba(200, 0, 50, 0.5); }
	to   { box-shadow: 0 0 0 12px rgba(200, 0, 50, 0); }
}

/* ---- Document buttons: the boundary line, applied to an interaction ----- */
.button:not(.button--ghost) {
	position: relative;
	overflow: hidden;
}

.button:not(.button--ghost)::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--crimson);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--dur-micro) var(--ease-plot);
}

.button:not(.button--ghost):hover::after,
.button:not(.button--ghost):focus-visible::after {
	transform: scaleX(1);
}

/* Tabular figures for the fee, so amounts line up like data */
#fee strong {
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 820px) {
	.topics {
		grid-template-columns: 1fr;
	}
	.speakers {
		grid-template-columns: 1fr;
	}
	.dates {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.hero-top {
		justify-content: center;
		text-align: center;
	}
	.hero-when {
		text-align: center;
		border-right: 0;
		border-top: 2px solid var(--crimson);
		padding-right: 0;
		padding-top: var(--space-2);
	}
	.dates {
		grid-template-columns: 1fr;
	}
	.button-row {
		flex-direction: column;
		align-items: stretch;
	}
	.button {
		justify-content: center;
	}
	.footer-inner {
		justify-content: center;
		text-align: center;
	}
	.footer-text {
		max-width: none;
	}
}

/* Respect users who prefer reduced motion: kill animation, and force every
   JS-gated element to its final, fully-legible state. */
@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
	.js .survey line { stroke-dashoffset: 0 !important; }
	.js .survey-label,
	.js .hero-title .eyebrow,
	.js .hero-title h1,
	.js .section .eyebrow--accent,
	.js .section .section-title {
		opacity: 1 !important;
		transform: none !important;
	}
	.js .date::after,
	.js .date::before {
		transform: none !important;
	}
}
