/* ==========================================================================
   Neon Adda — Foundation
   "Night shift at the adda": a site that behaves like a street after dark.
   Tokens · base · type · neon tubes · lockups · controls · buttons
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
	/* Night */
	--ink-950: #050409;
	--ink-900: #08070D;
	--ink-850: #0D0B14;
	--ink-800: #13101C;
	--ink-700: #1C1828;
	--dusk: #1B1532;
	--text: #F3EEF7;
	--text-2: #C9C1D6;
	--muted: #8C849B;
	--line: rgba(243, 238, 247, .12);
	--line-2: rgba(243, 238, 247, .22);

	/* Workshop daylight (sketch paper, tags, polaroids) */
	--paper: #F1EADF;
	--paper-2: #E6DDCE;
	--graphite: #2B2830;

	/* Brand, sampled from the logo */
	--brand-magenta: #E6007E;
	--brand-violet: #8E1C7E;
	--brand-indigo: #3B2A85;
	--brand-cyan: #00A0E3;
	--brand-gradient: linear-gradient(135deg, #E6007E 0%, #8E1C7E 52%, #3B2A85 100%);

	/* Gas colours: what the tubes actually glow */
	--n-pink: #FF2E9A;
	--n-cyan: #27D4FF;
	--n-violet: #A35BFF;
	--n-amber: #FFB13D;
	--n-lime: #B9FF4A;
	--n-red: #FF4040;
	--n-warm: #FFDDB0;
	--n-ice: #DDF5FF;
	--n-orange: #FF8A3D;

	/* Type */
	--f-display: "Instrument Serif", "Times New Roman", serif;
	--f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-tube: "Tilt Neon", "Hanken Grotesk", sans-serif;
	--f-script: "Sacramento", cursive;
	--f-hand: "Caveat", cursive;
	--f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

	--fs-hero: clamp(3.4rem, 1.2rem + 7.6vw, 9.6rem);
	--fs-1: clamp(2.6rem, 1.3rem + 4.6vw, 6.4rem);
	--fs-2: clamp(2rem, 1.2rem + 2.8vw, 4rem);
	--fs-3: clamp(1.4rem, 1.1rem + 1vw, 2rem);
	--fs-lead: clamp(1.06rem, 1rem + .35vw, 1.3rem);

	/* Space & shape */
	--gutter: clamp(18px, 4vw, 56px);
	--max: 1440px;
	--r-xs: 6px;
	--r-sm: 12px;
	--r-md: 20px;
	--r-lg: 32px;
	--section: clamp(5rem, 11vw, 10rem);

	/* Motion */
	--ease-out: cubic-bezier(.16, 1, .3, 1);
	--ease-io: cubic-bezier(.65, 0, .35, 1);
	--ease-snap: cubic-bezier(.34, 1.56, .64, 1);

	/* Scroll-driven night: 0 = 19:00 dusk, 1 = 03:00 deep night (set by core.js) */
	--night: 0;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	background: var(--ink-900);
}

body {
	margin: 0;
	min-height: 100vh;
	color: var(--text);
	font-family: var(--f-body);
	font-size: 1.04rem;
	line-height: 1.6;
	background:
		radial-gradient(120% 70% at 50% -10%, var(--dusk), transparent 70%),
		var(--ink-900);
	background-attachment: fixed;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

img,
svg,
canvas {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd {
	margin: 0;
	padding: 0;
}

ul,
ol {
	list-style: none;
}

/* Scrollbars: just a slim thumb, no arrow buttons, no track. */
::-webkit-scrollbar {
	width: 10px;
	height: 8px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: rgba(243, 238, 247, .22);
	border: 2px solid transparent;
	border-radius: 999px;
	background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
	background-color: rgba(243, 238, 247, .4);
}

::-webkit-scrollbar-button {
	display: none;
	width: 0;
	height: 0;
}

@supports not selector(::-webkit-scrollbar) {
	* {
		scrollbar-width: thin;
		scrollbar-color: rgba(243, 238, 247, .25) transparent;
	}
}

::selection {
	background: var(--n-pink);
	color: var(--ink-900);
}

:focus-visible {
	outline: 2px solid var(--n-cyan);
	outline-offset: 4px;
	border-radius: 6px;
}

.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip {
	position: fixed;
	left: 12px;
	top: -60px;
	z-index: 200;
	padding: .7em 1.1em;
	border-radius: 999px;
	background: var(--n-cyan);
	color: var(--ink-900);
	font-weight: 600;
	transition: top .3s var(--ease-out);
}

.skip:focus {
	top: 12px;
}

.wrap {
	width: min(100% - var(--gutter) * 2, var(--max));
	margin-inline: auto;
}

/* Film grain over everything, very quiet. */
/* Stays inside the viewport (a fixed layer that overhangs makes phones zoom out);
   the noise moves by shifting its background, not the element. */
.grain {
	position: fixed;
	inset: 0;
	z-index: 90;
	pointer-events: none;
	opacity: .085;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
	0% { background-position: 0 0; }
	20% { background-position: -30px 20px; }
	40% { background-position: 20px -40px; }
	60% { background-position: -40px -10px; }
	80% { background-position: 30px 30px; }
	100% { background-position: 0 0; }
}

/* 3. Type ------------------------------------------------------------------ */
.display {
	font-family: var(--f-display);
	font-weight: 400;
	letter-spacing: -.02em;
	line-height: .92;
}

.display em {
	font-style: italic;
}

.h1 { font-size: var(--fs-1); }
.h2 { font-size: var(--fs-2); }
.h3 { font-size: var(--fs-3); line-height: 1.1; }

.lead {
	font-size: var(--fs-lead);
	line-height: 1.55;
	color: var(--text-2);
	max-width: 46ch;
}

.label {
	font-family: var(--f-mono);
	font-size: .72rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
}

.hand {
	font-family: var(--f-hand);
	font-weight: 500;
}

/* Section marker: the adda clock stamp, e.g.  22:00 — The wall  */
.stamp {
	display: inline-flex;
	align-items: center;
	gap: .8rem;
	font-family: var(--f-mono);
	font-size: .74rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
}

.stamp__time {
	color: var(--text);
	padding: .3em .6em;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	font-variant-numeric: tabular-nums;
}

.stamp::after {
	content: "";
	width: 48px;
	height: 1px;
	background: var(--line-2);
}

/* 4. Neon tubes -------------------------------------------------------------
   A tube has three states. Off: clear glass, a faint highlight.
   Igniting: each letter catches with a stutter. On: white-hot core, coloured halo.
   Set the gas colour with --c on the element or any parent.
   -------------------------------------------------------------------------- */
.tube {
	/* Gas colour comes from --c on the tube or any ancestor; pink if none is set. */
	--tc: var(--c, var(--n-pink));
	--glow: 1;
	position: relative;
	display: inline-block;
	white-space: nowrap;
	font-family: var(--f-tube);
	line-height: 1.1;
	color: rgba(255, 255, 255, .13);
	text-shadow: 0 1px 0 rgba(255, 255, 255, .07), 0 -1px 0 rgba(0, 0, 0, .5);
	-webkit-text-stroke: .6px rgba(255, 255, 255, .16);
	transition: color .35s, text-shadow .35s, -webkit-text-stroke-color .35s;
}

.tube--script {
	font-family: var(--f-script);
	-webkit-text-stroke-width: .4px;
}

.tube.is-on,
.is-on > .tube,
[data-power="on"] .tube--powered {
	color: color-mix(in srgb, var(--tc) 22%, #fff);
	-webkit-text-stroke-color: transparent;
	text-shadow:
		0 0 1px #fff,
		0 0 calc(3px * var(--glow)) var(--tc),
		0 0 calc(9px * var(--glow)) var(--tc),
		0 0 calc(20px * var(--glow)) var(--tc),
		0 0 calc(42px * var(--glow)) color-mix(in srgb, var(--tc) 70%, transparent),
		0 0 calc(90px * var(--glow)) color-mix(in srgb, var(--tc) 45%, transparent);
}

.tube__ch {
	display: inline-block;
	white-space: pre;
}

.tube.is-igniting .tube__ch {
	animation: catch 1.1s steps(1, end) both;
	animation-delay: calc(var(--i, 0) * 70ms + var(--d, 0ms));
}

@keyframes catch {
	0% { opacity: .2; }
	7% { opacity: 1; }
	11% { opacity: .25; }
	16% { opacity: 1; }
	22% { opacity: .5; }
	27%, 100% { opacity: 1; }
}

/* Old gas tubes hum; a little life in a lit sign. */
.tube.is-on.is-alive,
[data-power="on"] .tube--powered.is-alive {
	animation: hum 6.5s linear infinite;
}

@keyframes hum {
	0%, 91%, 100% { opacity: 1; }
	92% { opacity: .78; }
	93% { opacity: 1; }
	95.5% { opacity: .86; }
	96.5% { opacity: 1; }
}

/* 5. Logo lockups -------------------------------------------------------------
   The supplied artwork is used as-is. Glow is built from blurred copies of the
   same image, so each colour (magenta tubes, cyan script) glows in its own colour.
   -------------------------------------------------------------------------- */
.lockup {
	display: inline-flex;
	align-items: center;
	gap: .7rem;
}

.lockup--stack {
	flex-direction: column;
	gap: 1rem;
}

.lockup__symbol {
	width: var(--sym, 40px);
	height: auto;
	flex: 0 0 auto;
}

.lockup__title {
	height: var(--title-h, 26px);
	width: auto;
}

.glowimg {
	position: relative;
	display: inline-grid;
	isolation: isolate;
}

.glowimg > img {
	grid-area: 1 / 1;
	width: 100%;
	height: auto;
	transition: opacity .5s var(--ease-out), filter .5s var(--ease-out);
}

.glowimg__halo,
.glowimg__bloom {
	opacity: 0;
	pointer-events: none;
	user-select: none;
}

.glowimg__halo {
	filter: blur(var(--halo, 5px)) saturate(1.6) brightness(1.3);
}

.glowimg__bloom {
	filter: blur(var(--bloom, 22px)) saturate(2) brightness(1.4);
	transform: scale(1.04);
}

/* Unlit: clear glass with a whisper of the colour left in it. */
.glowimg__core {
	filter: grayscale(.7) brightness(.9) contrast(1.05);
	opacity: .62;
}

.glowimg.is-on .glowimg__core,
[data-power="on"] .glowimg--powered .glowimg__core {
	filter: saturate(1.15) brightness(1.25);
	opacity: 1;
}

.glowimg.is-on .glowimg__halo,
[data-power="on"] .glowimg--powered .glowimg__halo {
	opacity: .95;
}

.glowimg.is-on .glowimg__bloom,
[data-power="on"] .glowimg--powered .glowimg__bloom {
	opacity: .75;
}

.glowimg.is-igniting > img {
	animation: catch 1.3s steps(1, end) both;
}

/* Spinning stamp around the symbol: "hand-bent in Hyderabad". */
.seal {
	position: relative;
	width: var(--seal, 148px);
	aspect-ratio: 1;
	display: grid;
	place-items: center;
}

.seal__ring {
	position: absolute;
	inset: 0;
	animation: spin 26s linear infinite;
}

.seal__ring text {
	font-family: var(--f-mono);
	font-size: 9.6px;
	letter-spacing: 3.2px;
	fill: var(--text-2);
	text-transform: uppercase;
}

.seal__symbol {
	width: 46%;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* 6. Buttons --------------------------------------------------------------- */
.btn {
	--c: var(--n-pink);
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6em;
	padding: 1em 1.6em;
	border-radius: 999px;
	font-weight: 600;
	font-size: .95rem;
	letter-spacing: .01em;
	white-space: nowrap;
	transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), background-color .3s, color .3s, border-color .3s;
	transform: translate3d(var(--mx, 0), var(--my, 0), 0);
}

.btn__arrow {
	transition: transform .5s var(--ease-out);
}

.btn:hover .btn__arrow {
	transform: translateX(4px);
}

/* Tube button: the border is a lit tube. */
.btn--tube {
	color: #fff;
	border: 2px solid color-mix(in srgb, var(--c) 40%, #fff);
	box-shadow:
		0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent),
		0 0 12px color-mix(in srgb, var(--c) 70%, transparent),
		inset 0 0 12px color-mix(in srgb, var(--c) 45%, transparent);
	text-shadow: 0 0 10px color-mix(in srgb, var(--c) 80%, transparent);
}

.btn--tube:hover {
	box-shadow:
		0 0 0 1px var(--c),
		0 0 22px var(--c),
		0 0 60px color-mix(in srgb, var(--c) 50%, transparent),
		inset 0 0 18px color-mix(in srgb, var(--c) 60%, transparent);
}

.btn--solid {
	background: var(--text);
	color: var(--ink-900);
}

.btn--solid:hover {
	background: #fff;
	box-shadow: 0 10px 40px -10px rgba(255, 255, 255, .45);
}

.btn--ghost {
	border: 1px solid var(--line-2);
	color: var(--text);
}

.btn--ghost:hover {
	border-color: var(--text);
}

.btn--sm {
	padding: .7em 1.15em;
	font-size: .86rem;
}

/* Text link with a tube underline that lights on hover. */
.link {
	position: relative;
	padding-bottom: 3px;
}

.link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1.5px;
	border-radius: 2px;
	background: var(--line-2);
	transition: background-color .3s, box-shadow .3s;
}

.link:hover::after,
.link[aria-current="page"]::after {
	background: var(--n-pink);
	box-shadow: 0 0 6px var(--n-pink), 0 0 14px var(--n-pink);
}

/* 7. Physical controls ------------------------------------------------------
   Knob, fader and wall switch: the studio's hardware. Shared so the homepage,
   studio and style guide use the same pieces.
   -------------------------------------------------------------------------- */
.knob {
	--angle: 0deg;
	--size: 132px;
	position: relative;
	width: var(--size);
	height: var(--size);
	border-radius: 50%;
	touch-action: none;
	cursor: grab;
}

.knob:active {
	cursor: grabbing;
}

.knob__ticks {
	position: absolute;
	left: -18px;
	top: -18px;
	width: calc(100% + 36px);
	height: calc(100% + 36px);
	max-width: none;
	pointer-events: none;
}

.knob__dial {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background:
		radial-gradient(circle at 35% 28%, #4a4555 0%, #24212c 45%, #121018 100%);
	box-shadow:
		0 18px 30px -12px rgba(0, 0, 0, .9),
		inset 0 2px 1px rgba(255, 255, 255, .18),
		inset 0 -3px 6px rgba(0, 0, 0, .6);
	transform: rotate(var(--angle));
	transition: transform .35s var(--ease-snap);
}

.knob__dial::before {
	/* Knurled grip */
	content: "";
	position: absolute;
	inset: 8%;
	border-radius: 50%;
	background: repeating-conic-gradient(rgba(255, 255, 255, .06) 0 4deg, transparent 4deg 8deg);
	mask: radial-gradient(circle, transparent 62%, #000 63%);
}

.knob__dial::after {
	/* Pointer line, lit in the selected colour */
	content: "";
	position: absolute;
	left: 50%;
	top: 10%;
	width: 4px;
	height: 26%;
	margin-left: -2px;
	border-radius: 4px;
	background: var(--c, var(--n-pink));
	box-shadow: 0 0 6px var(--c, var(--n-pink)), 0 0 14px var(--c, var(--n-pink));
}

.knob.is-dragging .knob__dial {
	transition: none;
}

.fader {
	--v: .7;
	position: relative;
	width: 44px;
	height: 168px;
	touch-action: none;
}

.fader__track {
	position: absolute;
	left: 50%;
	top: 8px;
	bottom: 8px;
	width: 6px;
	margin-left: -3px;
	border-radius: 6px;
	background: #07060b;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .06);
}

.fader__fill {
	position: absolute;
	left: 50%;
	bottom: 8px;
	width: 6px;
	margin-left: -3px;
	height: calc((100% - 16px) * var(--v));
	border-radius: 6px;
	background: var(--c, var(--n-pink));
	box-shadow: 0 0 10px var(--c, var(--n-pink));
}

.fader__cap {
	position: absolute;
	left: 0;
	right: 0;
	height: 26px;
	bottom: calc(8px + (100% - 16px) * var(--v) - 13px);
	border-radius: 6px;
	background: linear-gradient(#57525f, #2a2631 48%, #1b1820 52%, #34303b);
	box-shadow: 0 8px 14px -6px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .25);
	cursor: grab;
}

.fader__cap::after {
	content: "";
	position: absolute;
	left: 18%;
	right: 18%;
	top: 50%;
	height: 2px;
	margin-top: -1px;
	background: rgba(255, 255, 255, .55);
}

/* Indian modular switch: white module, rocker with a red "on" marker,
   an indicator LED and printed ON/OFF, so its state reads at a glance. */
.switch {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 66px;
	height: 96px;
	border-radius: 8px;
	background: linear-gradient(160deg, #F8F5F0, #DED7CB);
	box-shadow: 0 14px 24px -10px rgba(0, 0, 0, .85), inset 0 1px 0 #fff, inset 0 -2px 3px rgba(0, 0, 0, .12);
}

.switch::before {
	/* Printed state */
	content: "OFF";
	position: absolute;
	top: 6px;
	left: 0;
	right: 0;
	text-align: center;
	font-family: var(--f-mono);
	font-size: 7.5px;
	font-weight: 500;
	letter-spacing: .14em;
	color: #8d867b;
}

.switch[aria-pressed="true"]::before {
	content: "ON";
	color: #C8232B;
}

.switch__rocker {
	position: relative;
	width: 34px;
	height: 52px;
	margin-top: 2px;
	border-radius: 5px;
	overflow: hidden;
	background: linear-gradient(#FFFFFF 0%, #EFEAE2 46%, #D5CDBF 54%, #F2EEE7 100%);
	box-shadow: 0 3px 5px rgba(0, 0, 0, .32), inset 0 1px 0 #fff;
	transform: perspective(140px) rotateX(20deg);
	transition: transform .2s var(--ease-snap), background .2s;
}

.switch__rocker::before {
	/* The red marker you only see when it is on */
	content: "";
	position: absolute;
	left: 6px;
	right: 6px;
	top: 6px;
	height: 8px;
	border-radius: 2px;
	background: #D7262E;
	opacity: 0;
	transition: opacity .12s;
}

.switch__rocker::after {
	/* The "O" printed on the off side */
	content: "";
	position: absolute;
	left: 50%;
	bottom: 7px;
	width: 9px;
	height: 9px;
	margin-left: -4.5px;
	border: 1.5px solid #a39a8c;
	border-radius: 50%;
}

.switch[aria-pressed="true"] .switch__rocker {
	transform: perspective(140px) rotateX(-20deg);
	background: linear-gradient(#D5CDBF 0%, #EFEAE2 46%, #FFFFFF 54%, #F7F3EC 100%);
}

.switch[aria-pressed="true"] .switch__rocker::before {
	opacity: 1;
}

.switch__led {
	position: absolute;
	bottom: 7px;
	left: 50%;
	width: 6px;
	height: 6px;
	margin-left: -3px;
	border-radius: 50%;
	background: #9a9387;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .3);
	transition: background-color .15s, box-shadow .15s;
}

.switch[aria-pressed="true"] .switch__led {
	background: #FF6A2A;
	box-shadow: 0 0 5px #FF6A2A, 0 0 12px rgba(255, 106, 42, .8);
}

/* Modular plate: a switch module beside a 3-pin socket module, as fitted in Indian homes. */
.modplate {
	display: inline-flex;
	gap: 4px;
	padding: 7px;
	border-radius: 10px;
	background: linear-gradient(160deg, #F8F5F0, #D9D1C3);
	box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .9), inset 0 1px 0 #fff, inset 0 -2px 3px rgba(0, 0, 0, .14);
}

.modplate .switch {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

/* ---------------------------------------------------------------------------
   Contour-cut acrylic and bead chains
   Real signs sit on acrylic cut to the outline of the letters. In SVG, a sign's
   tubes are cloned into .acrylic with a fat stroke; the #acrylic filter turns
   that silhouette into a clear sheet with a bright cut edge and a soft shadow.
   ------------------------------------------------------------------------- */
.acrylic {
	fill: #fff;
	stroke: #fff;
	stroke-width: 22;
	stroke-linejoin: round;
	stroke-linecap: round;
	filter: url(#acrylic);
}

/* HTML lettering on contour-cut acrylic: the same text, grown into a rounded
   silhouette and turned into a clear sheet by #acrylic-text, behind the tube. */
.tube--cut {
	isolation: isolate;
}

.tube--cut::before {
	content: attr(data-text);
	position: absolute;
	inset: 0;
	z-index: -1;
	color: #fff;
	-webkit-text-stroke: 0;
	text-shadow: none;
	white-space: nowrap;
	filter: url(#acrylic-text);
	pointer-events: none;
}

/* Bead chain, the way hanging signs are actually hung. */
/* --attach: where the eyelet sits, from the top of the hanging element (may be negative). */
.chain {
	position: absolute;
	top: calc(var(--attach, 0px) - var(--chain, 240px));
	width: 6px;
	height: var(--chain, 240px);
	margin-left: -3px;
	background:
		radial-gradient(circle at 50% 50%, #ece6da 0 1.3px, #9c9486 1.9px, transparent 2.3px) 50% 100% / 6px 5.4px repeat-y;
	filter: drop-shadow(2px 4px 2px rgba(0, 0, 0, .55));
	pointer-events: none;
}

.chain::after {
	/* Eyelet through the acrylic */
	content: "";
	position: absolute;
	left: 50%;
	bottom: -7px;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	border: 2px solid #d8d1c4;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

.swing {
	transform-origin: 50% -320px;
	animation: sway 7s ease-in-out infinite;
}

@keyframes sway {
	0%, 100% { transform: rotate(-.45deg); }
	50% { transform: rotate(.45deg); }
}

/* ---------------------------------------------------------------------------
   Commerce: product cards, prices, badges (home, shop, product)
   Media holds an <img> once WooCommerce photos exist; until then a .ph scene
   stands in so layouts can be judged.
   ------------------------------------------------------------------------- */
.pgrid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.6rem);
}

.pcard {
	position: relative;
	display: grid;
	gap: .75rem;
	align-content: start;
}

.pcard__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: var(--r-md);
	overflow: hidden;
	background: var(--ink-800);
	isolation: isolate;
}

.pcard__media img,
.pcard__media .ph {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.1s var(--ease-out);
}

.pcard:hover .pcard__media img,
.pcard:hover .pcard__media .ph {
	transform: scale(1.045);
}

/* Placeholder "photo": a wall, a lit sign, light on the wall. */
.ph {
	--c: var(--n-pink);
	--wall: #2a1c20;
	display: grid;
	place-items: center;
	background:
		radial-gradient(55% 40% at 50% 44%, color-mix(in srgb, var(--c) 42%, transparent), transparent 72%),
		linear-gradient(180deg, var(--wall), color-mix(in srgb, var(--wall) 40%, #050409));
}

.ph::after {
	/* the floor line and a vignette, so it reads as a room */
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, transparent 78%, rgba(0, 0, 0, .35) 78.4%, rgba(0, 0, 0, .55)),
		radial-gradient(90% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .5));
}

/* Lettering scales with the card it sits in, so it never overflows a narrow grid. */
.ph {
	container-type: inline-size;
}

.ph .tube {
	font-size: 11cqw;
	position: relative;
	z-index: 1;
}

.ph .tube--script {
	font-size: 14cqw;
}

.ph__note {
	position: absolute;
	right: 10px;
	bottom: 8px;
	z-index: 2;
	font-family: var(--f-mono);
	font-size: .58rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(243, 238, 247, .45);
}

.pcard__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 54px; /* keeps clear of the wishlist heart */
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.badge {
	display: inline-block;
	padding: .38em .7em;
	border-radius: 999px;
	background: var(--text);
	color: var(--ink-900);
	font-family: var(--f-mono);
	font-size: .62rem;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.badge--hot {
	background: var(--n-pink);
	color: #fff;
	box-shadow: 0 0 12px rgba(255, 46, 154, .6);
}

.badge--off {
	background: var(--n-lime);
}

.badge--line {
	background: rgba(8, 7, 13, .65);
	color: var(--text);
	border: 1px solid var(--line-2);
}

.pcard__fav {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(8, 7, 13, .6);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--text);
	transition: color .2s, transform .3s var(--ease-snap);
}

.pcard__fav svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

.pcard__fav[aria-pressed="true"] {
	color: var(--n-pink);
}

.pcard__fav[aria-pressed="true"] svg {
	fill: currentColor;
}

.pcard__fav:active {
	transform: scale(.88);
}

.pcard__quick {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	z-index: 2;
	transform: translateY(14px);
	opacity: 0;
	transition: transform .5s var(--ease-out), opacity .4s;
}

.pcard:hover .pcard__quick,
.pcard:focus-within .pcard__quick {
	transform: none;
	opacity: 1;
}

.pcard__quick .btn {
	width: 100%;
}

.pcard__name {
	font-family: var(--f-display);
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.15;
}

.pcard__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .6rem;
	font-size: .8rem;
	color: var(--muted);
}

.dots {
	display: inline-flex;
	gap: 4px;
}

.dots i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--d);
	box-shadow: 0 0 5px var(--d);
}

.price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: .5rem;
}

.price__now {
	font-weight: 700;
	font-size: 1.08rem;
	font-variant-numeric: tabular-nums;
}

.price__was {
	color: var(--muted);
	text-decoration: line-through;
	font-size: .9rem;
}

.price__off {
	font-family: var(--f-mono);
	font-size: .7rem;
	color: var(--n-lime);
	letter-spacing: .04em;
}

.pcard__add {
	display: none;
}

/* Touch screens have no hover: show a plain add button under the card. */
@media (hover: none) {
	.pcard__quick {
		display: none;
	}

	.pcard__add {
		display: inline-flex;
		justify-self: start;
	}
}

/* ---------------------------------------------------------------------------
   Sales helpers: floating WhatsApp, mobile action bar
   ------------------------------------------------------------------------- */
.fab {
	position: fixed;
	right: 20px;
	bottom: 22px;
	z-index: 70;
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .8em 1.1em .8em .9em;
	border-radius: 999px;
	background: #1fa855;
	color: #fff;
	font-weight: 600;
	font-size: .9rem;
	box-shadow: 0 14px 30px -10px rgba(31, 168, 85, .7), 0 0 0 1px rgba(255, 255, 255, .15) inset;
	transition: transform .4s var(--ease-snap);
}

.fab:hover {
	transform: translateY(-3px);
}

.fab svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.mbar {
	display: none;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 120;
	padding: .8em 1.25em;
	border-radius: 999px;
	background: var(--text);
	color: var(--ink-900);
	font-weight: 600;
	font-size: .9rem;
	box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .8);
	opacity: 0;
	transform: translate(-50%, 20px);
	transition: opacity .3s, transform .5s var(--ease-out);
	pointer-events: none;
}

.toast.is-in {
	opacity: 1;
	transform: translate(-50%, 0);
}

@media (max-width: 760px) {
	.fab {
		display: none;
	}

	.mbar {
		position: fixed;
		left: 10px;
		right: 10px;
		bottom: 10px;
		z-index: 70;
		display: grid;
		grid-template-columns: 1fr 1fr 1fr;
		gap: 6px;
		padding: 6px;
		border-radius: 18px;
		background: rgba(8, 7, 13, .86);
		border: 1px solid var(--line-2);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
	}

	.mbar a {
		display: grid;
		place-items: center;
		padding: .7em .4em;
		border-radius: 12px;
		font-size: .82rem;
		font-weight: 600;
	}

	.mbar a:first-child {
		background: var(--text);
		color: var(--ink-900);
	}

	.mbar a:last-child {
		background: #1fa855;
		color: #fff;
	}

	body {
		padding-bottom: 76px;
	}
}

/* 8. Reveal --------------------------------------------------------------- */
.js [data-reveal] {
	opacity: 0;
	transform: translate3d(0, 34px, 0);
	transition: opacity 1.1s var(--ease-out) var(--delay, 0ms), transform 1.1s var(--ease-out) var(--delay, 0ms);
}

.js [data-reveal].is-in {
	opacity: 1;
	transform: none;
}

/* Lines of a headline rise from behind a mask. */
/* The mask is padded (and pulled back with negative margins) so a glowing word's halo is not cut into a box. */
.rise {
	display: block;
	overflow: hidden;
	padding: .14em .4em .2em;
	margin: -.14em -.4em -.14em;
}

.rise > span {
	display: block;
	transform: translateY(105%);
	transition: transform 1.2s var(--ease-out) var(--delay, 0ms);
}

.rise.is-in > span,
.is-in .rise > span {
	transform: none;
}

.no-js .rise > span {
	transform: none;
}

/* 9. Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}

	.js [data-reveal],
	.rise > span {
		opacity: 1;
		transform: none;
	}

	.grain {
		display: none;
	}
}
