html { font-synthesis: none; }
:root {
  --ink: #062646;
  --orange: #ff4b1a;
  --orange-text: #d23500;
  --paper: #fffaf1;
  --cream: #f8efe0;
  --sea: #63b7c7;
  --line: #082b4d;
  --muted: #4f6478;
  --shadow: #082b4d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(135deg, rgba(255, 75, 26, 0.08) 0 25%, transparent 25% 50%, rgba(255, 75, 26, 0.08) 50% 75%, transparent 75%) 0 0 / 48px 48px,
    var(--cream);
}

a { color: inherit; }

.wrap {
  width: min(1120px, calc(100% - clamp(20px, 4vw, 64px)));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 5px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--orange-text);
  font-size: 17px;
  line-height: 0.9;
  box-shadow: 5px 5px 0 var(--shadow);
}

.back-link,
button {
  border: 4px solid var(--line);
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--shadow);
  font: 900 15px/1 Arial, Helvetica, sans-serif;
  text-decoration: none;
  padding: 13px 18px;
  cursor: pointer;
}

.card {
  border: 5px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 12px 12px 0 var(--shadow);
  padding: clamp(22px, 4vw, 42px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange-text);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.intro {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.challenge {
  display: grid;
  gap: 14px;
  border: 4px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--shadow);
  padding: 18px;
}

.challenge-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 190px);
  align-items: start;
  gap: 16px;
}

.challenge-header {
  display: grid;
  gap: 8px;
}

.challenge .eyebrow {
  margin-bottom: 0;
  font-size: 16px;
  letter-spacing: 0.11em;
}

.challenge-header strong {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  line-height: 0.96;
  overflow-wrap: anywhere;
}

.challenge-scene {
  justify-self: end;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--shadow);
}

.challenge-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.challenge-hint,
.challenge-status {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
  line-height: 1.4;
}

.challenge-hint {
  font-size: 16px;
}

.challenge-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.challenge-option {
  border: 3px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.challenge-option img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.challenge-option.is-selected {
  border-color: var(--orange);
  background: var(--paper);
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 5px rgba(255, 75, 26, 0.45), 1px 1px 0 var(--shadow);
  animation: challengeSelectionWobble 1.05s ease-in-out infinite;
}

@keyframes challengeSelectionWobble {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(255, 75, 26, 0.38), 1px 1px 0 var(--shadow);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(255, 75, 26, 0.18), 1px 1px 0 var(--shadow);
  }
}

.contact-success-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 36, 63, 0.74);
}

.contact-success-card {
  position: relative;
  width: min(560px, 100%);
  padding: clamp(24px, 5vw, 38px);
  border: 5px solid var(--line);
  border-radius: 22px;
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 12px 12px 0 1px var(--line);
}

.contact-success-card h2 {
  margin: 0 0 12px;
  font-size: clamp(36px, 7vw, 66px);
  line-height: 0.9;
}

.contact-success-card p {
  margin: 0 0 22px;
  max-width: 430px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.contact-success-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--line);
  box-shadow: 3px 3px 0 var(--line);
  font-size: 24px;
  line-height: 1;
}

.contact-success-nice {
  min-height: 54px;
  padding: 10px 22px;
  border: 5px solid var(--line);
  border-radius: 18px;
  background: var(--sea);
  color: var(--line);
  box-shadow: 0 0 0 1px var(--line), 5px 5px 0 1px var(--line);
  font: inherit;
  font-weight: 900;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 3px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: 800 16px/1.35 Arial, Helvetica, sans-serif;
  padding: 13px 14px;
}

textarea {
  min-height: 170px;
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible,
.back-link:focus-visible {
  outline: 4px solid rgba(255, 75, 26, 0.3);
  outline-offset: 3px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.form-status.success { color: #146b36; }
.form-status.error { color: #a92b16; }

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  font-weight: 900;
}

.footer-legal a {
  border-bottom: 3px solid var(--orange);
  text-decoration: none;
}

@media (max-width: 680px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .challenge-top {
    grid-template-columns: 1fr;
  }
  .challenge-scene {
    justify-self: start;
    width: min(170px, 52vw);
  }
  .challenge-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { box-shadow: 8px 8px 0 var(--shadow); }
}
