/* ============================================================
   Tribalry public landing page — dark, glassy-but-flat.
   Loaded ONLY by bodyhome.tpl (per-template stylesheet, same
   pattern as tribecity-modern.css on bodylogin.tpl).
   All selectors are ld-* or scoped under html.home so nothing
   here can leak into other pages or be overridden by main.css.
   ============================================================ */

:root {
	--ld-bg: #0d0e12;
	--ld-bg-raised: #15171d;
	--ld-glass: rgba(255, 255, 255, 0.05);
	--ld-glass-strong: rgba(255, 255, 255, 0.08);
	--ld-border: rgba(255, 255, 255, 0.10);
	--ld-border-soft: rgba(255, 255, 255, 0.07);
	--ld-text: #f4f5f7;
	--ld-text-soft: #a4abb6;
	--ld-text-faint: #6b7280;
	--ld-accent: #e8a66d;
	--ld-accent-strong: #f0b581;
	--ld-accent-ink: #1d1206;
	--ld-radius: 18px;
	--ld-radius-lg: 24px;
	--ld-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Neutralize legacy chrome (main.css / bootstrap), page-scoped ---- */

html.home,
html.home body {
	background: var(--ld-bg);
	color: var(--ld-text);
	scroll-behavior: smooth;
}

html.home #page {
	background: transparent;
	padding-bottom: 64px; /* keep room for the absolute-positioned footer */
}

@media (max-width: 600px) {
	html.home #page { padding-bottom: 110px; } /* footer stacks taller on mobile */
}

/* Dark restyle of the shared external footer (its own <style> block is
   class-scoped; html.home prefix outranks it regardless of order). */
html.home .externalFooter {
	background: transparent;
	border-top-color: var(--ld-border-soft);
}
html.home .externalFooter .footer-copy { color: var(--ld-text-faint); }
html.home .externalFooter .footer-sep { color: rgba(255, 255, 255, 0.15); }
html.home .externalFooter .footer-link,
html.home .externalFooter a.footer-link,
html.home .externalFooter button.footer-link { color: var(--ld-text-soft); }
html.home .externalFooter .footer-link:hover,
html.home .externalFooter a.footer-link:hover,
html.home .externalFooter button.footer-link:hover { color: var(--ld-text); }

/* PWA install notice (htmlfooter, fixed top) — on the landing page it slides
   in UNDER the fixed glass nav. !important beats its inline styles. */
html.home #pwa-install-banner {
	top: 64px !important;
	background: rgba(21, 23, 29, 0.85) !important;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

@media (max-width: 600px) {
	html.home #pwa-install-banner { top: 58px !important; }
}

/* ---- Base type ---- */

.ld-page,
.ld-nav {
	font-family: var(--ld-font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.ld-page h1, .ld-page h2, .ld-page h3, .ld-page p {
	margin: 0;
}

.ld-page a { text-decoration: none; }
.ld-page a:hover, .ld-page a:focus { text-decoration: none; }

/* ---- Fixed glass nav ---- */

.ld-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: rgba(13, 14, 18, 0.85); /* solid enough to hold on the class-less fallback render too */
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ld-nav-inner {
	width: 100%;
	padding: 0 32px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ld-wordmark {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--ld-text);
}
.ld-wordmark:hover, .ld-wordmark:focus { color: var(--ld-text); }
.ld-wordmark .ld-dot { color: var(--ld-accent); }

/* ---- Buttons ---- */

.ld-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 28px;
	border-radius: 999px;
	font-family: var(--ld-font);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.ld-btn-primary {
	background: var(--ld-accent);
	color: var(--ld-accent-ink);
	font-weight: 600;
}
.ld-btn-primary:hover, .ld-btn-primary:focus {
	background: var(--ld-accent-strong);
	color: var(--ld-accent-ink);
	transform: translateY(-1px);
}

.ld-btn-ghost {
	background: rgba(255, 255, 255, 0.07);
	border-color: var(--ld-border);
	color: var(--ld-text);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
.ld-btn-ghost:hover, .ld-btn-ghost:focus {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--ld-text);
}

.ld-btn-sm { padding: 10px 20px; font-size: 14px; }

.ld-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.ld-btn-sm svg { width: 15px; height: 15px; }

/* main.css nukes focus outlines (button:focus { outline:0 !important }) —
   restore visible keyboard focus for the page's interactive elements. */
.ld-btn:focus-visible,
.ld-feature:focus-visible {
	outline: 2px solid var(--ld-accent) !important;
	outline-offset: 2px;
}

/* ---- Page shell ---- */

.ld-page {
	overflow-x: clip;
	/* Self-sufficient dark canvas: bodyhome.tpl is ALSO YunkPageController's
	   fallback for unknown routes, which renders <html class=""> — so the
	   theme must not depend on html.home (main.css would win with white). */
	background: var(--ld-bg);
	color: var(--ld-text);
}

.ld-section {
	max-width: 1360px;
	margin: 0 auto;
	padding: 56px 28px;
}

/* Extra air after the steps, leading into the split section */
.ld-section--roomy { padding-bottom: 120px; }

/* The split section runs wider than the base column */
.ld-section--wide { max-width: 1500px; }

.ld-divider {
	max-width: 1360px;
	margin: 0 auto;
	border: 0;
	border-top: 1px solid var(--ld-border-soft);
}

.ld-section-head {
	max-width: 640px;
	margin: 0 auto 44px;
	text-align: center;
}

/* The two showcase headings ("A different kind of community" and
   "Interested in Tribalry?"): main font at Thin weight (100/200 cuts loaded
   page-scoped from bodyhome.tpl), flanked by divider lines that fade out. */
.ld-section-head h2 {
	display: flex;
	align-items: center;
	gap: 24px;
	font-size: clamp(24px, 3.2vw, 34px);
	font-weight: 100;
	line-height: 1.2;
	letter-spacing: 0.02em;
	color: var(--ld-text);
}

.ld-section-head h2::before,
.ld-section-head h2::after {
	content: '';
	flex: 1;
	min-width: 36px;
	height: 1px;
}

.ld-section-head h2::before {
	background: linear-gradient(to right, transparent, rgba(232, 166, 109, 0.45));
}

.ld-section-head h2::after {
	background: linear-gradient(to left, transparent, rgba(232, 166, 109, 0.45));
}

.ld-section-head p {
	margin-top: 14px;
	font-size: 16px;
	line-height: 1.65;
	color: var(--ld-text-soft);
}

/* ---- Hero: middle-centered over a dusk city photo that dissolves
        into the dark base at the bottom ---- */

.ld-hero {
	position: relative;
	min-height: 76vh;
	min-height: 76svh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 108px 28px 64px; /* top clears the fixed nav */
}

/* Photo + scrim in one paint: the bottom stops are SOLID --ld-bg so the
   hero blends seamlessly into the "different kind of community" section. */
.ld-hero-bg {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to top,
			#0d0e12 0%,
			#0d0e12 4%,
			rgba(13, 14, 18, 0.80) 32%,
			rgba(13, 14, 18, 0.55) 62%,
			rgba(13, 14, 18, 0.68) 100%
		),
		url('/img/img-hero-city.jpg') center 42% / cover no-repeat;
	pointer-events: none;
}

.ld-hero-inner {
	position: relative;
	max-width: 1000px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
}

.ld-hero-inner > * { margin: 0; }

.ld-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ld-accent);
}

.ld-h1 {
	font-size: clamp(56px, 11vw, 118px);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: var(--ld-text);
}

.ld-sub {
	max-width: 720px;
	font-size: clamp(16px, 2.2vw, 19px);
	line-height: 1.7;
	color: #c3c9d2; /* a notch brighter than --ld-text-soft for photo overlay */
}

.ld-cta-row {
	margin-top: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}

/* ---- Icon chips (shared by steps + feature list) ---- */

.ld-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: rgba(232, 166, 109, 0.12);
	border: 1px solid rgba(232, 166, 109, 0.25);
	color: var(--ld-accent);
	flex-shrink: 0;
}

.ld-icon svg { width: 22px; height: 22px; }

.ld-icon-sm { width: 42px; height: 42px; border-radius: 12px; }
.ld-icon-sm svg { width: 20px; height: 20px; }

/* ---- Icon centering inside centered step cards ---- */

.ld-step .ld-icon { margin: 0 auto; display: flex; }

/* ---- "How it works" steps ---- */

.ld-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.ld-step {
	background: var(--ld-glass);
	border: 1px solid var(--ld-border-soft);
	border-radius: var(--ld-radius);
	padding: 34px 28px 30px;
	text-align: center;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ld-step:hover {
	background: var(--ld-glass-strong);
	border-color: var(--ld-border);
}

.ld-step h3 {
	margin-top: 18px;
	font-size: 19px;
	font-weight: 600;
	color: var(--ld-text);
}

.ld-step p {
	margin-top: 10px;
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--ld-text-soft);
}

/* ---- "Everything your tribe needs": content left, image right ---- */

.ld-split {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 56px;
	align-items: center;
}

.ld-split-content h2 {
	font-size: clamp(26px, 4vw, 36px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--ld-text);
}

.ld-page .ld-split-sub {
	margin-top: 14px;
	font-size: 16px;
	line-height: 1.65;
	color: var(--ld-text-soft);
}

.ld-feature-list {
	margin-top: 34px;
	display: grid;
	gap: 8px;
}

/* Feature entries are BUTTONS driving the showcase panel */
.ld-feature {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	width: 100%;
	text-align: left;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 14px;
	padding: 14px 16px;
	font-family: var(--ld-font);
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.ld-feature:hover {
	background: var(--ld-glass);
}

.ld-feature.is-active {
	background: var(--ld-glass);
	border-color: rgba(232, 166, 109, 0.35);
}

.ld-feature h3 {
	font-size: 17px;
	font-weight: 600;
	color: var(--ld-text);
}

.ld-feature p {
	margin-top: 6px;
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--ld-text-soft);
}

.ld-split-media {
	position: relative;
}

/* Crossfading showcase panel driven by the feature buttons */
.ld-showcase {
	position: relative;
	min-height: 560px;
	border-radius: var(--ld-radius-lg);
	border: 1px solid var(--ld-border);
	overflow: hidden;
}

.ld-showcase-img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.ld-showcase-img.is-active { opacity: 1; }

/* Cohesion scrim over whichever image is showing */
.ld-showcase::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(13, 14, 18, 0.45), rgba(13, 14, 18, 0.02) 55%);
	pointer-events: none;
}

/* ---- Contact / interest form ---- */

.ld-form-section {
	padding-bottom: 96px;
	scroll-margin-top: 84px;
}

.ld-contact-centered {
	max-width: 620px;
	margin: 0 auto;
}

.ld-contact-centered .ld-section-head { margin-bottom: 32px; }

.ld-contact-centered .ld-section-head h2 { margin-top: 14px; }

.ld-page .ld-contact-alt {
	text-align: center;
	margin-top: 18px;
	font-size: 13.5px;
	color: var(--ld-text-faint);
}

.ld-contact-alt a { color: var(--ld-accent); }
.ld-contact-alt a:hover { color: var(--ld-accent-strong); }

.ld-form-card {
	background: var(--ld-glass);
	border: 1px solid var(--ld-border);
	border-radius: var(--ld-radius-lg);
	padding: 38px 38px 34px;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.ld-toggle {
	display: flex;
	gap: 0;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--ld-border-soft);
	border-radius: 999px;
	padding: 4px;
	margin-bottom: 24px;
}

.ld-toggle input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ld-toggle label {
	flex: 1;
	text-align: center;
	padding: 11px 10px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ld-text-soft);
	cursor: pointer;
	margin: 0;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ld-toggle input[type="radio"]:checked + label {
	background: var(--ld-accent);
	color: var(--ld-accent-ink);
	font-weight: 600;
}

.ld-toggle input[type="radio"]:focus-visible + label {
	outline: 2px solid var(--ld-accent);
	outline-offset: 2px;
}

.ld-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.ld-field { margin-bottom: 16px; }

.ld-field label {
	display: block;
	margin: 0 0 7px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--ld-text-soft);
}

.ld-field .ld-req { color: var(--ld-accent); }

.ld-input,
.ld-textarea {
	display: block;
	width: 100%;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--ld-border-soft);
	border-radius: 12px;
	padding: 13px 16px;
	font-family: var(--ld-font);
	font-size: 15px;
	line-height: 1.4;
	color: var(--ld-text);
	outline: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
}

.ld-input::placeholder,
.ld-textarea::placeholder { color: var(--ld-text-faint); }

.ld-input:focus,
.ld-textarea:focus {
	border-color: rgba(232, 166, 109, 0.55);
	background: rgba(255, 255, 255, 0.06);
}

.ld-textarea {
	resize: vertical;
	min-height: 110px;
}

.ld-form-submit {
	width: 100%;
	margin-top: 8px;
}

/* Honeypot — visually removed but still fillable by naive bots.
   Deliberately NOT display:none (some bots skip hidden fields). */
.ld-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* Errors + success */

.ld-errors {
	background: rgba(220, 76, 76, 0.10);
	border: 1px solid rgba(220, 76, 76, 0.35);
	border-radius: 12px;
	padding: 14px 18px;
	margin-bottom: 22px;
}

.ld-errors p {
	font-size: 14px;
	line-height: 1.5;
	color: #f2b8b8;
}
.ld-errors p + p { margin-top: 6px; }

.ld-success {
	text-align: center;
	padding: 26px 10px 12px;
}

.ld-success-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background: rgba(232, 166, 109, 0.14);
	border: 1px solid rgba(232, 166, 109, 0.35);
	color: var(--ld-accent);
	margin-bottom: 20px;
}
.ld-success-check svg { width: 26px; height: 26px; }

.ld-success h2 {
	font-size: 24px;
	font-weight: 600;
	color: var(--ld-text);
}

.ld-success p {
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--ld-text-soft);
}

/* ---- Fake-company logo marquee: pure-CSS infinite loop. Deliberately
        NON-interactive — pointer-events:none kills clicks, and there is
        NO hover-pause rule (it must keep scrolling under the cursor). ---- */

.ld-marquee-section {
	border-top: 1px solid var(--ld-border-soft);
	padding: 44px 0 60px;
	overflow: hidden;
}

.ld-page .ld-marquee-label {
	text-align: center;
	margin: 0 0 46px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ld-text-faint);
}

.ld-marquee {
	overflow: hidden;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.ld-marquee-track {
	display: flex;
	width: max-content;
	animation: ld-marquee-scroll 55s linear infinite;
}

.ld-marquee-group {
	display: flex;
	gap: 16px;
	padding-right: 16px; /* keeps the seam gap identical to the tile gap */
}

@keyframes ld-marquee-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* Portrait image cards. The background-image is set inline per tile in the
   template; swap those paths when the real company images arrive. */
.ld-co-card {
	position: relative;
	width: 200px;
	height: 268px;
	border-radius: 16px;
	border: 1px solid var(--ld-border);
	background-size: cover;
	background-position: center;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	flex-shrink: 0;
}

.ld-co-card span {
	width: 100%;
	padding: 40px 16px 14px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
	background: linear-gradient(to top, rgba(10, 11, 14, 0.88), rgba(10, 11, 14, 0.0));
}

@media (prefers-reduced-motion: reduce) {
	.ld-marquee-track { animation: none; }
}

/* ---- Scroll reveal — FAIL-OPEN: elements are hidden only after JS
        tags them .ld-prep (right before observing). No JS, old browser,
        or a script error = everything simply shows, un-animated. ---- */

.ld-reveal.ld-prep {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.55s ease, transform 0.55s ease;
}

.ld-reveal.ld-in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.ld-reveal.ld-prep { opacity: 1; transform: none; transition: none; }
	html.home, html.home body { scroll-behavior: auto; }
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
	.ld-steps { grid-template-columns: 1fr; }
	.ld-co-card { width: 170px; height: 228px; }
	.ld-split { grid-template-columns: 1fr; gap: 36px; }
	.ld-split-media { order: 2; }
	.ld-showcase { min-height: 340px; }
	.ld-section--roomy { padding-bottom: 72px; }
}

@media (max-width: 600px) {
	.ld-nav-inner { padding: 0 20px; height: 58px; }
	.ld-section { padding: 40px 20px; }
	.ld-hero { padding: 96px 20px 56px; }
	.ld-cta-row .ld-btn { width: 100%; }
	.ld-form-card { padding: 30px 22px 26px; }
	.ld-field-row { grid-template-columns: 1fr; gap: 0; }
	.ld-form-section { scroll-margin-top: 70px; }
}
