:root {
  --ink: #171514;
  --muted: #6b625d;
  --paper: #fbf7ef;
  --paper-2: #efe6d8;
  --wine: #7c1f32;
  --green: #174f3c;
  --gold: #c9932f;
  --blue: #244f78;
  --line: rgba(23, 21, 20, 0.14);
  --shadow: 0 28px 70px rgba(28, 19, 12, 0.18);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(251, 247, 239, 0.92), rgba(239, 230, 216, 0.94)),
    var(--paper);
}

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

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

.hero {
  position: relative;
  min-height: 92svh;
  overflow: clip;
  color: #fff8e9;
  background: #1a1210;
  isolation: isolate;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  z-index: -3;
  object-fit: cover;
  object-position: center;
}

.hero__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(12, 8, 7, 0.88) 0%, rgba(12, 8, 7, 0.72) 38%, rgba(12, 8, 7, 0.24) 72%),
    linear-gradient(180deg, rgba(12, 8, 7, 0.2) 0%, rgba(12, 8, 7, 0.52) 100%);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff8e9;
  font-weight: 850;
  text-decoration: none;
}

.brand__rule {
  width: 42px;
  height: 2px;
  background: var(--gold);
}

.topbar__links {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(18, 12, 10, 0.44);
  backdrop-filter: blur(16px);
}

.topbar__links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 248, 233, 0.82);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

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

.hero__content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(80px, 10vw, 150px) 0 clamp(180px, 16vw, 230px);
}

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

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

h1 {
  max-width: 12ch;
  margin-bottom: 24px;
  font-size: clamp(3.4rem, 8vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.05rem, 4.6vw, 4.1rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.12;
}

.hero__copy {
  max-width: 690px;
  margin-bottom: 30px;
  color: rgba(255, 248, 233, 0.88);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
  line-height: 1.58;
}

.hero__actions,
.range-label,
.panel__row {
  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;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

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

.button--primary {
  color: #221507;
  background: linear-gradient(180deg, #f9dc85, var(--gold));
  box-shadow: 0 18px 42px rgba(201, 147, 47, 0.3);
}

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

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

.control-panel .button--secondary,
.roast-generator .button--secondary {
  color: var(--ink);
  border-color: var(--line);
  background: #fffdf8;
}

.control-panel .button--secondary:hover,
.control-panel .button--secondary:focus-visible,
.roast-generator .button--secondary:hover,
.roast-generator .button--secondary:focus-visible {
  background: var(--paper);
}

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

.hero__trophy {
  position: absolute;
  right: max(20px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  z-index: 2;
  width: min(280px, 34vw);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(18, 12, 10, 0.62);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.hero__trophy img {
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: contain;
  background: #e7e1d6;
}

.hero__trophy figcaption {
  padding: 12px 14px;
  color: rgba(255, 248, 233, 0.76);
  font-size: 0.88rem;
}

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

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(300px, 1fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: start;
}

.section__header {
  max-width: 780px;
}

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

.fact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 28px 0 0;
}

.fact-strip div,
.control-panel,
.meter,
.height-check,
.nap-check,
.roast-generator,
.toast-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 50px rgba(33, 26, 20, 0.08);
}

.fact-strip div {
  padding: 18px;
}

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

.fact-strip dd {
  margin: 8px 0 0;
  font-weight: 850;
  line-height: 1.25;
}

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

.photo-card {
  position: relative;
  min-height: 450px;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff8e9;
  background: #171514;
  box-shadow: var(--shadow);
}

.photo-card--wide {
  grid-column: span 2;
}

.photo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.photo-card:hover img {
  transform: scale(1.04);
}

.photo-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 10, 8, 0.05) 0%, rgba(15, 10, 8, 0.28) 42%, rgba(15, 10, 8, 0.9) 100%);
  content: "";
}

.photo-card > div {
  position: relative;
  z-index: 1;
  padding: clamp(20px, 3vw, 30px);
}

.photo-card p {
  max-width: 520px;
  color: rgba(255, 248, 233, 0.8);
  line-height: 1.55;
}

.gallery {
  padding-top: 20px;
}

.gallery__intro {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  line-height: 1.62;
}

.gallery__masonry {
  columns: 3 260px;
  column-gap: 14px;
  margin-top: 28px;
}

.gallery-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 50px rgba(33, 26, 20, 0.08);
}

.gallery-card__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: #171514;
}

.gallery-card__button img {
  width: 100%;
  height: auto;
  transition: transform 450ms ease, filter 450ms ease;
}

.gallery-card__button:hover img,
.gallery-card__button:focus-visible img {
  filter: brightness(1.04);
  transform: scale(1.025);
}

.gallery-card__button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.gallery-card figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.lightbox {
  width: min(1040px, calc(100vw - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff8e9;
  background: #171514;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.lightbox::backdrop {
  background: rgba(12, 8, 7, 0.78);
  backdrop-filter: blur(7px);
}

.lightbox img {
  width: 100%;
  max-height: calc(100svh - 128px);
  object-fit: contain;
  background: #171514;
}

.lightbox p {
  margin: 0;
  padding: 14px 18px 18px;
  color: rgba(255, 248, 233, 0.8);
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  color: #fff8e9;
  background: rgba(23, 21, 20, 0.74);
  cursor: pointer;
  font-weight: 850;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(23, 21, 20, 0.92);
  outline: none;
}

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

.putt-photo {
  position: relative;
  min-height: 430px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #143b24;
  box-shadow: var(--shadow);
}

.putt-photo img,
.putt-photo__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.putt-photo img {
  object-fit: cover;
}

.putt-photo__overlay {
  background:
    radial-gradient(circle at 82% 62%, rgba(255, 255, 255, 0.12) 0 7%, transparent 7.5%),
    linear-gradient(90deg, rgba(12, 37, 24, 0.44), rgba(12, 37, 24, 0.1));
}

.course__cup {
  position: absolute;
  right: 12%;
  bottom: 29%;
  z-index: 2;
  width: 62px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.76);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.course__ball {
  --ball-x: 8%;
  position: absolute;
  left: var(--ball-x);
  bottom: 31%;
  z-index: 3;
  width: 34px;
  aspect-ratio: 1;
  border: 2px solid rgba(0, 0, 0, 0.14);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #fff 0 18%, #e9e6db 19% 58%, #cfc8b8 59% 100%);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25);
  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(9px) scale(0.42);
}

.control-panel {
  padding: 24px;
  background: rgba(255, 253, 248, 0.9);
}

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

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

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

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

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

.result {
  min-height: 78px;
  margin: 18px 0 0;
  padding: 16px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--paper);
  line-height: 1.55;
}

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

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

.height-check {
  background:
    linear-gradient(135deg, rgba(36, 79, 120, 0.12), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.74);
}

.nap-check {
  background:
    linear-gradient(135deg, rgba(124, 31, 50, 0.1), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.74);
}

.roast-generator {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

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

.trophy {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(300px, 1fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: center;
}

.trophy__photo {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.trophy__photo img {
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: contain;
  background: #e7e1d6;
}

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

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

.final-toast {
  padding-top: 20px;
}

.toast-panel {
  padding: clamp(28px, 6vw, 64px);
  color: #fff8e9;
  background:
    linear-gradient(135deg, rgba(124, 31, 50, 0.94), rgba(23, 79, 60, 0.92)),
    var(--wine);
}

.toast-panel p {
  max-width: 820px;
  color: rgba(255, 248, 233, 0.82);
}

.credits {
  padding: 42px max(20px, calc((100vw - 1180px) / 2));
  color: rgba(255, 248, 233, 0.78);
  background: #171514;
}

.credits h2 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.credits p {
  max-width: 850px;
  line-height: 1.55;
}

.credits ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 20px 0 0;
  padding-left: 18px;
}

.credits a {
  color: #f3d37a;
}

@keyframes lift {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  40% {
    transform: translateY(-24px) rotate(-1deg);
  }
  70% {
    transform: translateY(-14px) rotate(1deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

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

  .hero__content {
    padding-top: 54px;
    padding-bottom: 420px;
  }

  .hero__trophy {
    right: auto;
    left: 20px;
    width: min(320px, calc(100% - 40px));
  }

  .intro,
  .putt__layout,
  .roast__grid,
  .trophy {
    grid-template-columns: 1fr;
  }

  .fact-strip {
    grid-template-columns: 1fr;
  }

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

  .photo-card,
  .photo-card--wide {
    grid-column: auto;
    min-height: 390px;
  }

  .gallery__masonry {
    columns: 2 220px;
  }

  .credits ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar,
  .hero__content,
  .section {
    width: min(100% - 28px, 1180px);
  }

  .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: 390px;
  }

  .hero__copy {
    font-size: 1rem;
  }

  .photo-card {
    min-height: 340px;
  }

  .gallery__masonry {
    columns: 1;
  }

  .putt-photo {
    min-height: 330px;
  }
}

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