@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
	--ink: #192b38;
	--muted: #78909b;
	--paper: #f2f8f6;
	--card: #ffffff;
	--line: #e3eeea;
	--mint: #dff4e8;
	--green: #1f8a5b;
	--green-dark: #176b47;
	--shadow: 0 24px 70px rgba(34, 92, 66, 0.13), 0 3px 12px rgba(34, 92, 66, 0.05);
}

* {
	box-sizing: border-box;
}

body {
	position: relative;
	min-width: 320px;
	min-height: 100vh;
	margin: 0;
	color: var(--ink);
	background: linear-gradient(135deg, #f8fdf9 0%, #edf7f3 22%, #eaf2ff 100%);
	font-family: 'Manrope', sans-serif;
	overflow-x: hidden;
}

body::before,
body::after {
	position: fixed;
	content: '';
	border-radius: 50%;
	filter: blur(28px);
	opacity: 0.55;
	z-index: 0;
	animation: floatBlob 14s ease-in-out infinite alternate;
}

body::before {
	bottom: -80px;
	left: -60px;
	width: 280px;
	height: 280px;
	background: rgba(118, 216, 174, 0.28);
}

body::after {
	top: -70px;
	right: -70px;
	width: 320px;
	height: 320px;
	background: rgba(117, 164, 255, 0.18);
	animation-delay: 1.2s;
}

button,
input {
	font: inherit;
}

.app-shell {
	display: grid;
	min-height: 100vh;
	place-items: center;
	padding: 32px 20px;
	position: relative;
	z-index: 1;
}

.experience-layout {
	display: grid;
	width: min(100%, 1040px);
	grid-template-columns: minmax(340px, 500px) minmax(320px, 1fr);
	align-items: stretch;
	gap: 54px;
	animation: fadeUp 0.8s ease;
}

.imt-card {
	display: block;
	width: 100%;
	height: 100%;
	padding: 30px;
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: 28px;
	background: rgba(255, 255, 255, 0.86);
	backdrop-filter: blur(8px);
	box-shadow: var(--shadow);
	animation: fadeUp 0.8s ease 0.1s both;
}

.app-header {
	display: flex;
	align-items: center;
	gap: 13px;
}

.brand-icon {
	display: grid;
	width: 46px;
	height: 46px;
	grid-template-columns: repeat(2, 7px);
	grid-template-rows: repeat(2, 7px);
	place-content: center;
	gap: 4px;
	border-radius: 14px;
	background: var(--green);
	box-shadow: 0 8px 16px rgba(31, 138, 91, 0.2);
}

.brand-icon span {
	border-radius: 2px;
	background: #fff;
}

.eyebrow {
	margin: 0 0 2px;
	color: var(--muted);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

h1,
h2,
p {
	margin-top: 0;
}

h1 {
	margin-bottom: 0;
	font-size: 21px;
	line-height: 1;
}

.pulse-dot {
	position: relative;
	width: 10px;
	height: 10px;
	margin-left: auto;
	border-radius: 50%;
	background: #54bf80;
	box-shadow: 0 0 0 6px #e4f7ec;
	animation: spinDot 2.8s linear infinite;
}

.pulse-dot::before {
	position: absolute;
	inset: -7px;
	border: 1px solid rgba(84, 191, 128, 0.45);
	border-radius: 50%;
	content: '';
	animation: spinDot 2.8s linear infinite reverse;
}

.intro {
	margin: 34px 0 24px;
}

.intro h2 {
	margin-bottom: 7px;
	font-size: 25px;
	letter-spacing: -0.04em;
}

.intro p {
	max-width: 370px;
	margin-bottom: 0;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.6;
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.field > span {
	display: block;
	margin-bottom: 8px;
	color: #49606b;
	font-size: 12px;
	font-weight: 700;
}

.input-wrap {
	display: flex;
	align-items: center;
	height: 56px;
	padding: 0 15px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fbfdfc;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-wrap:focus-within {
	border-color: var(--green);
	box-shadow: 0 0 0 4px rgba(31, 138, 91, 0.12);
}

input {
	width: 100%;
	min-width: 0;
	border: 0;
	outline: 0;
	color: var(--ink);
	background: transparent;
	font-family: 'DM Mono', monospace;
	font-size: 20px;
}

input::placeholder {
	color: #b5c4c4;
}

.input-wrap strong {
	color: var(--muted);
	font-size: 12px;
}

.error-message {
	min-height: 18px;
	margin: 8px 0 0;
	color: #c05a4c;
	font-size: 11px;
}

.calculate-button {
	display: flex;
	width: 100%;
	min-height: 56px;
	align-items: center;
	justify-content: space-between;
	padding: 0 18px 0 21px;
	border: 0;
	border-radius: 14px;
	color: #fff;
	background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
	box-shadow: 0 9px 16px rgba(31, 138, 91, 0.2);
	cursor: pointer;
	font-size: 14px;
	font-weight: 800;
	transition: background 150ms ease, transform 150ms ease, box-shadow 180ms ease;
}

.calculate-button:hover {
	background: linear-gradient(135deg, var(--green-dark) 0%, #15563c 100%);
	transform: translateY(-1px);
	box-shadow: 0 14px 22px rgba(31, 138, 91, 0.25);
}

.calculate-button:active {
	transform: scale(0.98);
}

.calculate-button:focus-visible {
	outline: 3px solid rgba(31, 138, 91, 0.3);
	outline-offset: 3px;
}

.calculate-button span:last-child {
	font-size: 23px;
	font-weight: 400;
}

.result-panel {
	margin-top: 25px;
	padding: 20px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: #f9fcfa;
}

.result-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--muted);
	font-size: 11px;
	font-weight: 700;
}

.result-badge {
	padding: 5px 9px;
	border-radius: 999px;
	color: var(--green-dark);
	background: var(--mint);
	font-size: 10px;
	font-weight: 800;
}

.result-main {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-top: 12px;
}

.result-main strong {
	font-family: 'DM Mono', monospace;
	font-size: 42px;
	font-weight: 500;
	letter-spacing: -0.06em;
}

.result-main span {
	color: var(--muted);
	font-size: 12px;
}

.result-description {
	min-height: 19px;
	margin: 5px 0 18px;
	color: #50656c;
	font-size: 12px;
	line-height: 1.5;
}

.scale-bar {
	position: relative;
	display: flex;
	height: 7px;
	gap: 3px;
}

.scale-bar span {
	display: block;
	border-radius: 99px;
}

.scale-bar > [data-scale-category] {
	opacity: 0.45;
	transition: opacity 180ms ease, filter 180ms ease;
}

.scale-bar > [data-scale-category].is-active {
	opacity: 1;
	filter: saturate(1.2);
}

.scale-marker {
	position: absolute;
	top: 50%;
	display: block;
	width: 13px;
	height: 13px;
	transform: translate(-50%, -50%);
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 5px rgba(25, 43, 56, 0.3);
	opacity: 0;
	transition: left 350ms ease, opacity 180ms ease;
}

.scale-bar.has-result .scale-marker {
	opacity: 1;
}

.scale-low {
	width: 25%;
	background: #f3c66b;
}

.scale-ideal {
	width: 25%;
	background: #58bd80;
}

.scale-high {
	width: 25%;
	background: #f0a35c;
}

.scale-obese {
	width: 25%;
	background: #e5786b;
}

.scale-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 7px;
	color: var(--muted);
	font-size: 9px;
}

.card-footer {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
}

.info-icon {
	display: grid;
	width: 16px;
	height: 16px;
	place-items: center;
	border: 1px solid #a8bbb5;
	border-radius: 50%;
	color: #849b94;
	font-family: Georgia, serif;
	font-size: 11px;
	font-weight: 700;
}

.card-footer p {
	margin: 0;
	color: #91a09e;
	font-size: 10px;
}

.visual-panel {
	position: relative;
	height: 100%;
	min-height: 570px;
	padding: 42px 38px 34px;
	overflow: hidden;
	border-radius: 30px;
	color: #f5fffa;
	background: linear-gradient(145deg, #237d55 0%, #176b47 100%);
	box-shadow: 0 24px 60px rgba(34, 92, 66, 0.2);
	animation: fadeUp 0.9s ease 0.2s both;
}

.visual-panel::before {
	position: absolute;
	top: -90px;
	right: -80px;
	width: 250px;
	height: 250px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 50%;
	box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.035), 0 0 0 45px rgba(255, 255, 255, 0.025);
	content: '';
	transform-origin: center;
	animation: slowOrbit 22s linear infinite;
}

.visual-copy {
	position: relative;
	z-index: 1;
}

.visual-copy .eyebrow {
	color: rgba(241, 255, 247, 0.64);
}

.visual-copy h2 {
	max-width: 310px;
	margin: 10px 0 12px;
	font-size: 31px;
	line-height: 1.08;
	letter-spacing: -0.05em;
}

.visual-copy > p:last-child {
	max-width: 320px;
	margin-bottom: 0;
	color: rgba(241, 255, 247, 0.72);
	font-size: 13px;
	line-height: 1.65;
}

.health-illustration {
	position: relative;
	height: 218px;
	margin: 16px 0 8px;
}

.illustration-ring {
	position: absolute;
	top: 10px;
	left: 50%;
	width: 190px;
	height: 190px;
	transform: translateX(-50%);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.06), 0 0 0 42px rgba(255, 255, 255, 0.035);
	animation: ringPulse 5s ease-in-out infinite;
}

.body-figure {
	position: absolute;
	bottom: 5px;
	left: 50%;
	width: 112px;
	height: 190px;
	transform: translateX(-50%);
	animation: bodyShift 2.8s ease-in-out infinite alternate;
}

.figure-head,
.figure-torso,
.figure-arm,
.figure-leg {
	position: absolute;
	display: block;
	background: #dff4e8;
}

.figure-head {
	top: 0;
	left: 43px;
	width: 27px;
	height: 27px;
	border-radius: 50%;
}

.figure-torso {
	top: 32px;
	left: 37px;
	width: 39px;
	height: 72px;
	border-radius: 18px 18px 12px 12px;
}

.figure-arm {
	top: 38px;
	width: 12px;
	height: 74px;
	border-radius: 10px;
	transform-origin: top center;
}

.figure-arm--left {
	left: 29px;
	transform: rotate(12deg);
}

.figure-arm--right {
	right: 29px;
	transform: rotate(-12deg);
}

.figure-leg {
	top: 96px;
	width: 14px;
	height: 91px;
	border-radius: 0 0 10px 10px;
	transform-origin: top center;
}

.figure-leg--left {
	left: 40px;
	transform: rotate(3deg);
}

.figure-leg--right {
	right: 40px;
	transform: rotate(-3deg);
}

.orbit-dot {
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #f3c66b;
	animation: orbitFloat 4s ease-in-out infinite;
}

.orbit-dot--one {
	top: 54px;
	left: 22%;
}

.orbit-dot--two {
	right: 21%;
	bottom: 35px;
	width: 6px;
	height: 6px;
	background: #8bd3a5;
	animation-delay: 1.5s;
}

.visual-scale {
	position: relative;
	z-index: 1;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.visual-scale__header,
.visual-scale__row {
	display: grid;
	grid-template-columns: 10px 1fr auto;
	align-items: center;
	gap: 9px;
}

.visual-scale__header {
	grid-template-columns: 1fr auto;
	margin-bottom: 10px;
	color: rgba(241, 255, 247, 0.58);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.visual-scale__row {
	padding: 7px 0;
	color: rgba(241, 255, 247, 0.78);
	font-size: 11px;
}

.visual-scale__row strong {
	color: #f5fffa;
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	font-weight: 400;
}

.scale-swatch {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.scale-swatch--low {
	background: #f3c66b;
}

.scale-swatch--ideal {
	background: #8bd3a5;
}

.scale-swatch--high {
	background: #f0a35c;
}

.scale-swatch--obese {
	background: #e5786b;
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes floatBlob {
	0% {
		transform: translate3d(0, 0, 0) scale(1);
	}
	100% {
		transform: translate3d(24px, -18px, 0) scale(1.08);
	}
}

@keyframes slowOrbit {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@keyframes ringPulse {
	0%,
	100% {
		transform: translateX(-50%) scale(1);
		opacity: 0.72;
	}
	50% {
		transform: translateX(-50%) scale(1.06);
		opacity: 1;
	}
}

@keyframes orbitFloat {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}
	50% {
		transform: translate(8px, -12px) scale(1.25);
	}
}

@keyframes bodyShift {
	0% {
		transform: translateX(-50%) translateY(8px) rotate(-2deg);
	}
	50% {
		transform: translateX(-50%) translateY(0) rotate(0deg);
	}
	100% {
		transform: translateX(-50%) translateY(-8px) rotate(2deg);
	}
}

@keyframes spinDot {
	0% {
		transform: rotate(0deg) scale(1);
	}
	50% {
		transform: rotate(180deg) scale(1.12);
	}
	100% {
		transform: rotate(360deg) scale(1);
	}
}

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

@media (max-width: 480px) {
	.app-shell {
		padding: 16px 12px;
	}

	.imt-card {
		display: block;
		width: 100%;
		padding: 22px 18px;
		border-radius: 23px;
	}

	.intro {
		margin-top: 28px;
	}

	.visual-panel {
		min-height: auto;
		margin-top: 18px;
		padding: 30px 24px;
	}

	.visual-copy h2 {
		font-size: 27px;
	}
}

@media (max-width: 360px) {
	.form-grid {
		grid-template-columns: 1fr;
	}

	.intro h2 {
		font-size: 22px;
	}
}
