/* HealthSphere x UltraPeak: waitlist + thank-you
   Brand: Mineral Teal #5E8182 / Herbal Sand #BAA371 / Pure Ash #EEF0F1 / Carbon Black #050606
   Flavour colours are taken from the four UltraPeak logo variants. */

:root {
	--ash: #eef0f1;
	--teal: #5e8182;
	--teal-deep: #3f5d5e;
	--sand: #baa371;
	--carbon: #050606;
	--text-soft: #3a4142;
	--muted: #5a6263;
	--line: rgba(5, 6, 6, .24);
	--error: #b3261e;

	/* active flavour (changed by JS) */
	--fl: #f47522;
	--fl-ink: #d1520b;
}

.hsw-shell[data-flavour="1"] { --fl: #6c56a4; --fl-ink: #5a4693; }
.hsw-shell[data-flavour="2"] { --fl: #f5a81d; --fl-ink: #b87100; }
.hsw-shell[data-flavour="3"] { --fl: #8fb23a; --fl-ink: #587f22; }

/* ---- base (scoped, beats theme styles) ---- */
html.hsw { margin: 0; background: var(--ash); -webkit-text-size-adjust: 100%; }
body.hsw-body {
	margin: 0;
	background: var(--ash);
	color: var(--carbon);
	font-family: "Urbanist", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
.hsw-shell, .hsw-shell * { box-sizing: border-box; }
.hsw-shell img { display: block; max-width: none; height: auto; }

.hsw-shell {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	padding: clamp(20px, 3vw, 40px) clamp(22px, 5.5vw, 84px) clamp(18px, 2.4vw, 30px);
}

/* ---- header ---- */
.hsw-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hsw-shell img.hsw-hs { height: clamp(44px, 5vw, 64px); width: auto; }
.hsw-up { position: relative; display: block; width: clamp(118px, 13vw, 172px); aspect-ratio: 4 / 1; }
.hsw-up img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: contain; object-position: right center;
	opacity: 0; transition: opacity 1s ease;
}
.hsw-up img.is-on { opacity: 1; }

/* ---- layout ---- */
.hsw-main {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	align-items: center;
	gap: clamp(32px, 6vw, 100px);
	padding: clamp(24px, 4vh, 56px) 0;
}
.hsw-copy { max-width: 620px; }

.hsw-eyebrow {
	display: inline-flex; align-items: center; gap: 12px;
	margin: 0 0 22px;
	font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
	color: var(--teal-deep);
}
.hsw-eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--sand); }
.hsw-eyebrow--tick::before { display: none; }
.hsw-eyebrow--tick svg {
	width: 28px; height: 28px; padding: 6px; border-radius: 50%;
	background: var(--sand); color: var(--carbon);
}

.hsw-copy h1 {
	margin: 0;
	font-size: clamp(2.3rem, 4.7vw, 4.25rem);
	font-weight: 700;
	line-height: 1.03;
	letter-spacing: -.028em;
	color: var(--carbon);
	text-wrap: balance;
}
.hsw-copy h1 em { font-style: normal; color: var(--fl-ink); transition: color .9s ease; }

.hsw-sub {
	margin: 22px 0 0;
	max-width: 33em;
	font-size: clamp(1.05rem, 1.35vw, 1.22rem);
	line-height: 1.55;
	font-weight: 500;
	color: var(--text-soft);
}

/* ---- form ---- */
.hsw-form {
	margin-top: clamp(28px, 4vh, 44px);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 28px;
}
.hsw-wide { grid-column: 1 / -1; }
.hsw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.hsw-field label {
	display: block;
	font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	color: var(--muted);
}
.hsw-control {
	display: flex; align-items: center;
	border-bottom: 1px solid var(--line);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.hsw-control:focus-within { border-color: var(--fl-ink); box-shadow: 0 1px 0 var(--fl-ink); }
.hsw-field.has-error .hsw-control { border-color: var(--error); box-shadow: 0 1px 0 var(--error); }

.hsw-form input[type="text"],
.hsw-form input[type="email"],
.hsw-form input[type="tel"] {
	flex: 1; min-width: 0; width: 100%;
	margin: 0; padding: 9px 0 11px;
	border: 0; border-radius: 0; outline: 0; box-shadow: none;
	background: transparent;
	font: 600 1.14rem/1.25 "Urbanist", "Avenir Next", "Segoe UI", system-ui, sans-serif;
	color: var(--carbon);
}
.hsw-form input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 1000px var(--ash) inset;
	-webkit-text-fill-color: var(--carbon);
}
.hsw-cc {
	padding: 0 12px 2px 0; margin-right: 12px;
	border-right: 1px solid var(--line);
	font-weight: 700; font-size: 1.05rem; color: var(--text-soft);
}
.hsw-err {
	margin: 0; min-height: 1.5em; padding-top: 4px;
	font-size: .82rem; font-weight: 600; color: var(--error);
}

.hsw-btn {
	display: flex; align-items: center; justify-content: space-between; gap: 18px;
	width: 100%;
	margin: 14px 0 0; padding: 9px 9px 9px 30px;
	border: 0; border-radius: 999px;
	background: var(--carbon); color: var(--ash);
	font: 800 .9rem/1 "Urbanist", "Avenir Next", "Segoe UI", system-ui, sans-serif;
	letter-spacing: .12em;
	cursor: pointer;
	transition: background .25s ease, transform .2s ease;
}
.hsw-btn-icon {
	display: grid; place-items: center;
	width: 46px; height: 46px; border-radius: 50%;
	background: var(--sand); color: var(--carbon);
	transition: transform .3s cubic-bezier(.2, .7, .2, 1), background .25s ease;
}
.hsw-btn:hover { background: var(--teal-deep); }
.hsw-btn:hover .hsw-btn-icon { transform: translateX(3px); }
.hsw-btn:focus-visible { outline: 2px solid var(--fl-ink); outline-offset: 3px; }
.hsw-btn[disabled] { opacity: .65; cursor: progress; }

.hsw-status { margin: 10px 0 0; min-height: 1.4em; font-size: .9rem; font-weight: 600; color: var(--error); }
.hsw-fine { margin: 4px 0 0; font-size: .8rem; color: var(--muted); }

/* ---- art: four flavour circles, layered like cut paper ---- */
.hsw-art { display: flex; flex-direction: column; align-items: center; gap: clamp(26px, 4vh, 44px); }

.hsw-sphere { position: relative; width: min(100%, 500px); aspect-ratio: 1; }
.hsw-orbit { position: absolute; inset: 0; animation: hsw-spin 110s linear infinite; }

.disc {
	position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%;
	opacity: .93;
	box-shadow: 0 0 0 2px var(--ash);
	transition: scale 1.1s cubic-bezier(.2, .7, .2, 1);
}
.d-orange { left: 0;  top: 0;    background: #f47522; --dx: 7%;  --dy: 7%;  --t: 9s;  --gx: -40%; --gy: -40%; }
.d-mango  { right: 0; top: 0;    background: #f5a81d; --dx: -7%; --dy: 7%;  --t: 11s; --gx: 40%;  --gy: -40%; }
.d-berry  { left: 0;  bottom: 0; background: #6c56a4; --dx: 7%;  --dy: -7%; --t: 12s; --gx: -40%; --gy: 40%; }
.d-mint   { right: 0; bottom: 0; background: #9dbe3b; --dx: -7%; --dy: -7%; --t: 10s; --gx: 40%;  --gy: 40%; }
.disc { animation: hsw-drift var(--t) ease-in-out infinite alternate; }

.hsw-shell[data-flavour="0"] .d-orange,
.hsw-shell[data-flavour="1"] .d-berry,
.hsw-shell[data-flavour="2"] .d-mango,
.hsw-shell[data-flavour="3"] .d-mint { scale: 1.09; }

/* thin ring + one tiny sand dot travelling around it */
.hsw-ring { position: absolute; inset: -7%; border: 1px solid rgba(5, 6, 6, .16); border-radius: 50%; animation: hsw-spin 40s linear infinite; }
.hsw-ring i {
	position: absolute; left: 50%; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px;
	border-radius: 50%; background: var(--sand);
}

.hsw-flavours {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
	margin: 0; padding: 0; list-style: none;
}
.hsw-flavours li {
	display: inline-flex; align-items: center; gap: 9px;
	font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: var(--muted); opacity: .6;
	transition: opacity .6s ease, color .6s ease;
}
.hsw-flavours li.is-on { opacity: 1; color: var(--carbon); }
.hsw-flavours i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.hsw-flavours .f-orange i { background: #f47522; }
.hsw-flavours .f-berry i  { background: #6c56a4; }
.hsw-flavours .f-mango i  { background: #f5a81d; }
.hsw-flavours .f-mint i   { background: #8fb23a; }

/* thank-you: the circles glide together once */
.hsw-thanks .disc {
	animation: hsw-gather 1.9s cubic-bezier(.2, .8, .2, 1) both, hsw-drift var(--t) 1.9s ease-in-out infinite alternate;
}

/* ---- footer ---- */
.hsw-foot {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
	font-size: .8rem; font-weight: 500; color: var(--muted);
}

/* ---- motion ---- */
@keyframes hsw-spin   { to { transform: rotate(360deg); } }
@keyframes hsw-drift  { from { translate: 0 0; } to { translate: var(--dx) var(--dy); } }
@keyframes hsw-gather { from { transform: translate(var(--gx), var(--gy)) scale(.55); opacity: 0; } to { transform: none; opacity: .93; } }

@media (prefers-reduced-motion: reduce) {
	.hsw-orbit, .hsw-ring, .disc, .hsw-thanks .disc { animation: none !important; }
	.hsw-up img, .hsw-copy h1 em, .hsw-flavours li, .disc { transition: none; }
}

/* ---- tablet / phone ---- */
@media (max-width: 900px) {
	.hsw-main { grid-template-columns: 1fr; gap: 34px; padding-top: 36px; }
	.hsw-art { order: -1; gap: 20px; }
	.hsw-sphere { width: min(54vw, 230px); }
	.hsw-copy { max-width: none; }
}
@media (max-width: 560px) {
	.hsw-form { grid-template-columns: 1fr; }
	.hsw-btn { padding-left: 24px; letter-spacing: .1em; }
	.hsw-flavours { gap: 8px 16px; }
	.hsw-flavours li { font-size: .68rem; }
	.hsw-foot { flex-direction: column; }
}
