:root {
  --blue: #214e92;
  --navy: #0b1a2f;
  --green: #009a44;
  --green-dark: #017c37;
  --ink: #17243a;
  --muted: #5d6878;
  --line: #d8dcdf;
  --surface: #f7f7f8;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(11, 26, 47, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Barlow, Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px clamp(18px, 4vw, 56px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand img {
  display: block;
  width: min(270px, 56vw);
  height: auto;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 56px);
  background:
    linear-gradient(135deg, rgba(33, 78, 146, 0.1), rgba(0, 154, 68, 0.08)),
    var(--white);
  border-bottom: 1px solid var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto clamp(18px, 4vw, 56px) 0;
  height: 6px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--navy));
  border-radius: 999px 999px 0 0;
}

.hero-copy {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  max-width: 980px;
  margin: 0 auto;
}

.hero-mark {
  display: grid;
  place-items: center;
  flex: 0 0 clamp(82px, 13vw, 132px);
  width: clamp(82px, 13vw, 132px);
  aspect-ratio: 1;
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent),
    var(--blue);
  box-shadow: var(--shadow);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
  border: 7px solid var(--white);
}

.hero-copy h1 {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(330px, 440px);
  gap: clamp(20px, 3vw, 38px);
  padding: clamp(24px, 4vw, 56px);
}

.wheel-zone,
.control-panel {
  min-width: 0;
}

.wheel-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 760px);
  aspect-ratio: 1;
  margin: 0 auto;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 26px 45px rgba(11, 26, 47, 0.22));
}

.pointer {
  position: absolute;
  top: 50%;
  right: -2px;
  width: 0;
  height: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-right: 44px solid var(--green);
  transform: translateY(-50%);
  z-index: 2;
  filter: drop-shadow(0 4px 10px rgba(11, 26, 47, 0.25));
}

.spin-button {
  position: absolute;
  width: 142px;
  height: 142px;
  border: 10px solid var(--white);
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  background: var(--white);
  color: var(--white);
  font-weight: 900;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(11, 26, 47, 0.22);
  padding: 18px;
  overflow: hidden;
}

.spin-button img {
  width: 96px;
  max-width: 100%;
  height: auto;
  display: block;
}

.spin-button span {
  display: inline-grid;
  place-items: center;
  min-width: 62px;
  height: 30px;
  border-radius: 999px;
  background: var(--green);
  line-height: 1;
}

.spin-button:disabled {
  cursor: progress;
  background: var(--white);
}

.spin-button:disabled span {
  background: #8a95a3;
}

.status-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.status-row p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 12px 34px rgba(11, 26, 47, 0.07);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

h2 {
  margin: 0;
  color: var(--blue);
  font-size: 24px;
  line-height: 1.15;
}

.section-heading span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}

textarea {
  min-height: 260px;
  margin-top: 10px;
  line-height: 1.45;
  resize: vertical;
}

textarea:focus,
input[type="text"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 154, 68, 0.13);
}

input[type="range"] {
  accent-color: var(--green);
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  padding: 10px 15px;
}

button:hover {
  background: var(--green-dark);
}

.ghost-button {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--line);
}

.ghost-button:hover {
  color: var(--white);
  border-color: var(--green-dark);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.winner-dialog {
  width: min(92vw, 520px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.winner-dialog::backdrop {
  background: rgba(11, 26, 47, 0.62);
}

.winner-dialog form {
  margin: 0;
  padding: 34px;
  text-align: center;
  background: var(--white);
}

.winner-dialog img {
  width: min(260px, 72vw);
  height: auto;
}

.winner-dialog p {
  margin: 26px 0 6px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
}

.winner-dialog h2 {
  font-size: clamp(34px, 8vw, 58px);
  overflow-wrap: anywhere;
}

.dialog-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px clamp(18px, 4vw, 56px);
  background: var(--navy);
  color: var(--white);
}

footer img {
  width: 176px;
  height: auto;
}

footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 980px) {
  .hero,
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-layout {
    padding-top: 30px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .status-row,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    align-items: center;
  }

  .hero-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-grid {
    grid-template-columns: 1fr;
  }

  .spin-button {
    width: 110px;
    height: 110px;
    border-width: 8px;
    padding: 13px;
  }

  .spin-button img {
    width: 76px;
  }

  .spin-button span {
    height: 26px;
    min-width: 54px;
    font-size: 16px;
  }

  .pointer {
    border-top-width: 16px;
    border-bottom-width: 16px;
    border-right-width: 32px;
  }
}
