:root {
  /* Brand tokens. Approximations from the logo; swap here to match for-men.ua exactly. */
  --red: #C62440;
  --red-dark: #9E1B33;
  --black: #0B0B0B;
  --graphite: #1E1E1E;
  --white: #FFFFFF;
  --muted: #9A9A9A;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --spin-ms: 5s;
}

@media (prefers-reduced-motion: reduce) {
  :root { --spin-ms: 0.6s; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.45;
  overflow-x: hidden;
}

main { flex: 1; }

[hidden] { display: none !important; }

a { color: inherit; }

/* Header */
.site-header {
  background: var(--white);
  display: flex;
  justify-content: center;
  padding: 12px 16px;
}
.site-header__logo img {
  display: block;
  height: 44px;
  width: auto;
}

/* Hero */
.hero {
  text-align: center;
  padding: 36px 16px 8px;
  max-width: 720px;
  margin: 0 auto;
}
.hero__eyebrow {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2.6rem, 13vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__eyebrow span {
  display: inline-block;
  background: var(--red);
  padding: 0 0.12em;
}
.hero__title {
  margin: 20px 0 8px;
  font-weight: 700;
  font-size: clamp(1.25rem, 5vw, 1.75rem);
}
.hero__sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Wheel */
.wheel-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 8px;
}
.wheel {
  position: relative;
  width: min(90vw, 420px);
  aspect-ratio: 1;
}
.wheel__svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 30px rgba(198, 36, 64, 0.35));
}
.wheel__rim { fill: var(--white); }
.wheel__hub-ring { fill: var(--white); }
#wheel-rotor {
  transform-origin: 0 0;
  transition: transform var(--spin-ms) cubic-bezier(.17, .67, .12, 1);
}
.wheel__segment-label {
  fill: var(--white);
  font-family: var(--font);
  font-weight: 900;
}
.wheel__pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11%;
  transform: translateX(-50%);
  z-index: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}
.wheel__pointer path { fill: var(--red); stroke: var(--white); stroke-width: 3; }

/* Buttons */
.btn {
  display: inline-block;
  border: 2px solid transparent;
  border-radius: 0;
  padding: 14px 28px;
  font: 700 1rem/1.2 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, opacity .15s;
}
.btn:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover:not(:disabled) { background: var(--red-dark); }
.btn--outline { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline:hover { background: var(--white); color: var(--black); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--spin { margin-top: 24px; min-width: 220px; font-size: 1.15rem; padding: 18px 36px; }


/* Result */
.result {
  max-width: 480px;
  margin: 24px auto 0;
  padding: 0 16px;
}
.result__card {
  background: var(--graphite);
  border-top: 6px solid var(--red);
  padding: 28px 20px;
  text-align: center;
}
.result__title { margin: 0; font-weight: 700; font-size: 1.1rem; }
.result__discount {
  margin: 4px 0 20px;
  font-weight: 900;
  font-size: clamp(3rem, 16vw, 4.5rem);
  line-height: 1;
  color: var(--red);
  overflow-wrap: anywhere;
}
.result__code-label { margin: 0 0 8px; color: var(--muted); font-size: 0.9rem; }
.result__code {
  display: block;
  background: var(--white);
  color: var(--black);
  font: 700 clamp(1.4rem, 7vw, 2rem)/1.2 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  padding: 14px 12px;
  user-select: all;
  -webkit-user-select: all;
  overflow-wrap: anywhere;
}
.result__copy { width: 100%; margin-top: 10px; }
.result__hint { margin: 18px 0; font-size: 0.95rem; }
.result__time { margin: 14px 0 20px; color: var(--muted); font-size: 0.85rem; }
.result__site { width: 100%; }

/* Error */
.error {
  max-width: 480px;
  margin: 32px auto;
  padding: 20px 16px;
  border: 2px solid var(--red);
  text-align: center;
  font-weight: 700;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 32px 16px 28px;
  border-top: 1px solid var(--graphite);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.socials { display: flex; gap: 28px; }
.socials a {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}
.socials a:hover { color: var(--red); }
.site-footer__copy { margin: 0; color: var(--muted); font-size: 0.8rem; }

/* Wheel segments (color index from wheel-geometry.segmentColorIndex) */
.wheel__segment { stroke: var(--white); stroke-width: 0.8; }
.wheel__segment--0 { fill: var(--red); }
.wheel__segment--1 { fill: var(--black); }
.wheel__segment--2 { fill: var(--graphite); }
