/* Lian Rokman — Coming Soon
   Ivory & ink. Logical properties throughout, so Hebrew (RTL) and
   English (LTR) share one stylesheet. */

/* ---------- Fonts (self-hosted, variable, split by script) ---------- */
@font-face {
	font-family: "Cormorant";
	src: url("../fonts/cormorant-latin-wght-normal.woff2") format("woff2");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Heebo";
	src: url("../fonts/heebo-hebrew-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
	font-family: "Assistant";
	src: url("../fonts/assistant-latin-wght-normal.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ---------- Tokens ---------- */
:root {
	--lr-bg: #f7f4ef;
	--lr-ink: #1b1917;
	--lr-ink-soft: #3a3531;
	--lr-muted: #5e574f;
	--lr-line: #cfc7bc;
	--lr-media: #ddd5c9;
	--lr-error: #a32a1c;

	--lr-font-display: "Cormorant", "Heebo", Georgia, "Times New Roman", serif;
	--lr-font-body: "Assistant", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

	--lr-pad-x: clamp(1.5rem, 5vw, 4.5rem);
	--lr-pad-y: clamp(1.25rem, 3vw, 3rem);
	--lr-ease: cubic-bezier(0.16, 1, 0.3, 1);

	color-scheme: light;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scrollbar-color: var(--lr-line) var(--lr-bg);
}

body {
	margin: 0;
	background: var(--lr-bg);
	color: var(--lr-ink);
	font-family: var(--lr-font-body);
	font-size: 1rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

:lang(he) body {
	font-weight: 300;
}

::selection {
	background: var(--lr-ink);
	color: var(--lr-bg);
}

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

p,
h1,
ul {
	margin: 0;
}

a {
	color: inherit;
	text-underline-offset: 0.25em;
	text-decoration-thickness: 1px;
}

:focus-visible {
	outline: 2px solid var(--lr-ink);
	outline-offset: 4px;
}

[hidden] {
	display: none !important;
}

/* ---------- Layout ---------- */
.lr {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas:
		"head"
		"media"
		"main"
		"foot";
	min-height: 100vh;
	min-height: 100svh;
	overflow: clip; /* entrance movement must never create a scrollbar */
}

.lr-head,
.lr-main,
.lr-foot {
	padding-inline: var(--lr-pad-x);
}

.lr-head {
	grid-area: head;
	direction: ltr; /* logo on the left in both languages */
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 0.75rem;
	padding-top: max(0.75rem, env(safe-area-inset-top));
}

.lr-media {
	grid-area: media;
	position: relative;
	height: 50vh;
	height: 50svh;
	min-height: 20rem;
	overflow: hidden;
	background: var(--lr-media);
}

/* Phones: the photograph dissolves into the page, and the heading and form
   rise over the faded part so the two read as one piece. */
.lr-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(247, 244, 239, 0) 45%,
		rgba(247, 244, 239, 0.6) 66%,
		rgba(247, 244, 239, 0.93) 84%,
		var(--lr-bg) 100%
	);
	pointer-events: none;
}

.has-media .lr-main {
	position: relative;
	z-index: 1;
	margin-top: -12vh;
	margin-top: -12svh;
	padding-top: 0;
}

.lr-main {
	grid-area: main;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-block: 1.75rem 1.5rem;
}

.lr-main > * {
	width: 100%;
	max-width: 28.75rem;
}

.lr-main > .lr-title {
	max-width: none;
}

.lr-foot {
	grid-area: foot;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 1.5rem;
	padding-block: 0.5rem;
	padding-bottom: max(1rem, env(safe-area-inset-bottom));
	color: var(--lr-muted);
	font-size: 0.8125rem;
}

@media (min-width: 900px) {
	.has-media .lr {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-rows: auto 1fr auto;
		grid-template-areas:
			"head media"
			"main media"
			"foot media";
	}

	.lr-head {
		padding-block: clamp(0.375rem, 4vh, 3rem) 0.25rem;
	}

	.lr-media {
		position: sticky;
		top: 0;
		align-self: start;
		height: 100vh;
		height: 100svh;
	}

	.lr-media::after {
		content: none;
	}

	.lr-main,
	.has-media .lr-main {
		margin-top: 0;
		padding-block: clamp(0.25rem, 2vh, 2rem);
	}

	.lr-foot {
		padding-block: 0.25rem clamp(0.375rem, 4vh, 3rem);
	}

	/* Short laptop screens: scale the heading and tighten the form so the
	   whole page fits the window without scrolling. */
	.lr .lr-title__name {
		font-size: min(clamp(3.25rem, 2rem + 5vw, 5.5rem), 11vh);
	}

	:lang(en) .lr .lr-title__name {
		font-size: min(clamp(2.75rem, 1.6rem + 4.4vw, 4.75rem), 10vh);
	}

	.lr .lr-title__by,
	:lang(en) .lr .lr-title__by {
		font-size: min(clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem), 4.6vh);
	}

	.lr .lr-lead,
	.lr .lr-text {
		margin-top: clamp(0.75rem, 2vh, 1.25rem);
	}

	.lr .lr-form {
		gap: clamp(0.625rem, 2vh, 1.125rem);
		margin-top: clamp(0.875rem, 2.6vh, 1.5rem);
	}

	.lr .lr-field__input {
		height: clamp(2.25rem, 6vh, 2.75rem);
	}

	.lr .lr-button {
		min-height: clamp(2.75rem, 7.5vh, 3.5rem);
		margin-top: clamp(0.125rem, 1vh, 0.5rem);
	}
}

/* With the admin bar showing (logged-in only), leave room for it. */
.admin-bar .lr {
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
	min-height: calc(100svh - var(--wp-admin--admin-bar--height, 32px));
}

@media (min-width: 900px) {
	.admin-bar .lr-media {
		top: var(--wp-admin--admin-bar--height, 32px);
		height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
		height: calc(100svh - var(--wp-admin--admin-bar--height, 32px));
	}
}

/* No photograph yet: one calm, centred column. */
.no-media .lr {
	grid-template-rows: auto 1fr auto;
	grid-template-areas:
		"head"
		"main"
		"foot";
	max-width: 46rem;
	margin-inline: auto;
}

/* ---------- Header ---------- */
.lr-logo {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	font-family: "Cormorant", Georgia, serif;
	font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
	font-weight: 500;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

.lr-logo__img {
	width: auto;
	max-height: 2.5rem;
}

.lr-lang {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding-inline: 0.75rem;
	border: 1px solid var(--lr-line);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-decoration: none;
	transition: border-color 200ms var(--lr-ease), background-color 200ms var(--lr-ease), color 200ms var(--lr-ease);
}

.lr-lang:hover {
	border-color: var(--lr-ink);
	background: var(--lr-ink);
	color: var(--lr-bg);
}

/* ---------- Photograph ---------- */
.lr-media__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--lr-focus, 50% 20%);
	opacity: 0;
	transition: opacity 1600ms ease;
}

.lr-media__img.is-active {
	opacity: 1;
}

@media (min-width: 900px) {
	.lr-media__img {
		object-position: 50% 30%;
	}
}

/* Swipe or drag sideways to change the photograph; vertical scrolling
   stays with the page. */
.lr-media[data-slides] {
	touch-action: pan-y;
	cursor: grab;
	-webkit-user-select: none;
	user-select: none;
}

.lr-media[data-slides].is-dragging {
	cursor: grabbing;
}

.lr-media__img {
	-webkit-user-drag: none;
}

/* ---------- Copy ---------- */
.lr-title {
	font-family: var(--lr-font-display);
	font-weight: 400;
	font-synthesis: none;
	text-wrap: balance;
}

.lr-title__name {
	display: block;
	font-size: clamp(3.25rem, 2rem + 5vw, 5.5rem);
	font-weight: 100;
	line-height: 1.05;
}

:lang(en) .lr-title__name {
	font-size: clamp(2.75rem, 1.6rem + 4.4vw, 4.75rem);
	font-weight: 300;
	line-height: 1;
	letter-spacing: -0.01em;
}

.lr-title__by {
	display: block;
	margin-top: 0.5rem;
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
	font-weight: 200;
	line-height: 1.3;
}

:lang(en) .lr-title__by {
	font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.375rem);
	font-weight: 400;
	line-height: 1.15;
}

.lr-line {
	display: block;
}

.lr-lead,
.lr-text {
	margin-top: 1.25rem;
	color: var(--lr-muted);
	text-wrap: pretty;
}

/* ---------- Form ---------- */
.lr-form {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	margin-top: 1.5rem;
	scroll-margin-top: 1.5rem;
}

.lr-field {
	display: flex;
	flex-direction: column;
}

.lr-field__label {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--lr-muted);
}

:lang(en) .lr-field__label {
	font-size: 0.6875rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.lr-field__input {
	width: 100%;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--lr-ink);
	border-radius: 0;
	background: transparent;
	color: var(--lr-ink);
	caret-color: var(--lr-ink);
	font: inherit;
	font-size: 1rem; /* 16px keeps iOS from zooming on focus */
	background-image: linear-gradient(var(--lr-ink), var(--lr-ink));
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: 0 2px;
	transition: background-size 450ms var(--lr-ease), box-shadow 200ms var(--lr-ease);
	-webkit-appearance: none;
	appearance: none;
}

[dir="rtl"] .lr-field__input {
	background-position: right bottom;
}

[dir="rtl"] .lr-field__input[type="email"] {
	text-align: right;
}

.lr-field__input:hover {
	box-shadow: 0 1px 0 0 var(--lr-ink);
}

/* Focus: a second line is drawn along the field from its starting edge. */
.lr-field__input:focus-visible {
	outline: 0;
	background-size: 100% 2px;
}

.lr-field__input:-webkit-autofill {
	-webkit-text-fill-color: var(--lr-ink);
	box-shadow: 0 0 0 100px var(--lr-bg) inset;
}

.lr-field__input[aria-invalid="true"] {
	border-bottom-color: var(--lr-error);
	box-shadow: 0 1px 0 0 var(--lr-error);
}

.lr-field__error,
.lr-form__status {
	margin-top: 0.5rem;
	color: var(--lr-error);
	font-size: 0.875rem;
	line-height: 1.45;
}

.lr-form__status {
	margin-top: 0;
}

.lr-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.lr-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 3.5rem;
	margin-top: 0.5rem;
	padding: 0.75rem 1.5rem;
	border: 1px solid var(--lr-ink);
	border-radius: 0;
	background: var(--lr-ink);
	color: var(--lr-bg);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: background-color 200ms var(--lr-ease), border-color 200ms var(--lr-ease), transform 120ms var(--lr-ease);
	-webkit-tap-highlight-color: transparent;
}

:lang(en) .lr-button {
	font-size: 0.75rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
}

.lr-button:hover {
	background: var(--lr-ink-soft);
	border-color: var(--lr-ink-soft);
}

.lr-button:active {
	transform: scale(0.99);
}

.lr-button[aria-disabled="true"] {
	background: var(--lr-muted);
	border-color: var(--lr-muted);
	cursor: progress;
}

.lr-form__note {
	color: var(--lr-muted);
	font-size: 0.8125rem;
}

/* ---------- Success ---------- */
.lr-success {
	margin-top: 2rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--lr-line);
}

.lr-success:focus {
	outline: 0;
}

.lr-success__title {
	margin-top: 0.75rem;
	font-family: var(--lr-font-display);
	font-size: 2rem;
	font-weight: 300;
	line-height: 1.1;
}

.lr-success__text {
	margin-top: 0.5rem;
	color: var(--lr-muted);
}

/* ---------- Footer ---------- */
.lr-foot__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
	padding: 0;
	list-style: none;
}

.lr-foot__links a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	color: var(--lr-ink);
	text-decoration: none;
	transition: color 200ms var(--lr-ease);
}

.lr-foot__links a:hover {
	text-decoration: underline;
}

.lr-foot__links svg {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

/* ---------- Hebrew: lighter weights to suit the thin display face ---------- */
:lang(he) .lr-field__label {
	font-weight: 400;
}

:lang(he) .lr-button {
	font-weight: 500;
}

/* ---------- Motion ----------
   One authored moment on arrival: the photograph is unveiled while the
   heading rises into place and the form follows. After that, motion only
   answers the visitor (focus, press, success) and the photographs drift.
   Everything is visible by default; these rules only run when motion is
   welcome. */
@media (prefers-reduced-motion: no-preference) {
	/* The unveiling. */
	.lr-media {
		animation: lr-unveil 1300ms var(--lr-ease) both;
	}

	.lr-media__img {
		transform: scale(1.07);
		transition: opacity 1600ms ease, transform 9s cubic-bezier(0.2, 0.6, 0.3, 1);
	}

	.lr-media__img.is-active {
		transform: scale(1);
	}

	/* Heading lines rise from behind their own baseline. */
	.lr-title__name,
	.lr-title__by {
		overflow: hidden;
		padding-bottom: 0.14em;
		margin-bottom: -0.14em;
	}

	.lr-line {
		animation: lr-rise 1000ms var(--lr-ease) both;
		animation-delay: 150ms;
	}

	.lr-title__by .lr-line {
		animation-delay: 260ms;
	}

	/* The rest arrives quietly, in reading order. */
	.lr-head,
	.lr-lead,
	.lr-text,
	.lr-form > *,
	.lr-foot {
		animation: lr-arrive 800ms var(--lr-ease) both;
	}

	.lr-head,
	.lr-foot {
		animation-name: lr-fade;
	}

	.lr-head {
		animation-delay: 0ms;
	}

	.lr-lead,
	.lr-text {
		animation-delay: 420ms;
	}

	.lr-form > :nth-child(3) {
		animation-delay: 500ms;
	}

	.lr-form > :nth-child(4) {
		animation-delay: 570ms;
	}

	.lr-form > :nth-child(n + 5) {
		animation-delay: 640ms;
	}

	.lr-foot {
		animation-delay: 760ms;
	}

	/* Success: the message settles and the tick is drawn. */
	.lr-success:not([hidden]) {
		animation: lr-arrive 600ms var(--lr-ease) both;
	}

	.lr-success:not([hidden]) .lr-success__icon > * {
		stroke-dasharray: 1;
		stroke-dashoffset: 1;
		animation: lr-draw 700ms var(--lr-ease) 150ms forwards;
	}

	.lr-success:not([hidden]) .lr-success__icon > path {
		animation-delay: 500ms;
	}

	@keyframes lr-unveil {
		from {
			clip-path: inset(100% 0 0 0);
		}
		to {
			clip-path: inset(0 0 0 0);
		}
	}

	@keyframes lr-rise {
		from {
			transform: translateY(110%);
		}
	}

	@keyframes lr-arrive {
		from {
			opacity: 0;
			transform: translateY(0.75rem);
		}
	}

	@keyframes lr-fade {
		from {
			opacity: 0;
		}
	}

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

/* Reduced motion: no movement, only gentle fades and instant feedback. */
@media (prefers-reduced-motion: reduce) {
	.lr-media__img {
		transition-duration: 600ms;
	}

	.lr-field__input,
	.lr-button,
	.lr-lang {
		transition-duration: 0.01ms;
	}
}
