:root {
  --ink: #171417;
  --muted: #665b62;
  --paper: #fbf7ee;
  --paper-2: #f2eadc;
  --wine: #8f2438;
  --wine-dark: #321421;
  --green: #0f6b4d;
  --green-dark: #123f33;
  --gold: #d6a33a;
  --gold-light: #f6d879;
  --blue: #2d5f8f;
  --border: rgba(23, 20, 23, 0.14);
  --shadow: 0 24px 80px rgba(35, 18, 18, 0.22);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 107, 77, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, var(--paper), #fffdf8 42%, var(--paper-2));
  background-size: 34px 34px, auto;
}

body::selection {
  color: #fff;
  background: var(--wine);
}

button,
input {
  font: inherit;
}

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

#confetti {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero {
  position: relative;
  min-height: 92svh;
  overflow: clip;
  color: #fff7e5;
  background: var(--wine-dark);
  isolation: isolate;
}

.hero__scene,
.hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__scene {
  z-index: -3;
  object-fit: cover;
  object-position: 58% center;
}

.hero__veil {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(10, 6, 10, 0.9) 0%, rgba(17, 9, 13, 0.74) 30%, rgba(17, 9, 13, 0.2) 64%, rgba(17, 9, 13, 0.34) 100%),
    linear-gradient(180deg, rgba(17, 9, 13, 0.24) 0%, rgba(17, 9, 13, 0.04) 58%, rgba(17, 9, 13, 0.78) 100%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand,
.topbar__links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand__mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.topbar__links {
  gap: 10px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 8, 11, 0.34);
  backdrop-filter: blur(14px);
}

.topbar__links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 247, 229, 0.86);
  font-size: 0.9rem;
}

.topbar__links a:hover,
.topbar__links a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 132px) 0 190px;
  transform: translateX(calc((min(1180px, 100vw - 40px) - min(780px, 100vw - 40px)) / -2));
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 24px;
  font-size: clamp(4.1rem, 10vw, 8.8rem);
  line-height: 0.86;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.18;
}

.hero__copy {
  max-width: 660px;
  margin-bottom: 28px;
  color: rgba(255, 247, 229, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.hero__actions,
.section__header,
.panel__row,
.range-label {
  display: flex;
  align-items: center;
}

.hero__actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 850;
  line-height: 1;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button--primary {
  color: #251407;
  background: linear-gradient(180deg, #ffe78d, var(--gold));
  box-shadow: 0 16px 38px rgba(214, 163, 58, 0.32);
}

.button--primary:hover,
.button--primary:focus-visible {
  box-shadow: 0 20px 45px rgba(214, 163, 58, 0.42);
}

.button--ghost {
  color: currentColor;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

.button--full {
  width: 100%;
}

.hero__score {
  position: absolute;
  right: max(20px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  left: max(20px, calc((100vw - 1180px) / 2));
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero__score div {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(18, 10, 12, 0.52);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero__score span,
.panel__row span,
.range-label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__score span {
  color: rgba(255, 247, 229, 0.62);
}

.hero__score strong {
  display: block;
  margin: 6px 0 4px;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1;
}

.hero__score small {
  color: rgba(255, 247, 229, 0.7);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(58px, 8vw, 104px) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.8fr);
  gap: clamp(28px, 7vw, 92px);
  align-items: end;
  padding-top: clamp(44px, 7vw, 76px);
}

.intro > p,
.final-toast p,
.trophy__copy p {
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.24rem);
  line-height: 1.65;
}

.section__header {
  max-width: 770px;
  align-items: flex-start;
  flex-direction: column;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card,
.panel,
.meter,
.height-check,
.roast-generator,
.toast-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 50px rgba(45, 37, 32, 0.08);
}

.card {
  min-height: 220px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.card::after {
  position: absolute;
  right: -34px;
  bottom: -50px;
  width: 130px;
  height: 130px;
  border: 20px solid rgba(15, 107, 77, 0.07);
  border-radius: 50%;
  content: "";
}

.card--feature {
  color: #fff8e8;
  background:
    linear-gradient(135deg, rgba(143, 36, 56, 0.92), rgba(15, 107, 77, 0.94)),
    var(--wine);
}

.card--feature p {
  color: rgba(255, 248, 232, 0.78);
}

.card__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 30px;
  border-radius: 50%;
  background: #fff3ce;
  box-shadow: inset 0 0 0 1px rgba(214, 163, 58, 0.36);
  font-size: 1.38rem;
}

.card p,
.panel p,
.meter p,
.height-check p,
.roast-generator p {
  color: var(--muted);
  line-height: 1.58;
}

.putt__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.course {
  min-height: 420px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(15, 107, 77, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 107, 77, 0.88), rgba(21, 139, 92, 0.88)),
    #0f6b4d;
  box-shadow: var(--shadow);
}

.course__rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.course__rail span {
  min-height: 40px;
  padding: 12px;
  border-radius: var(--radius);
  color: #dff5e4;
  background: rgba(4, 44, 31, 0.32);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.course__green {
  position: relative;
  height: min(58vw, 310px);
  min-height: 245px;
  border: 12px solid rgba(246, 216, 121, 0.32);
  border-radius: 999px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 32px, rgba(255, 255, 255, 0.02) 32px 64px),
    linear-gradient(180deg, #51b96a, #137b4f);
}

.course__green::before,
.course__green::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.course__green::before {
  right: 12%;
  bottom: -15%;
  width: 36%;
  aspect-ratio: 1;
  background: rgba(7, 80, 52, 0.3);
}

.course__green::after {
  left: 17%;
  top: 18%;
  width: 18%;
  aspect-ratio: 1;
  background: rgba(143, 36, 56, 0.28);
}

.course__flag {
  position: absolute;
  right: 13.5%;
  top: 22%;
  z-index: 2;
  width: 8px;
  height: 118px;
  border-radius: 999px;
  background: #fff9df;
}

.course__flag::before {
  position: absolute;
  left: 8px;
  top: 0;
  width: 70px;
  height: 43px;
  clip-path: polygon(0 0, 100% 20%, 0 100%);
  background: var(--wine);
  content: "";
}

.course__cup {
  position: absolute;
  right: 12%;
  bottom: 22%;
  z-index: 2;
  width: 58px;
  height: 25px;
  border-radius: 50%;
  background: #101710;
  box-shadow: inset 0 -5px 0 rgba(255, 255, 255, 0.18);
}

.course__ball {
  --ball-x: 7%;
  position: absolute;
  left: var(--ball-x);
  bottom: 25%;
  z-index: 3;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 18%, #e7e2d1 19% 56%, #cfc7ae 57% 100%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
  transition:
    left 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 320ms ease;
}

.course__ball.is-sunk {
  opacity: 0;
  transform: translateY(7px) scale(0.48);
}

.panel {
  padding: 24px;
  background: #fffdf8;
}

.panel__row,
.range-label {
  justify-content: space-between;
  gap: 16px;
}

.panel__row {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.range-label {
  margin-bottom: 12px;
}

output {
  min-width: 46px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green-dark);
  font-weight: 900;
  text-align: center;
}

.range {
  width: 100%;
  height: 10px;
  margin: 0 0 22px;
  border-radius: 999px;
  accent-color: var(--wine);
  cursor: pointer;
}

.result {
  min-height: 76px;
  margin: 18px 0 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper);
}

.roast__grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(260px, 1fr) minmax(240px, 0.8fr);
  gap: 14px;
}

.meter,
.height-check,
.roast-generator {
  padding: 24px;
}

.height-check {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 22px;
  background:
    linear-gradient(90deg, rgba(45, 95, 143, 0.08), transparent),
    rgba(255, 255, 255, 0.76);
}

.height-check__ruler {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 245px;
  padding: 10px 0;
  border-left: 7px solid var(--blue);
}

.height-check__ruler::before {
  position: absolute;
  inset: 18px auto 18px 0;
  width: 64px;
  background: repeating-linear-gradient(180deg, var(--blue) 0 3px, transparent 3px 22px);
  content: "";
}

.height-check__ruler span {
  position: relative;
  z-index: 1;
  margin-left: 18px;
  color: var(--blue);
  font-weight: 950;
}

.roast-generator {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(160deg, rgba(143, 36, 56, 0.08), rgba(214, 163, 58, 0.1)),
    #fffdf8;
}

.roast-generator p {
  min-height: 100px;
  font-size: 1.28rem;
  font-weight: 780;
  line-height: 1.35;
}

.trophy {
  width: 100%;
  max-width: none;
  padding-right: max(20px, calc((100vw - 1180px) / 2));
  padding-left: max(20px, calc((100vw - 1180px) / 2));
  color: #fff7e5;
  background:
    linear-gradient(135deg, rgba(50, 20, 33, 0.96), rgba(18, 63, 51, 0.96)),
    var(--wine-dark);
}

.trophy__stage {
  display: grid;
  grid-template-columns: minmax(250px, 0.68fr) minmax(280px, 1fr);
  gap: clamp(26px, 6vw, 78px);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.trophy__cup {
  position: relative;
  height: clamp(280px, 45vw, 520px);
  filter: drop-shadow(0 32px 50px rgba(0, 0, 0, 0.35));
}

.trophy__bowl,
.trophy__stem,
.trophy__base,
.trophy__handle {
  position: absolute;
  left: 50%;
  background: linear-gradient(135deg, #fff3a7, var(--gold) 45%, #8d5b11 68%, #f6d879);
}

.trophy__bowl {
  top: 9%;
  width: min(70%, 310px);
  aspect-ratio: 1.22;
  border-radius: 14% 14% 48% 48%;
  transform: translateX(-50%);
  overflow: hidden;
}

.trophy__bowl::after {
  position: absolute;
  inset: 10% 52% 12% 18%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.32);
  content: "";
}

.trophy__handle {
  top: 18%;
  width: 26%;
  height: 32%;
  border: 18px solid #d6a33a;
  background: transparent;
}

.trophy__handle--left {
  left: 10%;
  border-right: 0;
  border-radius: 60% 0 0 60%;
}

.trophy__handle--right {
  left: auto;
  right: 10%;
  border-left: 0;
  border-radius: 0 60% 60% 0;
}

.trophy__stem {
  top: 52%;
  width: min(18%, 78px);
  height: 25%;
  border-radius: 12px;
  transform: translateX(-50%);
}

.trophy__base {
  bottom: 8%;
  width: min(74%, 330px);
  height: 16%;
  border-radius: var(--radius);
  transform: translateX(-50%);
  background: linear-gradient(180deg, #5b3519, #28140d);
}

.trophy__copy .eyebrow,
.trophy__copy p {
  color: rgba(255, 247, 229, 0.76);
}

.trophy__copy h2 {
  max-width: 11ch;
}

.trophy.is-awarded .trophy__cup {
  animation: lift 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.final-toast {
  padding-bottom: clamp(80px, 10vw, 140px);
}

.toast-panel {
  padding: clamp(28px, 6vw, 64px);
  color: #fff7e5;
  background:
    linear-gradient(135deg, rgba(143, 36, 56, 0.94), rgba(45, 95, 143, 0.92)),
    var(--wine);
}

.toast-panel p {
  max-width: 850px;
  color: rgba(255, 247, 229, 0.82);
}

.toast-panel h2 {
  max-width: 12ch;
}

@keyframes lift {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  40% {
    transform: translateY(-28px) rotate(-2deg);
  }
  70% {
    transform: translateY(-18px) rotate(2deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero__content {
    transform: none;
    padding-top: 42px;
    padding-bottom: 320px;
  }

  .hero__score,
  .card-grid,
  .putt__layout,
  .intro,
  .roast__grid,
  .trophy__stage {
    grid-template-columns: 1fr;
  }

  .hero__score {
    bottom: 20px;
  }

  .card {
    min-height: 0;
  }

  .course {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .topbar__links {
    width: 100%;
    justify-content: space-between;
    border-radius: var(--radius);
  }

  .topbar__links a {
    padding-inline: 10px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 980px;
  }

  .hero__content {
    padding-bottom: 420px;
  }

  .hero__copy {
    font-size: 1rem;
  }

  .hero__score div {
    min-height: 0;
  }

  .section {
    width: min(100% - 28px, 1180px);
  }

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

  .course__green {
    min-height: 220px;
    border-width: 8px;
  }

  .height-check {
    grid-template-columns: 1fr;
  }

  .height-check__ruler {
    min-height: 170px;
  }

  .trophy {
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
