/* === Design Tokens ======================================================= */
:root{
  /* Palette */
  --red-600: #e11d48; /* primary red */
  --red-500: #f43f5e;
  --bg-0: #0a0a0a;   /* deep background for contrast */
  --bg-1: #111214;
  --white: #ffffff;

  /* Text */
  --text: #ffffff;
  --muted: #cbd5e1;

  /* Effects */
  --glass: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.20);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);

  /* Radii & spacing */
  --radius-xl: 20px;
  --pad-6: 1.5rem;
  --pad-8: 2rem;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Motion */
  --duration-1: 900ms;
  --duration-2: 1600ms;
  --easing: cubic-bezier(.22,.61,.36,1);

  /* Layout */
  --maxw: 72rem;
}

/* Reduced motion: disable heavy animations while keeping layout intact */
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; }
}

/* === Base Reset ========================================================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link{
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus{
  left: 1rem; top: 1rem; width: auto; height: auto; z-index: 9999;
  padding: .5rem .75rem; background: var(--white); color: #111; border-radius: .5rem;
}

/* === Hero Layout ========================================================= */
.hero{
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(1.25rem, 2vw, 2rem);
}

/* Background layers */
.bg{
  position: absolute; inset: -20%;
  z-index: -2;
}

.fx-gradient{
  background:
    radial-gradient(50% 50% at 15% 15%, rgba(225,29,72,.35) 0%, transparent 60%),
    radial-gradient(40% 40% at 80% 20%, rgba(244,63,94,.25) 0%, transparent 60%),
    radial-gradient(60% 60% at 50% 90%, rgba(255,255,255,.06) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  filter: saturate(120%);
  animation: bgShift 18s var(--easing) infinite alternate;
}
@keyframes bgShift{
  0% { transform: scale(1) translateY(0); }
  100%{ transform: scale(1.05) translateY(-1.5%); }
}

.fx-noise{
  background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='https://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'>\
    <filter id='n'>\
      <feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/>\
      <feColorMatrix type='saturate' values='0'/>\
      <feComponentTransfer><feFuncA type='table' tableValues='0 .04'/></feComponentTransfer>\
    </filter>\
    <rect width='100%' height='100%' filter='url(%23n)'/>\
  </svg>");
  mix-blend-mode: soft-light;
  opacity: .5;
  animation: noiseDrift 60s linear infinite;
}
@keyframes noiseDrift{
  to { transform: translate3d(10px, -10px, 0); }
}

/* Floating blobs for depth */
.fx-blob{
  position: absolute; border-radius: 9999px;
  filter: blur(40px);
  opacity: .35;
  background: radial-gradient(closest-side, var(--red-500), transparent);
  z-index: -1;
  will-change: transform;
}
.fx-blob.b1{ width: 28rem; height: 28rem; right: -8rem; top: 10%; animation: float1 16s var(--easing) infinite alternate; }
.fx-blob.b2{ width: 22rem; height: 22rem; left: -10rem; bottom: 5%; animation: float2 20s var(--easing) infinite alternate; }
@keyframes float1{ to { transform: translate3d(-3%, 4%, 0) rotate(8deg); } }
@keyframes float2{ to { transform: translate3d(4%, -2%, 0) rotate(-6deg); } }

/* === Glass Card ========================================================== */
.card{
  width: min(100%, 900px);
  padding: clamp(1.25rem, 3vw, var(--pad-8));
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  background: color-mix(in oklab, var(--glass) 100%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  transform: translateY(8px) scale(0.98);
  opacity: 0;
  animation: cardIn var(--duration-1) var(--easing) forwards .2s;
}
@keyframes cardIn{
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Detect lack of backdrop-filter support and harden background for legibility */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .card{ background: rgba(30,31,34,.9); }
}

/* Branding */
.brand{
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .75rem;
}
.logo{
  display: grid; place-items: center;
  inline-size: 2.25rem; block-size: 2.25rem;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--red-600), var(--red-500));
  color: var(--white); font-weight: 700; font-size: 1.2rem;
  box-shadow: 0 6px 20px rgba(225,29,72,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.title{
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin: 0;
  letter-spacing: .2px;
}
.subtitle{
  margin: .25rem 0 1.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
}

/* Countdown */
.countdown{
  display: inline-flex; align-items: center; gap: .75rem;
  padding: .75rem; border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform 300ms var(--easing);
  will-change: transform;
}
.countdown:hover{ transform: translateY(-1px); }

.countdown .sep{
  opacity: .6; font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.unit{
  display: grid; gap: .25rem; justify-items: center; min-width: 5.5rem;
}
.value{
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px;
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  padding: .5rem .75rem;
  line-height: 1;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--white);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 6px 16px rgba(0,0,0,.25);
  position: relative;
  overflow: clip;
}
.value::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 40%);
  mix-blend-mode: screen; pointer-events: none;
}
.label{
  font-size: .8rem; color: var(--muted);
  letter-spacing: .4px;
}

/* Meta / actions */
.meta{
  margin: 1rem 0 1.25rem;
  color: var(--muted);
}
.actions .btn{
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .85rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--red-600), var(--red-500));
  color: white; text-decoration: none; font-weight: 600;
  box-shadow: 0 10px 24px rgba(225,29,72,.35);
  transition: transform 200ms var(--easing), box-shadow 200ms var(--easing), filter 200ms var(--easing);
}
.actions .btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(225,29,72,.45);
}
.actions .btn[aria-disabled="true"]{
  filter: grayscale(.08) saturate(1.1);
  cursor: not-allowed;
}

/* Screen-reader only utility */
.sr-only{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Responsive sweetening */
@media (max-width: 520px){
  .unit{ min-width: 4.4rem; }
}
