:root {
  --white: #ffffff;
  --ink: #111111;
  --muted: #66655f;
  --yellow: #ffce38;
  --yellow-soft: #fff7d7;
  --border: #deddd8;
  --border-dark: #bebdb7;
  --error: #b42318;
  --success: #176b3a;
  --success-bg: #edf8f1;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.07);
  --radius: 18px;
  --page-width: 1220px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.top-accent {
  width: 100%;
  height: 6px;
  background: var(--yellow);
}

.site-header,
.contest-section,
.rules-section,
.partners-section,
.site-footer {
  width: min(calc(100% - 48px), var(--page-width));
  margin-inline: auto;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 106px;
  border-bottom: 1px solid #efeee9;
}

.brand {
  position: relative;
  display: block;
  width: 176px;
  height: 66px;
  overflow: hidden;
  line-height: 0;
}

.brand img {
  position: absolute;
  top: -82px;
  left: -29px;
  display: block;
  width: 226px;
  max-width: none;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 34px);
  font-size: 0.9rem;
  font-weight: 650;
}

.main-nav a {
  position: relative;
  padding-block: 8px;
  color: #45443f;
  text-decoration: none;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  background: var(--yellow);
  content: "";
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 140ms ease, transform 140ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.main-nav a:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 4px;
}

.contest-section {
  display: grid;
  grid-template-columns: minmax(560px, 1.22fr) minmax(320px, 0.78fr);
  gap: clamp(50px, 6vw, 84px);
  align-items: start;
  padding-block: clamp(64px, 7vw, 90px) clamp(86px, 9vw, 118px);
}

.hero-copy {
  display: grid;
  gap: 44px;
}

.intro {
  max-width: 650px;
  padding-top: 8px;
}

.eyebrow,
.step-label {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  display: inline-block;
  width: 26px;
  height: 4px;
  margin-right: 10px;
  vertical-align: 3px;
  background: var(--yellow);
  border-radius: 20px;
  content: "";
}

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

h1 {
  max-width: 560px;
  margin-bottom: 26px;
  font-size: clamp(3.6rem, 5.4vw, 4.9rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.heading-copy {
  display: block;
}

.heading-copy--desktop {
  display: none;
}

.heading-accent {
  position: relative;
  z-index: 0;
}

.heading-accent::after {
  position: absolute;
  z-index: -1;
  right: -6px;
  bottom: 0.06em;
  left: 0;
  height: 0.2em;
  background: var(--yellow);
  content: "";
}

.lead {
  max-width: 610px;
  margin-bottom: 0;
  color: #45443f;
  font-size: clamp(1.05rem, 1.4vw, 1.19rem);
  line-height: 1.7;
}

.deadline-note {
  display: inline-block;
  margin-top: 22px;
  padding: 11px 15px;
  background: #fbfaf7;
  border-left: 4px solid var(--yellow);
  border-radius: 0 9px 9px 0;
}

.deadline-note p {
  margin: 0;
  color: #45443f;
}

.deadline-note p:first-child {
  font-size: 0.94rem;
}

.deadline-note p:last-child {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.form-card {
  position: relative;
  width: 100%;
  max-width: 680px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-visual {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 760px;
  padding: 54px 0 34px;
}

.city-art-frame {
  position: relative;
  width: 100%;
  isolation: isolate;
}

.city-art-frame::before {
  position: absolute;
  z-index: -1;
  top: 10%;
  right: 2%;
  width: 78%;
  aspect-ratio: 1;
  background: var(--yellow-soft);
  border-radius: 50%;
  opacity: 0.58;
  content: "";
}

.city-art-frame img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.82;
}

.prizes-area {
  position: relative;
}

.prizes-area h2 {
  margin-bottom: 18px;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.voucher-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.voucher-placeholder {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1.58;
  place-items: center;
  overflow: hidden;
  color: #94928b;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(250, 249, 245, 0.88));
  border: 1px solid #deddd7;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.035);
}

.voucher-placeholder::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  background: rgba(255, 206, 56, 0.7);
  border-radius: 0 0 4px 4px;
  content: "";
}

.voucher-placeholder span {
  padding: 12px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-align: center;
  text-transform: uppercase;
}

.form-card::before {
  position: absolute;
  top: -1px;
  left: 40px;
  width: 84px;
  height: 5px;
  background: var(--yellow);
  border-radius: 0 0 8px 8px;
  content: "";
}

.form-card__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid #eeede8;
}

.form-card__heading p {
  margin-bottom: 0;
}

.form-card__heading > p:last-child {
  color: var(--muted);
  font-size: 0.875rem;
}

.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.field--answer {
  margin-top: 31px;
}

.field--answer label {
  margin-bottom: 2px;
  font-size: 1.1rem;
}

.field-hint {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="text"],
input[type="email"] {
  min-height: 50px;
  padding: 11px 14px;
}

textarea {
  min-height: 122px;
  padding: 13px 14px;
  line-height: 1.55;
  resize: vertical;
}

.character-count {
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: right;
}

.character-count.is-over-limit {
  color: var(--error);
  font-weight: 700;
}

input[type="text"]:hover,
input[type="email"]:hover,
textarea:hover {
  border-color: #8d8c86;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 206, 56, 0.48);
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--error);
}

.error-message {
  min-height: 0;
  margin: 6px 0 0;
  color: var(--error);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.error-message:empty {
  display: none;
}

.consents {
  margin-top: 8px;
}

.checkbox-field {
  display: grid;
  grid-template-columns: 21px 1fr;
  gap: 11px;
  align-items: start;
}

.checkbox-field input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--yellow);
  cursor: pointer;
}

.checkbox-field label {
  font-size: 0.9375rem;
  cursor: pointer;
}

.placeholder-link {
  text-decoration-color: #a3a19a;
  text-underline-offset: 3px;
}

.placeholder-link:hover {
  text-decoration-color: var(--ink);
}

.checkbox-error {
  margin-left: 32px;
}

.privacy-note {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  margin: 20px 0 28px;
  padding: 15px 16px;
  color: #5c5a54;
  background: #f8f7f3;
  border-radius: 10px;
}

.privacy-note span {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  margin-top: 1px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  font-style: normal;
}

.privacy-note p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
}

button[type="submit"] {
  min-height: 52px;
  padding: 13px 23px;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button[type="submit"]:hover {
  background: #ffd95d;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

button[type="submit"]:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: 2px 2px 0 var(--ink);
}

button[type="submit"]:focus-visible,
.placeholder-link:focus-visible,
.brand:focus-visible,
.checkbox-field input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.form-status {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
  padding: 14px 16px;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid #b9dec8;
  border-radius: 10px;
}

.form-status[hidden] {
  display: none;
}

.form-status span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #fff;
  background: var(--success);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
}

.form-status p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-status--error {
  color: var(--error);
  background: #fff2f0;
  border-color: #f1c0ba;
}

.form-status--error span {
  background: var(--error);
}

.rules-section {
  display: block;
  padding-block: clamp(60px, 7vw, 88px);
  border-top: 1px solid #e4e3de;
  scroll-margin-top: 24px;
}

.rules-section .section-heading {
  max-width: 720px;
  margin-bottom: 42px;
}

.rules-list {
  width: min(100%, 920px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: contest-rule;
}

.rules-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
  padding: 17px 0;
  border-bottom: 1px solid #ecebe6;
  color: #3f3e39;
  font-size: 1rem;
  line-height: 1.6;
  counter-increment: contest-rule;
}

.rules-list li:first-child {
  padding-top: 0;
}

.rules-list li::before {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink);
  background: var(--yellow-soft);
  border: 1px solid #f0d97f;
  border-radius: 50%;
  content: counter(contest-rule);
  font-size: 0.8rem;
  font-weight: 800;
}

.rule-copy {
  min-width: 0;
}

.rule-question strong {
  display: block;
  max-width: 760px;
  margin-top: 2px;
}

#o-konkursie,
#nagrody {
  scroll-margin-top: 24px;
}

.partners-section {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(40px, 7vw, 92px);
  padding-block: clamp(70px, 8vw, 104px);
  border-top: 1px solid #e4e3de;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.8vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.partner-placeholders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.partner-placeholder {
  display: grid;
  min-height: 112px;
  place-items: center;
  color: #97958e;
  background: #fbfaf7;
  border: 1px dashed #cbc9c2;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  min-height: 110px;
  padding-block: 28px;
  border-top: 1px solid #e4e3de;
  color: #595852;
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
  font-weight: 700;
}

.site-footer nav {
  display: flex;
  gap: 26px;
}

@media (min-width: 861px) {
  body {
    overflow-x: clip;
  }

  .contest-section {
    position: relative;
    isolation: isolate;
    padding-bottom: clamp(38px, 3.5vw, 50px);
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    grid-column: 1;
  }

  .form-card {
    z-index: 3;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.99) 0%,
      rgba(255, 255, 255, 0.98) 62%,
      rgba(255, 255, 255, 0.76) 100%
    );
    backdrop-filter: blur(0.5px);
  }

  .heading-copy--mobile {
    display: none;
  }

  .heading-copy--desktop {
    display: block;
  }

  h1 {
    max-width: 660px;
    font-size: clamp(3.25rem, 4.1vw, 4rem);
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.045em;
  }

  .hero-visual {
    position: absolute;
    z-index: 1;
    top: 74px;
    right: -82px;
    justify-content: flex-start;
    width: min(62vw, 740px);
    min-height: 0;
    padding: 0;
    pointer-events: none;
  }

  .city-art-frame {
    overflow: visible;
  }

  .city-art-frame::before {
    top: -46px;
    right: 66px;
    width: 430px;
    height: 540px;
    aspect-ratio: auto;
    background: url("assets/location-pin-background.svg") center / contain no-repeat;
    border-radius: 0;
    opacity: 1;
    transform: none;
  }

  .city-art-frame::after {
    content: none;
  }

  .city-art-frame img {
    width: 100%;
    margin-bottom: -178px;
    opacity: 0.66;
    transform: translate(-18px, -178px);
    -webkit-mask-image: radial-gradient(circle at 17.2% 53.2%, transparent 0 4.5%, #000 5.5%);
    mask-image: radial-gradient(circle at 17.2% 53.2%, transparent 0 4.5%, #000 5.5%);
  }

  .prizes-area {
    z-index: 2;
    width: 348px;
    margin: 4px 54px 0 auto;
  }

  .rules-section {
    padding-block: clamp(44px, 4.5vw, 58px);
  }

  .partners-section {
    padding-top: clamp(40px, 4vw, 52px);
    padding-bottom: clamp(50px, 5vw, 68px);
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: grid;
    gap: 4px;
  }

  .main-nav {
    position: absolute;
    z-index: 20;
    top: calc(100% - 1px);
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #efeee9;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 16px 32px rgba(17, 17, 17, 0.08);
  }

  .main-nav:not(.is-open) {
    display: none;
  }

  .main-nav a {
    min-height: 44px;
    padding: 11px 12px;
  }

  .contest-section {
    grid-template-columns: 1fr;
    padding-top: 54px;
  }

  .hero-copy {
    gap: 48px;
  }

  .intro {
    position: static;
    max-width: 660px;
    padding-top: 0;
  }

  h1 br {
    display: none;
  }

  .hero-visual {
    position: static;
    display: block;
    min-height: 0;
    padding: 0 0 42px;
    pointer-events: auto;
  }

  .city-art-frame {
    display: none;
  }

  .prizes-area h2 {
    font-size: 1.8rem;
  }

  .voucher-stage {
    width: min(100%, 420px);
  }

  .voucher-placeholder {
    width: auto;
    height: auto;
  }

  .form-card {
    width: 100%;
    max-width: 660px;
  }

  .rules-section,
  .partners-section {
    grid-template-columns: 1fr;
  }

  .rules-section .section-heading {
    margin-bottom: 30px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .contest-section,
  .rules-section,
  .partners-section,
  .site-footer {
    width: min(calc(100% - 32px), var(--page-width));
  }

  .site-header {
    min-height: 76px;
  }

  .brand {
    position: relative;
    width: 132px;
    height: 52px;
    overflow: hidden;
  }

  .brand img {
    position: absolute;
    top: -61px;
    left: -22px;
    width: 168px;
    max-width: none;
  }

  .contest-section {
    padding-block: 30px 50px;
  }

  .hero-copy {
    gap: 28px;
  }

  h1 {
    margin-bottom: 16px;
    font-size: clamp(2.35rem, 11.7vw, 3.35rem);
  }

  h1 br {
    display: block;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.65;
  }

  .deadline-note {
    margin-top: 18px;
    padding: 10px 13px;
  }

  .form-card {
    padding: 28px 20px 30px;
    border-radius: 15px;
    box-shadow: 0 12px 36px rgba(17, 17, 17, 0.07);
  }

  .form-card::before {
    left: 24px;
  }

  .form-card__heading {
    display: block;
    margin-bottom: 28px;
  }

  .form-card__heading > p:last-child {
    margin-top: 5px;
  }

  .field {
    margin-bottom: 22px;
  }

  .field--answer {
    margin-top: 28px;
  }

  input[type="text"],
  input[type="email"] {
    min-height: 44px;
    padding-block: 8px;
  }

  button[type="submit"] {
    width: 100%;
  }

  .rules-section,
  .partners-section {
    gap: 24px;
    padding-block: 46px;
  }

  .rules-list li {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 11px;
    padding-block: 12px;
  }

  .rules-list li::before {
    width: 27px;
    height: 27px;
  }

  .partner-placeholders {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .partner-placeholder {
    min-height: 70px;
    font-size: 0.675rem;
  }

  .site-footer {
    display: block;
    min-height: 0;
    padding-block: 32px 38px;
  }

  .site-footer nav {
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

.turnstile-field {
  margin: 4px 0 20px;
}

.turnstile-field .turnstile-widget {
  width: 100%;
  min-height: 65px;
}

.turnstile-field .error-message:not(:empty) {
  margin-top: 8px;
}
