/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 :root {
	--paper: #f6f1e7;
	--ink: #1b1b1b;
	--muted: #5d5d5d;
 }

 * {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
 }

 body {
	font-family: 'Fredoka', sans-serif;
	color: var(--ink);
	background-color: var(--paper);
 }

 .container {
	width: min(1400px, 92vw);
	margin: auto;
 }

 .site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(246, 241, 231, .92);
	backdrop-filter: blur(10px);
 }

 .header-inner {
	width: min(1400px, 92vw);
	margin: auto;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
 }

 .brand {
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.04em;
 }

 .nav {
	display: flex;
	align-items: center;
	gap: 2rem;
 }

 .nav a {
	border-bottom: 2px solid currentColor;
 }

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

 .hero {
	min-height: 90vh;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: center;
 }

 .hero-copy h1 {
	font-size: clamp(5rem, 11vw, 11rem);
	line-height: .88;
	letter-spacing: -0.07em;
	font-weight: 600;
 }

 .hero-copy p {
	margin-top: 2rem;
	font-size: 1.4rem;
	color: var(--muted);
 }

 .hero-copy a {
	display: inline-block;
	margin-top: 3rem;
	text-decoration: none;
	color: var(--ink);
	font-size: 1.1rem;
	border-bottom: 2px solid currentColor;
 }

 .program-builder {
    display: grid;
	grid-template-columns: minmax(0, 650px) 1fr;
	gap: 6rem;
	align-items: center;
	margin: 4rem 0 6rem;
 }

 .builder-card {
	background: rgba(255, 255, 255, .75);
	backdrop-filter: blur(12px);

	border: 1px solid rgba(0, 0, 0, .06);
	border-radius: 32px;

	padding: 3rem;

	box-shadow:
		0 20px 60px rgba(0, 0, 0, .04),
		0 4px 12px rgba(0, 0, 0, .03);
 }

 .builder-card p {
	color: var(--muted);
	margin-bottom: 2.5rem;
 }

 .wallet-area {
	display: flex;
	justify-content: center;
	align-items: center;
 }

 .page {
	max-width: 760px;
	margin: 4rem auto 6rem;
	background: rgba(255, 255, 255, .55);
	border: 1px solid rgba(0, 0, 0, .06);
	border-radius: 32px;
	padding: 3.5rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .04);
 }

 .builder-card h1,
 .page-title {
	font-size: clamp(2.8rem, 6vw, 4rem);
	line-height: .95;
	letter-spacing: -0.05em;
	font-weight: 600;
	margin-bottom: 2rem;
 }

 .page-content {
	font-size: 1.2rem;
	color: var(--muted);
	line-height: 1.6;
 }

 .page-content p+p {
	margin-top: 1.25rem;
 }

 .page-content a {
	border-bottom: 2px solid currentColor;
	word-break: break-word;
	/* Legacy support */
	overflow-wrap: break-word;
 }

 .page-section {
	margin-top: 3rem;
 }

 .page-section h2 {
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--ink);
	margin-bottom: 1rem;
 }

 .danger-link {
	color: #8b2c2c;
 }

 .form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 2rem;
 }

 .form-label {
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--ink);
 }

 .form-input {
	font-family: 'Fredoka', sans-serif;
	font-size: 1.1rem;
	color: var(--ink);
	background: #ffffff;
	border: 2px solid var(--ink);
	border-radius: 12px;
	padding: 0.8rem 1.2rem;
	width: 100%;
	outline: none;
	transition: box-shadow 0.15s ease;
 }

 .form-input::placeholder {
	color: #b5b0a5;
 }

 .form-input:focus {
	box-shadow: 4px 4px 0px var(--ink);
 }

 .btn-row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 2rem;
 }

 .btn {
	font-family: 'Fredoka', sans-serif;
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: var(--ink);
	background: transparent;
	border: 2px solid var(--ink);
	border-radius: 12px;
	padding: 0.8rem 2rem;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	width: 100%;
 }

 .btn:not(:disabled):hover {
	background: var(--ink);
	color: var(--paper);
 }

 .btn:not(:disabled):active {
	opacity: 0.75;
 }

 .btn:disabled {
	opacity: 0.2;
	cursor: not-allowed;
 }

 .btn-danger {
	color: #9b2c2c;
	border-color: #9b2c2c;
 }

 .btn-danger:hover {
	background: #9b2c2c;
	color: var(--paper);
 }

 .toast-container {
	position: fixed;
	top: calc(72px + 1rem);
	right: 2rem;
	z-index: 90;
	pointer-events: none;
 }

 .toast {
	background: #ffffff;
	color: var(--ink);
	padding: 1rem 1.5rem;
	border: 2px solid var(--ink);
	border-radius: 16px;
	box-shadow: 6px 6px 0px rgba(27, 27, 27, 0.1);
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 500;

	animation: flash-toast-cycle 4s ease-in-out forwards;
 }

 .toast-icon {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid var(--ink);
	flex-shrink: 0;
 }

 .toast-notice .toast-icon {
	background: #3e6b4d;
 }

 .toast-alert .toast-icon {
	background: #9b2c2c;
 }

 @keyframes flash-toast-cycle {
	0% {
		transform: translateY(-20px);
		opacity: 0;
	}

	10% {
		transform: translateY(0);
		opacity: 1;
	}

	90% {
		transform: translateY(0);
		opacity: 1;
	}

	100% {
		transform: translateY(-20px);
		opacity: 0;
		visibility: hidden;
	}
 }

 .dashboard-qr-wrap {
	float: right;
	margin: 0.5rem 0 1.5rem 1.5rem;
 }

 .dashboard-qr-wrap img {
	display: block;
	border: 2px solid var(--ink);
	border-radius: 12px;
	padding: 6px;
	background: white;
	box-shadow: 4px 4px 0px rgba(27, 27, 27, 0.05);
 }

 .clear-stats-flow {
	clear: both;
 }

 .health-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	margin: 2.5rem 0 3.5rem 0;
 }

 .health-label,
 .stat-label {
	text-transform: uppercase;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--muted);
 }

 .health-num,
 .stat-num {
	font-size: clamp(3.5rem, 7vw, 5rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.05em;
	color: var(--ink);
	margin: 0.25rem 0;
 }

 .stat-num.small {
	font-size: clamp(2.5rem, 5vw, 3.2rem);
 }

 .health-sub,
 .stat-sub {
	font-size: 1.05rem;
	color: var(--muted);
	line-height: 1.3;
 }

 .health-caption {
	font-size: 0.95rem;
	color: var(--muted);
	margin-top: 0.5rem;
 }

 .health-caption b {
	color: var(--ink);
 }

 .bar-wrap {
	width: 100%;
	height: 8px;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 4px;
	margin-top: 0.75rem;
	overflow: hidden;
 }

 .bar-fill {
	height: 100%;
	background: var(--ink);
	border-radius: 4px;
 }

 .secondary-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	padding-top: 2.5rem;
	margin-top: 2.5rem;
 }

 .swatch-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 0.5rem;
 }

 .swatch {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid transparent;
	transition: transform 0.1s, border-color 0.1s;
	flex-shrink: 0;
 }

 .swatch:hover {
	transform: scale(1.12);
 }

 .swatch.active {
	border-color: var(--color, #111);
	outline: 2px solid var(--color, #111);
	outline-offset: 2px;
 }

 .swatch-custom {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px dashed #aaa;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	position: relative;
	overflow: hidden;
	color: #aaa;
	cursor: pointer;
 }

 .swatch-custom input[type=color] {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
 }

 @media (max-width: 900px) {
	.hero {
		grid-template-columns: 1fr;
		padding: 5rem 0;
	}

	.page {
		margin: 2rem auto 4rem;
		padding: 2rem;
		border-radius: 24px;
	}

    .program-builder {
        grid-template-columns: 1fr;
		gap: 3rem;
		margin: 2rem 0 4rem;
    }

    .builder-card {
        padding: 1.5rem;
    }

	.health-row,
	.secondary-grid {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.dashboard-qr-wrap {
		display: block;
		width: fit-content;
		margin: 0 auto 2rem;
	}

	.pass {
		transform: none;
	}
 }
