/*
Theme Name: Weblancers
Theme URI: https://weblancers.in
Author: Weblancers
Description: Custom theme for Weblancers. Clean, white and fast: system type, a cursor-reactive wordmark, typewriter line, live service previews and a scrubbable story timeline. Opens with a note from the founder. Ships in a "paused" state.
Version: 4.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: weblancers
*/

/* ==========================================================================
   Fonts
   The site uses the device's own system font (SF Pro on Apple devices),
   so there is nothing to download. Two small fonts are kept for the note.
   ========================================================================== */
@font-face {
	font-family: "Bricolage";
	src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
	font-weight: 200 800;
	font-stretch: 75% 100%;
	font-display: swap;
}
@font-face {
	font-family: "Signature";
	src: url("assets/fonts/signature.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--paper: #ffffff;
	--surface: #f5f5f7;
	--surface-2: #e8e8ed;
	--ink: #1d1d1f;
	--ink-2: #424245;
	--graphite: #6e6e73;
	--quiet: #86868b;
	--line: #d2d2d7;
	--hair: #e8e8ed;
	--accent: #0071e3;
	--amber: #ff9f0a;

	--f: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--m: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--f-note: "Bricolage", var(--f);

	--gutter: clamp(20px, 4vw, 48px);
	--maxw: 1200px;
	--radius: 28px;
	--ease: cubic-bezier(0.25, 0.1, 0.25, 1);
	--ease-io: cubic-bezier(0.65, 0, 0.35, 1);
	--spring: cubic-bezier(0.34, 1.4, 0.64, 1);
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(0, 0, 0, 0.12);

	color-scheme: light only;
	box-sizing: border-box;
	padding-top: env(safe-area-inset-top, 0px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0; background: var(--paper); color: var(--ink);
	font-family: var(--f); font-size: 17px; line-height: 1.5; font-weight: 400; letter-spacing: -0.01em;
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: #b3d7ff; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.h2 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.07; letter-spacing: -0.028em; font-weight: 600; }
.display { font-size: clamp(44px, 7.4vw, 88px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; max-width: 14ch; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; color: var(--graphite); max-width: 40ch; letter-spacing: -0.015em; }

/* ==========================================================================
   Buttons & pills
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 48px; padding: 0 24px; border-radius: 999px;
	font-size: 17px; font-weight: 500; text-decoration: none; cursor: pointer;
	border: 1px solid transparent;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; }
.btn--line { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--line:hover { background: var(--accent); color: #fff; }
.btn[disabled] { background: var(--surface); color: var(--quiet); border-color: var(--hair); cursor: not-allowed; }

.status__dot { position: relative; display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.status__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--amber); opacity: 0; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.4); opacity: 0.9; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

/* ==========================================================================
   Navigation: frosted bar
   ========================================================================== */
.nav { position: sticky; top: 0; z-index: 50; padding-top: calc(env(safe-area-inset-top, 0px) + 10px); pointer-events: none; transition: transform 0.45s var(--ease); }
.nav.is-hidden { transform: translateY(-120%); }
.nav__inner {
	position: relative; pointer-events: auto;
	display: flex; align-items: center; gap: 24px; height: 54px; padding: 0 6px 0 22px; border-radius: 999px;
	background: rgba(255, 255, 255, 0.78);
	-webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 6px 24px -14px rgba(0, 0, 0, 0.2);
}
.nav__progress { display: none; }
.nav__brand { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; margin-right: auto; }
.nav__brand span { font-weight: 400; }
.nav__links { display: flex; gap: 2px; }
.nav__links a { font-size: 14px; text-decoration: none; color: var(--ink-2); padding: 7px 14px; border-radius: 999px; transition: color 0.2s ease, background-color 0.2s ease; }
.nav__links a:hover { color: var(--ink); background: rgba(0, 0, 0, 0.04); }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__cta { display: inline-flex; align-items: center; gap: 8px; color: #fff; background: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; height: 42px; padding: 0 18px; border-radius: 999px; transition: background-color 0.2s ease; }
.nav__cta:hover { background: #000; }
.nav__arrow { transition: transform 0.25s ease; }
.nav__cta:hover .nav__arrow { transform: translateX(2px); }
.nav__toggle { display: none; align-items: center; gap: 10px; background: none; border: 0; padding: 8px 14px; cursor: pointer; font-size: 15px; }
.nav__toggle-icon { display: grid; gap: 5px; width: 18px; }
.nav__toggle-icon i { display: block; height: 1.5px; background: currentColor; transition: transform 0.3s var(--ease); }
.nav__toggle[aria-expanded="true"] .nav__toggle-icon i:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-icon i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 40; background: rgba(255, 255, 255, 0.97); display: flex; align-items: flex-end; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 48px); }
.menu[hidden] { display: none; }
.menu__links { display: grid; gap: 6px; }
.menu__links a { font-size: clamp(36px, 11vw, 56px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; text-decoration: none; opacity: 0; transform: translateY(16px); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); transition-delay: calc(var(--i, 0) * 50ms); }
.menu.is-open .menu__links a { opacity: 1; transform: none; }
@media (max-width: 820px) {
	.nav__links, .nav__cta { display: none; }
	.nav__toggle { display: inline-flex; }
	.nav__inner { padding-right: 4px; }
}

/* ==========================================================================
   Wordmark: letters thicken near the cursor
   ========================================================================== */
.wordmark {
	margin: 0; font-size: var(--wm-size, 16vw); line-height: 0.9; letter-spacing: -0.035em;
	font-weight: 300; white-space: nowrap; user-select: none; -webkit-user-select: none; touch-action: pan-y;
	contain: layout style;
}
.wordmark .ch { display: inline-block; }
.wordmark--hero { margin-left: -0.03em; }
.wordmark--foot { color: var(--hair); }
.wordmark--foot .ch { color: color-mix(in srgb, var(--ink) calc(min(1, var(--inf, 0) * 1.6) * 100%), var(--hair)); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(64px, 8vw, 112px); }
.hero__meta { margin-bottom: clamp(20px, 2.6vw, 32px); }
.hero__status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 7px 14px 7px 12px; border-radius: 999px; background: var(--surface); transition: background-color 0.2s ease; }
.hero__status:hover { background: var(--surface-2); }
.hero__row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; margin-top: clamp(36px, 4.5vw, 60px); padding-top: 28px; border-top: 1px solid var(--hair); }
.type__label { display: block; font-size: 15px; color: var(--graphite); margin-bottom: 6px; }
.type__line { display: flex; align-items: center; min-height: 1.2em; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; }
.type__out { color: var(--ink); }
.type__caret { display: inline-block; width: 3px; height: 0.95em; margin-left: 3px; border-radius: 2px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
.is-typing .type__caret { animation: none; }
@keyframes blink { 50% { opacity: 0; } }
.hero__aside { display: grid; gap: 24px; justify-items: start; }
.hero__lede { font-size: 19px; line-height: 1.45; color: var(--graphite); max-width: 34ch; letter-spacing: -0.015em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .hero__row { grid-template-columns: 1fr; gap: 32px; } }

/* ==========================================================================
   Statement (words light up as you scroll)
   ========================================================================== */
.statement { padding-block: clamp(80px, 11vw, 150px); border-top: 1px solid var(--hair); }
.statement__text { font-size: clamp(28px, 3.6vw, 48px); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; max-width: 26ch; }
.statement__text .w { color: color-mix(in srgb, var(--ink) calc(var(--lit, 0.2) * 100%), var(--paper)); }
.statement__by { margin-top: 28px; color: var(--graphite); font-size: 17px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 16px; } }

/* ==========================================================================
   Services list (home)
   ========================================================================== */
.svcs { padding-block: clamp(80px, 10vw, 140px); }
.svc-list { border-bottom: 1px solid var(--hair); }
.svc {
	display: grid; grid-template-columns: 1fr minmax(220px, 340px); gap: 10px 32px; align-items: center;
	padding: clamp(22px, 2.4vw, 32px) 0; border-top: 1px solid var(--hair); text-decoration: none; color: var(--ink);
	transition: opacity 0.3s ease;
}
.svc__name { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 500; transition: transform 0.4s var(--ease), color 0.2s ease; }
.svc__desc { color: var(--graphite); font-size: 17px; }
.svc__inline { display: none; grid-column: 1 / -1; }
@media (hover: hover) and (pointer: fine) {
	.svc-list:hover .svc { opacity: 0.35; }
	.svc-list:hover .svc:hover, .svc:focus-visible { opacity: 1; }
	.svc:hover .svc__name, .svc:focus-visible .svc__name { transform: translateX(10px); }
}
@media not ((hover: hover) and (pointer: fine)) {
	.svc { grid-template-columns: 1fr; }
	.svc__inline { display: block; margin-top: 8px; }
	.svc-float { display: none; }
}
.svc-float { position: fixed; left: 0; top: 0; z-index: 30; width: clamp(260px, 24vw, 360px); pointer-events: none; opacity: 0; transform: translate3d(-999px, -999px, 0); transition: opacity 0.25s ease; will-change: transform; }
.svc-float.is-on { opacity: 1; }
.svc-float__inner { transform: scale(0.92); transition: transform 0.4s var(--ease); }
.svc-float.is-on .svc-float__inner { transform: scale(1); }
.svc-float__item { display: none; }
.svc-float__item.is-active { display: block; }
.svc-float .vis { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.3); }

/* ==========================================================================
   Service visuals
   ========================================================================== */
.vis { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); padding: 7%; display: grid; place-items: center; }
.vw { width: 100%; height: 100%; background: var(--paper); border-radius: 10px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; box-shadow: var(--shadow); }
.vw__bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.vw__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.vw__bar span { margin-left: 8px; flex: 1; font-size: 10px; color: var(--graphite); background: var(--surface); border-radius: 6px; padding: 2px 8px; }
.vw__page { display: grid; padding: 10px; gap: 7px; grid-template-columns: repeat(3, 1fr); grid-template-rows: 8px 1fr 6px 6px 14px 0.8fr; }
.vw__page b { border-radius: 4px; background: var(--surface-2); transform-origin: left center; }
.vw__nav, .vw__hero { grid-column: 1 / -1; }
.vw__line--1 { grid-column: 1 / 3; }
.vw__line--2 { grid-column: 1 / 2; }
.vw__btn { grid-column: 1 / 2; width: 70%; border-radius: 999px !important; }
.is-live .vw__page b { animation: build 3.6s var(--ease) infinite; animation-delay: calc(var(--k, 0) * 110ms); }
.vw__nav { --k: 0; } .vw__hero { --k: 1; } .vw__line--1 { --k: 2; } .vw__line--2 { --k: 3; } .vw__btn { --k: 4; } .vw__card--1 { --k: 5; } .vw__card--2 { --k: 6; } .vw__card--3 { --k: 7; }
.is-live .vw__hero { background: var(--ink); }
.is-live .vw__btn { background: var(--accent); }
@keyframes build { 0% { transform: scaleX(0); opacity: 0; } 12%, 82% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

.vv { width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 8px; }
.vv__screen { position: relative; border-radius: 10px; overflow: hidden; background: radial-gradient(80% 90% at 30% 30%, #3a3a40, #0b0b0d 70%); }
.vv__screen::after { content: ""; position: absolute; left: 50%; top: 46%; width: 0; height: 0; border-left: 16px solid rgba(255, 255, 255, 0.9); border-top: 10px solid transparent; border-bottom: 10px solid transparent; transform: translate(-40%, -50%); }
.vv__tc { position: absolute; left: 10px; bottom: 8px; font-family: var(--m); font-size: 11px; color: rgba(255, 255, 255, 0.8); font-variant-numeric: tabular-nums; }
.vv__tracks { position: relative; display: grid; gap: 4px; padding: 6px; border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.vv__track { position: relative; height: 13px; }
.vv__track b { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 1%); width: calc(var(--w) * 1% - 2px); border-radius: 3px; background: var(--ink); }
.vv__track:nth-child(2) b { background: var(--quiet); }
.vv__track--audio b { background: var(--surface-2); }
.vv__head { position: absolute; top: 2px; bottom: 2px; left: 6px; width: 2px; background: var(--accent); border-radius: 2px; }
.is-live .vv__head { animation: head 4s linear infinite; }
@keyframes head { from { left: 6px; } to { left: calc(100% - 8px); } }

.vc { width: 100%; height: 100%; border-radius: 10px; padding: 14px 16px; background: var(--paper); box-shadow: var(--shadow); display: grid; align-content: center; gap: 5px; font-family: var(--m); font-size: clamp(10px, 0.9vw, 13px); line-height: 1.5; white-space: nowrap; overflow: hidden; }
.vc__line { display: block; font-family: inherit; color: var(--ink); }
.vc__line--in { padding-left: 2ch; } .vc__line--in2 { padding-left: 4ch; }
.vc s { text-decoration: none; color: var(--accent); }
.vc em { font-style: normal; color: var(--graphite); }
.vc u { text-decoration: none; font-weight: 500; }
.vc__ok { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--ink); color: var(--paper); font-size: 0.85em; }
.is-live .vc__line { animation: typeline 5s steps(22, end) infinite; animation-delay: calc(var(--i) * 0.45s); clip-path: inset(0 100% 0 0); }
@keyframes typeline { 0% { clip-path: inset(0 100% 0 0); } 14%, 84% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }

.va { width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 10px; }
.va__wave { display: flex; align-items: center; gap: 3px; height: 100%; padding: 0 2px; }
.va__wave i { flex: 1; border-radius: 3px; height: calc(var(--n) * 100%); background: var(--quiet); animation: jitter 0.9s ease-in-out infinite alternate; animation-delay: var(--d); transition: height 0.7s var(--ease), background-color 0.5s ease; }
@keyframes jitter { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
.is-live .va__wave i { height: calc(var(--c) * 100%); animation: none; background: var(--ink); }
.va__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--graphite); }
.va__state b { font-weight: 500; }
.va__on { display: none; color: var(--accent); }
.va__off { color: var(--graphite); }
.is-live .va__on { display: inline; }
.is-live .va__off { display: none; }

/* ==========================================================================
   Why us (tiles on a grey band, Apple-style)
   ========================================================================== */
.why { padding-block: clamp(80px, 10vw, 140px); background: var(--surface); }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { display: grid; grid-template-rows: 1fr auto; gap: 24px; min-height: 320px; padding: clamp(24px, 2.6vw, 34px); border-radius: var(--radius); background: var(--paper); }
.tile--wide { grid-column: span 4; }
.tile--narrow { grid-column: span 2; }
.tile__title { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.12; letter-spacing: -0.022em; font-weight: 600; }
.tile__text { color: var(--graphite); font-size: 17px; margin-top: 6px; max-width: 36ch; }
.tile__art { display: grid; place-items: center; min-height: 150px; }
@media (max-width: 900px) { .tile--wide, .tile--narrow { grid-column: span 6; } .tile { min-height: 0; } }

.globe { width: min(200px, 60%); aspect-ratio: 1; border-radius: 50%; position: relative; overflow: hidden; background: radial-gradient(circle at 34% 28%, #fff, var(--surface-2) 72%); box-shadow: inset -14px -18px 34px rgba(0, 0, 0, 0.1), 0 24px 44px -26px rgba(0, 0, 0, 0.3); }
.globe::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background-image: radial-gradient(circle, var(--quiet) 1px, transparent 1.3px); background-size: 11px 11px; opacity: 0.6; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 72%); mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 72%); }
.globe__pin { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.2); transition: transform 0.4s var(--spring); }
.globe__pin:nth-child(1) { left: 58%; top: 34%; }
.globe__pin:nth-child(2) { left: 30%; top: 58%; transition-delay: 0.06s; }
.globe__pin:nth-child(3) { left: 68%; top: 64%; transition-delay: 0.12s; }
.tile--globe:hover .globe__pin, .tile--globe.is-lit .globe__pin { transform: scale(1.4); }

.gauge { width: min(200px, 80%); position: relative; padding-bottom: 20px; }
.gauge svg { width: 100%; overflow: visible; }
.gauge__track { fill: none; stroke: var(--surface-2); stroke-width: 10; stroke-linecap: round; }
.gauge__fill { fill: none; stroke: var(--ink); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 151; stroke-dashoffset: 106; transition: stroke-dashoffset 1s var(--spring); }
.gauge__needle { transform-origin: 60px 60px; transform: rotate(-36deg); transition: transform 1s var(--spring); }
.gauge__needle line { stroke: var(--accent); }
.gauge__needle circle { fill: var(--accent); }
.tile--fast:hover .gauge__fill, .tile--fast.is-revved .gauge__fill { stroke-dashoffset: 5; }
.tile--fast:hover .gauge__needle, .tile--fast.is-revved .gauge__needle { transform: rotate(84deg); }
.gauge__label { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 13px; color: var(--graphite); }

.stars { display: flex; gap: 6px; }
.stars svg { width: clamp(28px, 3vw, 36px); height: auto; fill: var(--surface-2); transition: fill 0.25s ease, transform 0.4s var(--spring); }
.tile--stars:hover .stars svg, .tile--stars.is-lit .stars svg { fill: #ffb800; transform: translateY(-4px); }
.stars svg:nth-child(2) { transition-delay: 0.05s; } .stars svg:nth-child(3) { transition-delay: 0.1s; } .stars svg:nth-child(4) { transition-delay: 0.15s; } .stars svg:nth-child(5) { transition-delay: 0.2s; }

.switch { display: inline-flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 17px; font-weight: 500; }
.switch__track { position: relative; width: 64px; height: 38px; border-radius: 999px; background: var(--surface-2); transition: background-color 0.25s ease; flex: none; }
.switch__knob { position: absolute; left: 3px; top: 3px; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.35s var(--spring); }
.switch.is-on .switch__track { background: #34c759; }
.switch.is-on .switch__knob { transform: translateX(26px); }
.switch__label { min-width: 12ch; text-align: left; }

/* ==========================================================================
   Pause card
   ========================================================================== */
.pause { padding-block: clamp(80px, 10vw, 140px) 0; }
.pause__stage { width: min(1296px, 100% - 2 * var(--gutter) + 24px); margin-inline: auto; min-height: min(70svh, 640px); display: grid; align-items: center; padding-block: clamp(64px, 8vw, 104px); border-radius: clamp(28px, 4vw, 40px); background: var(--surface); }
.pause__aura { display: none; }
.pause__inner { display: grid; grid-template-columns: minmax(0, 0.9fr) 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.pause__btn { position: relative; justify-self: center; display: grid; place-items: center; width: min(26vw, 300px); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); border-radius: 28px; }
.pause__btn:focus-visible { outline-offset: 8px; }
.pause__glyph { width: 100%; height: auto; overflow: visible; transition: transform 0.4s var(--spring); }
.pause__btn:hover .pause__glyph { transform: scale(1.03); }
.pause__btn:active .pause__glyph { transform: scale(0.95); }
.pause__btn.is-nope .pause__glyph { animation: nope 0.5s var(--ease-io); }
@keyframes nope { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.pause__glyph polygon { fill: currentColor; stroke: currentColor; stroke-width: 7; stroke-linejoin: round; }
.pause__bubble { position: absolute; left: 50%; top: -10px; transform: translate(-50%, 8px); background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; padding: 9px 15px; border-radius: 14px; opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.4s var(--spring); }
.pause__bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.pause__btn.is-talking .pause__bubble { opacity: 1; transform: translate(-50%, 0); }
.pause__hint { position: absolute; bottom: -32px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--quiet); white-space: nowrap; }
.pause__copy { display: grid; gap: 20px; max-width: 34ch; }
.pause__copy > p { font-size: 19px; line-height: 1.45; }
.pause__copy > p:not(.clock) { color: var(--graphite); }
.pause__title { font-size: clamp(40px, 5.4vw, 64px); }
.pause__note { padding: 0; border: 0; background: none; cursor: pointer; color: var(--accent); font-size: 17px; }
.pause__note:hover { text-decoration: underline; }
.clock { font-size: 15px; color: var(--graphite); padding-top: 20px; border-top: 1px solid var(--line); }
.clock__out { display: block; margin-top: 4px; color: var(--ink); font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
@media (max-width: 820px) {
	.pause__inner { grid-template-columns: 1fr; gap: 56px; }
	.pause__btn { width: min(44vw, 200px); justify-self: start; }
	.pause__hint { left: 0; transform: none; }
	.pause__bubble { left: 0; transform: translate(0, 8px); }
	.pause__btn.is-talking .pause__bubble { transform: none; }
	.pause__bubble::after { left: 40px; }
}

/* ==========================================================================
   Story scrubber
   ========================================================================== */
.tape { padding-block: clamp(80px, 10vw, 140px); }
.scrub { display: grid; gap: clamp(32px, 4vw, 56px); }
.scrub__screen { display: grid; min-height: 210px; }
.scrub__event { grid-area: 1 / 1; display: grid; align-content: start; gap: 10px; max-width: 44ch; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.3s ease, transform 0.4s var(--ease); }
.scrub__event.is-active { opacity: 1; transform: none; pointer-events: auto; }
.scrub__event p { color: var(--graphite); font-size: 19px; line-height: 1.45; }
.scrub__when { font-size: 15px !important; color: var(--accent) !important; font-weight: 500; }
.scrub__what { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.08; letter-spacing: -0.028em; font-weight: 600; }
.scrub__track { position: relative; height: 90px; margin-inline: 12px; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.scrub__rail { position: absolute; left: 0; right: 0; top: 30px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--hair) 0 var(--gap, 72%), transparent var(--gap, 72%)), repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }
.scrub__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 2px; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.scrub__marks { position: absolute; inset: 0; }
.scrub__mark { position: absolute; top: 23px; transform: translateX(-50%); display: grid; justify-items: center; gap: 12px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--graphite); white-space: nowrap; }
.scrub__mark::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); transition: border-color 0.2s ease, background-color 0.2s ease; }
.scrub__mark.is-past::before { border-color: var(--ink); background: var(--ink); }
.scrub__mark.is-paused::before { border-color: var(--amber); }
.scrub__mark.is-paused.is-past::before { background: var(--amber); border-color: var(--amber); }
.scrub__head { position: absolute; top: 11px; left: 0; width: 40px; height: 40px; margin-left: -20px; display: grid; place-items: center; cursor: grab; border-radius: 50%; z-index: 2; will-change: transform; }
.scrub__head:active { cursor: grabbing; }
.scrub__knob { width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06); transition: transform 0.25s var(--ease); }
.scrub__head:hover .scrub__knob, .is-dragging .scrub__knob { transform: scale(1.12); }
@media (max-width: 640px) { .scrub__mark span { display: none; } }

/* ==========================================================================
   Outro
   ========================================================================== */
.outro { padding-block: clamp(80px, 10vw, 140px); border-top: 1px solid var(--hair); }
.outro__kicker { font-size: 19px; color: var(--graphite); margin-bottom: 12px; }
.outro__link { display: inline-flex; align-items: center; gap: 0.2em; text-decoration: none; font-size: clamp(48px, 8vw, 104px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 600; color: var(--ink); transition: color 0.2s ease; }
.outro__link span { display: inline-block; transition: transform 0.3s var(--ease); }
.outro__link:hover { color: var(--accent); }
.outro__link:hover span { transform: translateX(8px); }

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-head { padding-block: clamp(64px, 9vw, 128px) clamp(40px, 5vw, 72px); }
.page-head__body { margin-top: clamp(24px, 3vw, 40px); padding-top: 24px; border-top: 1px solid var(--hair); display: grid; justify-items: end; }
.page-head__body .lede { max-width: 46ch; }
@media (max-width: 820px) { .page-head__body { justify-items: start; } }

.detail { padding-bottom: clamp(80px, 10vw, 140px); }
.detail__item { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; padding-block: clamp(40px, 5vw, 72px); border-top: 1px solid var(--hair); scroll-margin-top: 84px; }
.detail__item:nth-of-type(even) .detail__text { order: 2; }
.detail__text { display: grid; gap: 16px; align-content: center; }
.detail__text p { font-size: 19px; line-height: 1.45; color: var(--graphite); max-width: 40ch; }
.detail__vis .vis { border-radius: 28px; }
.detail__vis--hover { cursor: pointer; }
@media (max-width: 820px) { .detail__item { grid-template-columns: 1fr; } .detail__item:nth-of-type(even) .detail__text { order: 0; } }

.contact { padding-bottom: clamp(80px, 10vw, 140px); }
.mail { display: grid; gap: 8px; justify-items: start; width: 100%; text-align: left; padding: 0 0 clamp(36px, 4vw, 56px); background: none; border: 0; cursor: pointer; border-bottom: 1px solid var(--hair); }
.mail__addr { font-size: clamp(30px, 6vw, 80px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; word-break: break-word; transition: color 0.2s ease; }
.mail:hover .mail__addr { color: var(--accent); }
.mail.is-copied .mail__addr { color: #34c759; }
.mail__hint { font-size: 15px; color: var(--graphite); }
.reach { margin: 0; }
.reach__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: baseline; padding-block: 24px; border-bottom: 1px solid var(--hair); }
.reach dt { color: var(--graphite); font-size: 17px; }
.reach dd { margin: 0; font-size: clamp(21px, 2.2vw, 28px); letter-spacing: -0.02em; font-weight: 500; }
.reach dd a { text-decoration: none; color: var(--accent); }
.reach dd a:hover { text-decoration: underline; }
@media (max-width: 640px) { .reach__row { grid-template-columns: 1fr; gap: 4px; padding-block: 18px; } }

.quote { padding-bottom: clamp(80px, 10vw, 140px); }
.form { display: grid; gap: 44px; }
.form__group { border: 0; padding: 0; margin: 0; }
.form__legend { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.022em; font-weight: 600; margin-bottom: 18px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); font-size: 16px; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; }
.field { display: grid; gap: 8px; }
.field span { font-size: 14px; color: var(--graphite); }
.field input, .field textarea { font: inherit; font-size: 17px; color: var(--ink); background: var(--surface); border: 1px solid transparent; padding: 14px 16px; resize: none; border-radius: 12px; }
.field input:disabled, .field textarea:disabled { cursor: not-allowed; }
.field--wide { grid-column: 1 / -1; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form__status { display: flex; align-items: center; gap: 12px; color: var(--graphite); font-size: 16px; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }

.prose { padding-block: clamp(56px, 8vw, 120px); max-width: 760px; }
.prose__title { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 28px; }
.prose__body > * + * { margin-top: 1.2em; }
.prose__body a, .prose a { color: var(--accent); }
.prose__item { padding-block: 24px; border-bottom: 1px solid var(--hair); }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot { padding-top: clamp(56px, 7vw, 96px); background: var(--surface); overflow: hidden; }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.foot__about { display: grid; gap: 14px; align-content: start; font-size: 17px; max-width: 32ch; color: var(--ink-2); }
.foot__paused { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 15px; color: var(--graphite); }
.foot__note { padding: 0; border: 0; background: none; cursor: pointer; color: var(--accent); font-size: 15px; }
.foot__note:hover { text-decoration: underline; }
.foot__col { display: grid; gap: 8px; align-content: start; }
.foot__h { font-size: 13px; color: var(--graphite); font-weight: 600; margin-bottom: 4px; }
.foot__col a { text-decoration: none; font-size: 15px; color: var(--ink-2); width: fit-content; }
.foot__col a:hover { color: var(--ink); text-decoration: underline; }
.foot__mark { margin-top: clamp(48px, 7vw, 96px); }
.foot .wordmark--foot { color: var(--surface-2); }
.foot .wordmark--foot .ch { color: color-mix(in srgb, var(--ink) calc(min(1, var(--inf, 0) * 1.6) * 100%), var(--surface-2)); }
.foot__base { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 20px 28px; margin-top: 8px; font-size: 13px; color: var(--graphite); border-top: 1px solid var(--line); }
.totop { padding: 0; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.totop:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 820px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__about { grid-column: 1 / -1; } }

/* ==========================================================================
   Small things
   ========================================================================== */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); z-index: 95; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 15px; display: flex; align-items: center; gap: 10px; transition: opacity 0.25s ease, transform 0.4s var(--spring); }
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Welcome note: an Apple-style sheet over the live site
   ========================================================================== */
.note { position: fixed; inset: 0; z-index: 200; font-family: var(--f-note); }
.note[hidden] { display: none; }
.note__backdrop {
	position: absolute; inset: 0; cursor: pointer;
	background: rgba(20, 20, 24, 0.22);
	opacity: 0; transition: opacity 0.6s var(--ease);
}
.note.is-open .note__backdrop { opacity: 1; }
.note__scroll {
	position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; cursor: pointer;
	display: grid; place-items: center;
	padding: calc(env(safe-area-inset-top, 0px) + 32px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 32px);
}
.note__card {
	position: relative; outline: none; cursor: auto;
	width: min(640px, 100%); padding: clamp(26px, 4vw, 48px);
	border-radius: 34px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.9),
		0 2px 4px rgba(0, 0, 0, 0.04),
		0 24px 48px -12px rgba(0, 0, 0, 0.22),
		0 80px 120px -40px rgba(0, 0, 0, 0.3);
	opacity: 0; transform: translateY(28px) scale(0.96);
	transition: opacity 0.5s var(--ease), transform 0.8s var(--spring);
}
.note.is-open .note__card { opacity: 1; transform: none; }

.note__x {
	position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%;
	display: grid; place-items: center; padding: 0; border: 0; cursor: pointer;
	background: #f0f0f2; color: #1d1d1f;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.4s var(--spring);
}
.note__x:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); transform: rotate(90deg); }
.note__x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }

.note__head { display: flex; align-items: center; gap: 14px; padding-right: 44px; }
.note__icon {
	width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center;
	background: linear-gradient(160deg, #1c1c1e, #000); color: #fff;
	font-size: 15px; font-weight: 760; letter-spacing: -0.04em; font-variation-settings: "wdth" 80;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 14px -6px rgba(0, 0, 0, 0.5);
}
.note__from { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.note__meta { font-size: 14px; color: #515154; }

.note__alert {
	margin-top: 22px; display: flex; align-items: flex-start; gap: 14px;
	padding: 16px 18px; border-radius: 18px;
	background: #fff7e8; border: 1px solid #ffe2ad;
}
.note__alert .status__dot { margin-top: 7px; }
.note__alert-title { font-size: 17px; font-weight: 640; color: #1d1d1f; letter-spacing: -0.01em; }
.note__alert-text { margin-top: 2px; font-size: 15px; line-height: 1.5; color: #5c4a26; }
.note__title { margin-top: 24px; font-size: clamp(36px, 4.6vw, 52px); line-height: 1; letter-spacing: -0.045em; font-weight: 580; font-variation-settings: "wdth" 84; }
.note__body { margin-top: 20px; display: grid; gap: 14px; }
.note__body p { font-size: 18px; line-height: 1.6; color: #1d1d1f; letter-spacing: -0.005em; font-weight: 380; }
.note__signature { margin-top: 14px; font-family: "Signature", cursive; font-size: clamp(50px, 6vw, 64px); line-height: 1.1; color: var(--ink); }
.note__foot { margin-top: 18px; padding-top: 22px; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.note__btn { height: auto; min-height: 50px; padding-block: 12px; white-space: normal; text-align: left; }
.note__btn span { transition: transform 0.4s var(--spring); }
.note__btn:hover span { transform: translateX(4px); }
.note__status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: #515154; }

/* content settles in after the sheet */
.note.is-open .note__head, .note.is-open .note__alert, .note.is-open .note__title, .note.is-open .note__body > p, .note.is-open .note__foot { animation: note-in 0.9s var(--ease) both; }
.note.is-open .note__head { animation-delay: 0.12s; }
.note.is-open .note__alert { animation-delay: 0.18s; }
.note.is-open .note__title { animation-delay: 0.26s; }
.note.is-open .note__body > p:nth-child(1) { animation-delay: 0.3s; }
.note.is-open .note__body > p:nth-child(2) { animation-delay: 0.38s; }
.note.is-open .note__body > p:nth-child(3) { animation-delay: 0.46s; }
.note.is-open .note__body > p:nth-child(4) { animation-delay: 0.54s; }
.note.is-open .note__foot { animation-delay: 0.7s; }
.note.is-open .note__signature { animation: sign 1.5s var(--ease-io) 0.75s both; }
@keyframes note-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
@keyframes sign { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* closing */
.note.is-leaving .note__backdrop { opacity: 0; transition-duration: 0.45s; }
.note.is-leaving .note__card { opacity: 0; transform: translateY(16px) scale(0.97); transition: opacity 0.35s ease, transform 0.45s var(--ease-io); }
html.note-lock, html.note-lock body { overflow: hidden; }

/* phones: a bottom sheet */
@media (max-width: 640px) {
	.note__scroll { place-items: end center; padding: calc(env(safe-area-inset-top, 0px) + 48px) 8px calc(env(safe-area-inset-bottom, 0px) + 8px); }
	.note__card { border-radius: 30px; transform: translateY(60px); }
	.note__body p { font-size: 16.5px; line-height: 1.58; }
	.note__title { margin-top: 20px; }
	.note__btn { font-size: 15px; padding-inline: 20px; }
	.note__foot { flex-direction: column; align-items: stretch; }
	.note__btn { justify-content: center; text-align: center; }
	.note__status { justify-content: center; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
	.js [data-reveal] { opacity: 1; transform: none; }
	.is-live .vc__line { clip-path: none; }
	.statement__text .w { --lit: 1 !important; }
}
.note .btn { font-size: 16px; font-weight: 520; height: auto; }

/* ==========================================================================
   Note-only page
   ========================================================================== */
.holding { background: var(--surface); font-family: var(--f-note); }
.hold {
	position: relative; isolation: isolate; overflow: hidden;
	min-height: 100vh; min-height: 100svh;
	display: grid; place-items: center; align-content: center; gap: 28px;
	padding: calc(env(safe-area-inset-top, 0px) + 40px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 32px);
}
.hold__mark {
	position: absolute; z-index: -1; left: 50%; bottom: -0.2em; transform: translateX(-50%);
	font-family: var(--f); font-size: clamp(70px, 17vw, 300px); line-height: 1; letter-spacing: -0.05em; font-weight: 700;
	color: var(--surface-2); white-space: nowrap; user-select: none; pointer-events: none;
}
.hold__card { opacity: 1; transform: none; animation: hold-in 0.9s var(--spring) both; }
.hold__card .note__head, .hold__card .note__alert, .hold__card .note__title, .hold__card .note__body > p, .hold__foot { animation: note-in 0.9s var(--ease) both; }
.hold__card .note__head { animation-delay: 0.12s; }
.hold__card .note__alert { animation-delay: 0.2s; }
.hold__card .note__title { animation-delay: 0.28s; }
.hold__card .note__body > p:nth-child(1) { animation-delay: 0.36s; }
.hold__card .note__body > p:nth-child(2) { animation-delay: 0.44s; }
.hold__card .note__body > p:nth-child(3) { animation-delay: 0.52s; }
.hold__card .note__body > p:nth-child(4) { animation-delay: 0.6s; }
.hold__foot { animation-delay: 0.75s; }
.hold__card .note__signature { animation: sign 1.5s var(--ease-io) 0.8s both; }
.hold__card .note__head { padding-right: 0; }
@keyframes hold-in { from { opacity: 0; transform: translateY(28px) scale(0.97); } }
.hold__foot { margin-top: 18px; padding-top: 22px; border-top: 1px solid rgba(0, 0, 0, 0.08); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.hold__mail { font-size: 15px; color: var(--accent); text-decoration: none; }
.hold__mail:hover { text-decoration: underline; }
.hold__copy { font-family: var(--f); font-size: 13px; color: var(--quiet); }
@media (max-width: 640px) {
	.hold { padding-inline: 10px; gap: 20px; }
	.hold__card { border-radius: 28px; }
	.hold__card .note__body p { font-size: 16.5px; line-height: 1.58; }
}
@media (prefers-reduced-motion: reduce) {
	.hold__card, .hold__card * { animation: none !important; }
}
