/**
 * Styles for behaviour added on top of the delivered design:
 * client-built custom sections, and the contact form's feedback states.
 *
 * Kept out of main.css so that file stays a faithful copy of the delivered
 * design. Everything here reuses the same design tokens, so it inherits any
 * colour or font change automatically.
 */

/* -------------------------------------------------------------------------
   Contact form states
   ---------------------------------------------------------------------- */

/* Honeypot — moved off-screen rather than display:none, which bots detect. */
.ry-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-status {
	margin: 0;
	font-size: .84rem;
	line-height: 1.5;
	color: var(--muted);
}

.form-status:empty {
	display: none;
}

.form-status.is-success {
	color: var(--accent);
}

.form-status.is-error {
	color: #c0392b;
}

body.dark .form-status.is-error {
	color: #ff8a75;
}

.field-error {
	font-size: .76rem;
	color: #c0392b;
}

body.dark .field-error {
	color: #ff8a75;
}

.field-error:empty {
	display: none;
}

.field.has-error input,
.field.has-error textarea {
	border-color: #c0392b;
}

.send[disabled] {
	opacity: .55;
	cursor: default;
}

/* -------------------------------------------------------------------------
   Portfolio timeline
   ---------------------------------------------------------------------- */

/* A collection's intro, printed where that collection enters the timeline. */
.pf-intro--chapter {
	margin-top: clamp(56px, 8vw, 110px);
	padding-top: clamp(30px, 4vw, 54px);
	border-top: 1px solid var(--line2);
}

.pf-timeline > .pf-intro--chapter:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* Collection name under each caption — quiet, so titles stay dominant. */
.lab-coll {
	margin-top: 2px;
	font-size: .62rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--faint);
}

/* -------------------------------------------------------------------------
   Portfolio masonry
   ---------------------------------------------------------------------- */

/**
 * main.css lays the works out with `columns:3`. That packs tightly but fills
 * each column top-to-bottom before starting the next, so the newest work sits
 * above the second-newest rather than beside it — the chronology reads down the
 * columns instead of across the page.
 *
 * main.js rebuilds the same masonry with the works distributed in order into
 * whichever column is shortest, then adds .is-masonry. That keeps the tight
 * packing while the sequence runs newest-at-top.
 *
 * Without JS the `columns:3` rule still applies, so the page degrades to the
 * delivered layout rather than to a single stack.
 */
.works.is-masonry {
	columns: auto;
	display: flex;
	align-items: flex-start;
	gap: clamp(20px, 3vw, 38px);
}

.works__col {
	flex: 1 1 0;
	min-width: 0;
}

/* -------------------------------------------------------------------------
   Custom sections
   ---------------------------------------------------------------------- */

.sec {
	max-width: 74ch;
}

.sec .eyebrow {
	display: block;
	margin-bottom: 22px;
}

.sec__title {
	font-size: clamp(1.8rem, 3.5vw, 2.6rem);
	font-weight: 300;
	margin-bottom: 28px;
}

.sec__body {
	color: var(--muted);
	font-size: 1.02rem;
}

.sec__body > *:first-child {
	margin-top: 0;
}

.sec__body p {
	margin: 0 0 1.3em;
}

.sec__body p:first-of-type {
	color: var(--fg);
}

.sec__body a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: .18em;
}

.sec__intro {
	color: var(--muted);
	font-size: 1.02rem;
	max-width: 70ch;
	margin: 0 0 40px;
}

/* --- Image + Text ------------------------------------------------------ */

.sec--image-text {
	max-width: none;
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	gap: clamp(30px, 5vw, 70px);
	align-items: center;
}

.sec--image-text.sec--image-left .sec__copy {
	order: 2;
}

.sec--image-text img {
	width: 100%;
	height: auto;
	box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .45);
}

/* --- Gallery ----------------------------------------------------------- */

.sec--gallery {
	max-width: none;
}

.sec__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: clamp(20px, 3vw, 36px);
}

.sec__tile {
	margin: 0;
}

.sec__tile img {
	width: 100%;
	height: auto;
}

.sec__tile figcaption {
	margin-top: 10px;
	font-size: .76rem;
	color: var(--faint);
}

/* --- List -------------------------------------------------------------- */

.sec--list {
	max-width: none;
}

.sec--list .sub {
	font-size: .72rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 22px;
}

.sec--list .coll-list {
	column-gap: 34px;
}

/* --- Call to action ---------------------------------------------------- */

.sec--cta {
	text-align: center;
	margin-inline: auto;
}

.sec--cta .eyebrow,
.sec--cta .sec__intro {
	margin-inline: auto;
}

.sec__button {
	display: inline-block;
	margin-top: 10px;
	padding: 14px 32px;
	border: 1px solid var(--line2);
	border-radius: 3px;
	font-size: .82rem;
	letter-spacing: .08em;
	color: var(--fg);
	transition: border-color .25s, color .25s, background .25s;
}

.sec__button:hover {
	border-color: var(--accent);
	color: var(--accent);
}

@media (max-width: 860px) {
	.sec--image-text {
		grid-template-columns: 1fr;
	}

	.sec--image-text.sec--image-left .sec__copy {
		order: 0;
	}
}
