/**
 * @fileoverview Field-notes design system for lunalabs.studio.
 * Rubber-stamp print aesthetic: warm paper ground, brick spot ink,
 * typewriter marginalia (Courier Prime) with Instrument Serif display.
 * Light ("paper") and dark ("night") themes switch via [data-theme] tokens;
 * the hero artwork swaps between day/night prints whose backgrounds are
 * normalized to the exact page colors, so they sit seamlessly on the page.
 */

/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
	--paper: #F2EDE2;
	--ink: #37322A;
	--ink-soft: rgba(55, 50, 42, 0.85);
	--ink-mute: rgba(55, 50, 42, 0.7);
	--dim: #6E6656;
	--accent: #A5503C;
	--status: #A5503C;
	--strike: #6E6656;
	--rule: rgba(55, 50, 42, 0.35);
	--rule-soft: rgba(55, 50, 42, 0.3);
	--stamp-detail: #2B2A26;
	--stamp-keyhole: #2B2A26;
	--stamp-wave: #5C6B54;
	--stamp-spark: #A34A34;
	--cta-ink: #A5503C;
	--underline: rgba(165, 80, 60, 0.75);
}

[data-theme="dark"] {
	--paper: #121212;
	--ink: #EDE5D2;
	--ink-soft: rgba(237, 229, 210, 0.85);
	--ink-mute: rgba(237, 229, 210, 0.65);
	--dim: rgba(237, 229, 210, 0.58);
	--status: #C87E63;
	--strike: rgba(237, 229, 210, 0.56);
	--rule: rgba(237, 229, 210, 0.3);
	--rule-soft: rgba(237, 229, 210, 0.25);
	--stamp-detail: #EDE5D2;
	--stamp-keyhole: #121212;
	--stamp-wave: #9FA98D;
	--stamp-spark: #C87E63;
	--cta-ink: #EDE5D2;
	--underline: rgba(200, 126, 99, 0.85);
}

/* ==========================================================================
   BASE
   ========================================================================== */
* { box-sizing: border-box; }

body {
	margin: 0;
	overflow-x: hidden;
	background: var(--paper);
	color: var(--ink);
	font-family: 'Courier Prime', 'Courier New', monospace;
	font-size: 16px;
}

a {
	color: var(--ink);
	text-decoration-color: rgba(165, 80, 60, 0.7);
	text-underline-offset: 4px;
}

a:hover { color: var(--accent); }
[data-theme="dark"] a:hover { color: #C87E63; }

.display { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; }

.label {
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-mute);
}

.wrap { max-width: 1440px; margin: 0 auto; }

/* Paper grain: two full-page overlays, one per theme, above all content
   so a single texture unifies the page, the artwork, and the type. */
.grain {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9;
}

.grain-night { display: none; }
[data-theme="dark"] .grain-day { display: none; }
[data-theme="dark"] .grain-night { display: block; }

/* ==========================================================================
   MARGINALIA (header / section footers)
   ========================================================================== */
.marginalia {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 32px;
	padding: 30px 56px 0 56px;
}

.marginalia--foot { padding: 0 56px 34px 56px; }
.marginalia--foot .label { color: var(--dim); }

.coords { text-align: center; line-height: 1.9; }

.theme-toggle {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font: inherit;
}

/* ==========================================================================
   HERO (entry 01)
   ========================================================================== */
.hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 26px;
	padding: 56px 24px 0 24px;
}

/* Desktop: layout-transparent wrapper; phones turn it into a full-viewport
   lead (wordmark, print, tagline) so the copy starts on the second screen */
.hero-lead { display: contents; }

.hero h1 {
	margin: 0;
	font-size: clamp(56px, 9vw, 124px);
	line-height: 0.92;
	letter-spacing: -0.01em;
	position: relative;
	z-index: 2;
}

/* Day/night prints: backgrounds match the page exactly and edges are
   feathered to transparency, so the wordmark and tagline overlap them. */
.hero-art {
	display: block;
	width: min(960px, 94vw);
	height: auto;
	margin-top: clamp(-68px, -6vw, -16px);
}

.hero-art--night,
.hero-art--day-mobile,
.hero-art--night-mobile { display: none; }
[data-theme="dark"] .hero-art--day { display: none; }
[data-theme="dark"] .hero-art--night { display: block; }

/* Phones get tighter portrait crops of the same prints, one per theme */
@media (max-width: 700px) {
	.hero-art--day,
	[data-theme="dark"] .hero-art--night { display: none; }
	.hero-art--day-mobile { display: block; width: min(440px, 92vw); margin-top: -10px; }
	[data-theme="dark"] .hero-art--day-mobile { display: none; }
	[data-theme="dark"] .hero-art--night-mobile { display: block; width: min(440px, 92vw); margin-top: -10px; }
}

.tagline {
	margin: clamp(-42px, -3.5vw, -8px) 0 0 0;
	font-size: 18px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-soft);
	position: relative;
	z-index: 2;
}

.hero-copy {
	margin: 0;
	max-width: 560px;
	line-height: 1.75;
	color: var(--ink-soft);
}

.cta {
	display: inline-block;
	margin-top: 8px;
	padding: 14px 34px;
	border: 2px dotted #A5503C;
	color: var(--cta-ink);
	font-size: 14px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	transform: rotate(-1deg);
}

/* ==========================================================================
   CREW
   ========================================================================== */
.crew {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 40px;
	padding: 72px 24px 56px 24px;
}

.crew-heading { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 400; }

.crew-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 44px 24px;
	max-width: 1100px;
	width: 100%;
}

.crew-member { display: flex; flex-direction: column; gap: 8px; }
.crew-member .display { font-size: 28px; font-style: italic; }
.crew-member .label { color: var(--dim); }

/* ==========================================================================
   WHAT WE DO (entry 02)
   ========================================================================== */
.entry-two {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 24px;
	padding: 88px 24px 0 24px;
}

.entry-two h2 { margin: 0; font-size: clamp(36px, 4.5vw, 60px); line-height: 1.12; }

.entry-two > p {
	margin: 0;
	max-width: 720px;
	line-height: 1.8;
	color: var(--ink-soft);
}

/* ==========================================================================
   COMPANIES
   ========================================================================== */
.companies { margin: 0 auto; padding: 72px 120px 0 120px; max-width: 1440px; }
.companies > .label { display: block; padding-bottom: 18px; }

.rule { border: none; border-top: 1px dashed var(--rule); margin: 0; }

.co-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 32px;
	padding: 20px 4px;
	border-bottom: 1px dashed var(--rule-soft);
}

.co-left { display: flex; align-items: center; gap: 28px; }
.co-name { font-family: 'Instrument Serif', Georgia, serif; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }

.co-meta {
	font-size: 12px;
	letter-spacing: 0.08em;
	color: var(--ink-mute);
	text-align: right;
	line-height: 2;
}

.co-status { color: var(--status); }
.co-struck { color: var(--strike); text-decoration: line-through; }

.tag-stamp {
	display: inline-block;
	margin-left: 6px;
	padding: 3px 8px;
	border: 2px solid var(--status);
	color: var(--status);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
}

/* Stamp glyphs: spot inks stay literal; theme-dependent details use tokens. */
.stamp { mix-blend-mode: multiply; flex-shrink: 0; }
[data-theme="dark"] .stamp { mix-blend-mode: normal; }
.stamp .detail-stroke { stroke: var(--stamp-detail); }
.stamp .detail-fill { fill: var(--stamp-detail); }
.stamp .keyhole { fill: var(--stamp-keyhole); }
.stamp .wave { stroke: var(--stamp-wave); }
.stamp .spark { stroke: var(--stamp-spark); }

/* ==========================================================================
   LEDGER
   ========================================================================== */
/* Borderless: the companies' last row rules it off above, the footer's
   rule closes it below — keeps the stretch to two dashed lines, not four. */
.ledger {
	margin: 0 120px;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 32px;
	padding: 44px 8px 0 8px;
	font-size: 14px;
	letter-spacing: 0.12em;
}

.ledger .dim { color: var(--dim); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
	margin: 56px 120px 0 120px;
	border-top: 1px dashed var(--rule);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 32px;
	padding: 64px 8px 48px 8px;
}

.site-footer .email { font-size: 22px; letter-spacing: 0.04em; }
.footer-left { display: flex; flex-direction: column; gap: 12px; }
.colophon { text-align: center; padding: 0 24px 44px 24px; color: var(--dim); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
	.coords { display: none; }
	.companies { padding: 56px 24px 0 24px; }
	.ledger { margin: 0 24px; justify-content: center; text-align: center; }
	.site-footer { margin: 48px 24px 0 24px; justify-content: center; text-align: center; }
	.footer-left { align-items: center; }
}

@media (max-width: 700px) {
	.marginalia { gap: 10px 24px; padding: 22px 20px 0 20px; }
	.marginalia--foot { flex-wrap: wrap; padding: 0 20px 28px 20px; justify-content: center; gap: 8px 20px; }
	.hero { padding: 0 20px; gap: 28px; }
	.hero-lead {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 20px;
		min-height: calc(100svh - 64px);
	}
	.crew { padding: 56px 20px 40px 20px; }
	/* Stamp hangs in its own column; name and meta share one left text edge */
	.co-row {
		display: grid;
		grid-template-columns: 64px minmax(0, 1fr);
		align-items: center;
		gap: 2px 20px;
	}
	.co-left { display: contents; }
	.co-meta { grid-column: 2; text-align: left; line-height: 2.2; }
	.stamp-glyph { width: 64px; height: 64px; }
}
