/* ============================================================================
   Dream To Reality — main.css
   Brand variables + reset + typography + utility classes used site-wide.
   Component-specific styles live in: home.css, competition.css, account.css, footer.css.
   ============================================================================ */

/* --- Self-hosted Google Fonts ------------------------------------------------ */
/* Files live in /assets/fonts/. If a weight is missing, we fall back gracefully. */

@font-face {
	font-family: 'Montserrat'; font-style: normal; font-weight: 400 800; font-display: swap;
	src: url('../fonts/montserrat-variable.woff2') format('woff2-variations'),
	     url('../fonts/montserrat-variable.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
	src: url('../fonts/inter-variable.woff2') format('woff2-variations'),
	     url('../fonts/inter-variable.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Brand tokens ----------------------------------------------------------- */

:root {
	--dtr-primary:      #124350;
	--dtr-primary-dark: #0d3340;
	--dtr-gold:         #E2A03A;
	--dtr-gold-dark:    #c08a2e;
	--dtr-teal:         #20859C;
	/* Darkened teal for TEXT contexts only — meets WCAG-AA 4.5:1 on white/cream
	 * backgrounds for small text. Decorative --dtr-teal is preserved unchanged
	 * for borders, accents, and gradient stops. */
	--dtr-teal-text:    #136274;
	/* Darkened gold for text contexts on light bg (testimonial __em etc.) —
	 * --dtr-gold and --dtr-gold-dark are reserved for backgrounds/accents
	 * where the contrast partner is dark. */
	--dtr-gold-text:    #8a6620;
	/* Darker green, AA-safe for white text (reserved accent — the original brand
	 * --dtr-green (#4AAF7C) fails ≥4.5:1 contrast for white text at small sizes). */
	--dtr-green-dark:   #1F6740;
	--dtr-cream:        #FDFAF2;
	--dtr-orange:       #F37422;
	--dtr-blue:         #5F74B8;
	--dtr-beige:        #F1D8A1;
	--dtr-green:        #4AAF7C;
	--dtr-red:          #d94c3a;
	--dtr-white:        #FFFFFF;
	--dtr-black:        #1a1a1a;
	--dtr-grey-100:     #f5f5f5;
	--dtr-grey-300:     #d1d1d1;
	--dtr-grey-600:     #6b6b6b;
	--dtr-grey-900:     #2a2a2a;

	--dtr-font-heading: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--dtr-font-body:    'Inter',      system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--dtr-radius-sm: 6px;
	--dtr-radius-md: 12px;
	--dtr-radius-lg: 20px;
	--dtr-radius-pill: 999px;

	--dtr-shadow-sm: 0 2px 8px  rgba(18, 67, 80, 0.08);
	--dtr-shadow-md: 0 8px 24px rgba(18, 67, 80, 0.12);
	--dtr-shadow-lg: 0 16px 48px rgba(18, 67, 80, 0.16);

	--dtr-container: 1280px;
	--dtr-gutter:    24px;
	--dtr-transition: 0.2s ease-in-out;
}

/* --- Reset (light) ---------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--dtr-font-body);
	font-size: 16px;
	line-height: 1.55;
	color: var(--dtr-grey-900);
	background: var(--dtr-cream);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--dtr-teal-text); text-decoration: none; transition: color var(--dtr-transition); }
a:hover, a:focus { color: var(--dtr-primary); }

/* --- Typography ------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--dtr-font-heading);
	font-weight: 700;
	color: var(--dtr-primary);
	margin: 0 0 0.5em;
	line-height: 1.2;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }
h4 { font-size: 1.125rem; }
.dtr-eyebrow {
	display: inline-block;
	font-family: var(--dtr-font-heading);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--dtr-teal-text);
	margin-bottom: 0.75rem;
}
.tabular-nums { font-variant-numeric: tabular-nums; }

/* --- Container utility ------------------------------------------------------ */

.dtr-container {
	width: 100%;
	max-width: var(--dtr-container);
	margin: 0 auto;
	padding-left: var(--dtr-gutter);
	padding-right: var(--dtr-gutter);
}

/* --- Buttons ---------------------------------------------------------------- */

.dtr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--dtr-font-heading);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	padding: 0.85rem 1.5rem;
	border-radius: var(--dtr-radius-md);
	border: 2px solid transparent;
	cursor: pointer;
	transition: background var(--dtr-transition), color var(--dtr-transition), border-color var(--dtr-transition), transform var(--dtr-transition);
	text-decoration: none;
	line-height: 1;
}
.dtr-btn:focus-visible { outline: 3px solid var(--dtr-gold); outline-offset: 2px; }
.dtr-btn--gold       { background: var(--dtr-gold); color: var(--dtr-primary); }
.dtr-btn--gold:hover { background: var(--dtr-gold-dark); color: var(--dtr-primary); transform: translateY(-1px); }
.dtr-btn--primary       { background: var(--dtr-primary); color: var(--dtr-white); }
.dtr-btn--primary:hover { background: var(--dtr-primary-dark); color: var(--dtr-white); transform: translateY(-1px); }
.dtr-btn--ghost       { background: transparent; color: var(--dtr-primary); border-color: var(--dtr-primary); }
.dtr-btn--ghost:hover { background: var(--dtr-primary); color: var(--dtr-white); }

/* --- Badges ----------------------------------------------------------------- */

.dtr-badge {
	display: inline-block;
	font-family: var(--dtr-font-heading);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: var(--dtr-radius-pill);
	color: var(--dtr-white);
}
.dtr-badge--ends-soon  { background: var(--dtr-orange); }
.dtr-badge--ends-today { background: var(--dtr-orange); }
.dtr-badge--featured   { background: var(--dtr-blue); }
.dtr-badge--hot        { background: var(--dtr-red); }
.dtr-badge--ended      { background: var(--dtr-grey-600); }
.dtr-badge--drawn      { background: var(--dtr-gold); color: var(--dtr-primary); }

/* --- Progress bar (sold %) -------------------------------------------------- */

.dtr-progress {
	width: 100%;
	height: 8px;
	background: var(--dtr-grey-100);
	border-radius: var(--dtr-radius-pill);
	overflow: hidden;
}
.dtr-progress__bar {
	height: 100%;
	background: linear-gradient(90deg, var(--dtr-teal), var(--dtr-gold));
	transition: width 0.4s ease-in-out;
}

/* --- Visually hidden (a11y) ------------------------------------------------- */

.dtr-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* --- Skip link (accessibility) --------------------------------------------- */

.dtr-skip-link {
	position: absolute; top: -40px; left: 8px;
	background: var(--dtr-primary); color: var(--dtr-white);
	padding: 8px 16px; border-radius: var(--dtr-radius-sm);
	z-index: 100; transition: top 0.2s;
}
.dtr-skip-link:focus { top: 8px; color: var(--dtr-white); }

/* --- Reduced motion --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* --- Cart reservation badge (rendered on cart + checkout per line) --------- */

.dtr-reservation {
	display: inline-block;
	margin-top: 6px;
	padding: 4px 10px;
	background: #FDF6E3;
	border: 1px solid #E2A03A;
	border-radius: 999px;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: var(--dtr-primary-dark);
}
.dtr-reservation__time {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	margin-left: 4px;
}
.dtr-reservation--expired {
	background: #FBEAEA;
	border-color: #C2410C;
	color: #8B1A1A;
}
