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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--line-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
  overflow: hidden;
}

img,
svg,
iframe {
  max-width: 100%;
}

img {
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

h1,
h2,
.site-logo {
  font-family: var(--font-serif);
  font-weight: 400;
}

h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
}

h3 {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

h4 {
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.35;
}

p {
  margin-bottom: var(--space-sm);
}

small {
  color: var(--text2);
}

.container,
.container-narrow {
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container {
  max-width: var(--container);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--space-xl) 0;
}

.section--lg {
  padding: var(--space-2xl) 0;
}

section[id] {
  scroll-margin-top: 92px;
}

.section--soft {
  background: var(--bg2);
}

.section--surface {
  background: var(--bg);
  border-block: 1px solid var(--border);
}

.section--dark {
  background: var(--hero-bg);
  color: var(--hero-text);
}

.section-head,
.section-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-head p,
.section-intro p:not(.overline) {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--text2);
  font-size: var(--text-md);
}

.section-intro--split {
  display: flex;
}

.overline,
.meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overline {
  display: inline-block;
  margin-bottom: var(--space-xs);
  color: var(--green);
}

.overline--light {
  color: rgba(255, 255, 255, 0.58);
}

.overline--accent {
  color: var(--gold);
}

.page-intro {
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.page-intro p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--text2);
  font-size: var(--text-md);
}

.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--text2);
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

.label-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--green-10);
  color: var(--green);
  border: 1px solid var(--green-20);
}

.label-tag--accent {
  background: var(--gold-10);
  color: var(--gold);
  border-color: rgba(184, 148, 58, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__inner > * {
    animation: hero-reveal 820ms var(--motion-ease-spring) both;
  }

  .hero__inner > *:nth-child(2) {
    animation-delay: 90ms;
  }

  .hero__inner > *:nth-child(3) {
    animation-delay: 170ms;
  }

  .hero__inner > *:nth-child(4) {
    animation-delay: 240ms;
  }

  .hero__inner > *:nth-child(5) {
    animation-delay: 310ms;
  }

  .reveal-item {
    opacity: 0;
    filter: blur(1.5px);
    transform: translate3d(0, 20px, 0) scale(0.986);
    transition:
      opacity var(--motion-slow) var(--motion-ease-out),
      transform var(--motion-slow) var(--motion-ease-spring),
      filter 540ms ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform, filter;
  }

  .reveal-item.reveal-item--emphasis {
    transform: translate3d(0, 26px, 0) scale(0.978);
    transition-duration: 720ms, 760ms, 580ms;
  }

  .reveal-item.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .btn-ghost,
  .btn-white,
  .btn-outline-white,
  .post-card,
  .prize-card,
  .step-card,
  .winner-card,
  .stat-card,
  .hall-card,
  .share-card {
    transition:
      transform var(--motion-medium) var(--motion-ease-out),
      border-color var(--transition-med),
      background var(--transition-med),
      color var(--transition-med),
      opacity var(--transition-med);
  }

  .btn-primary:active,
  .btn-secondary:active,
  .btn-outline:active,
  .btn-ghost:active,
  .btn-white:active,
  .btn-outline-white:active {
    transform: translateY(0) scale(0.985);
  }

  .site-nav__link,
  .site-footer a,
  .post-card__link {
    transition:
      color var(--transition-med),
      background var(--transition-med),
      opacity var(--transition-med),
      transform var(--motion-fast) var(--motion-ease-out);
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-outline:hover,
  .btn-ghost:hover,
  .btn-white:hover,
  .btn-outline-white:hover {
    transform: translateY(-2px) scale(1.01);
  }

  .post-card:hover,
  .prize-card:hover,
  .step-card:hover,
  .winner-card:hover,
  .stat-card:hover,
  .hall-card:hover,
  .share-card:hover {
    transform: translateY(-6px) scale(1.01);
  }
}

@keyframes hero-reveal {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translate3d(0, 18px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (max-width: 899px) {
  .container,
  .container-narrow {
    padding: 0 var(--space-sm);
  }

  .section,
  .section--lg {
    padding: var(--space-lg) 0;
  }

  .section-head,
  .section-intro,
  .section-intro--split {
    display: block;
  }
}
