:root {
  --cyan: #009ADD;
  --magenta: #EF0181;
  --yellow: #FFD93F;
  --black: #000000;
  --soft-blue: #D9F0FA;
  --soft-pink: #FDD9EC;
  --soft-yellow: #FFEC9F;
  --cream: #F5F1E8;
  --ink: #0F0F0F;
  --white: #FFFFFF;
  --error: #d40000;
  --error-bg: #ffe5ec;
  --success-bg: #c8f5ec;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background-color: var(--white);
  background-image: conic-gradient(var(--black) 90deg, var(--white) 90deg 180deg, var(--black) 180deg 270deg, var(--white) 270deg);
  background-size: 240px 240px;
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Honeypot — hidden anti-spam field */
.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  opacity: 0;
}

/* ============== Decorative shapes ============== */
.shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.shape { position: absolute; }
.shape--gradient   { background: linear-gradient(135deg, var(--cyan), var(--magenta), var(--yellow)); }
.shape--gradient-2 { background: linear-gradient(135deg, var(--magenta), var(--yellow)); }
.shape--gradient-3 { background: linear-gradient(135deg, var(--cyan), var(--magenta)); }

.s1  { background: var(--magenta);   width: 260px; height: 260px; top: -70px;          right: -60px; transform: rotate(-6deg); }
.s2  { background: var(--cyan);      width: 110px; height: 110px; top: 60px;           right: 10px;  transform: rotate(18deg); }
.s3  { background: var(--cyan);      width: 190px; height: 190px; top: 14%;            left: -10px;  transform: rotate(12deg); }
.s4  { background: var(--yellow);    width: 170px; height: 170px; top: 26%;            right: 0px;   transform: rotate(-10deg); }
.s5  { background: var(--ink);       width: 80px;  height: 80px;  top: calc(26% + 80px); right: 40px;  transform: rotate(22deg); }
.s6  {                               width: 210px; height: 210px; top: 38%;            left: -15px;  transform: rotate(-4deg); }
.s8  {                               width: 180px; height: 180px; top: 62%;            left: -5px;   transform: rotate(10deg); }
.s9  { background: var(--yellow);    width: 85px;  height: 85px;  top: calc(62% + 80px); left: 50px;   transform: rotate(-18deg); }
.s11 { background: var(--soft-blue); width: 190px; height: 190px; top: 86%;            left: -10px;  transform: rotate(-12deg); }
.s12 {                               width: 130px; height: 130px; bottom: -40px;       right: 8%;    transform: rotate(-8deg); }
.s17 { background: var(--magenta);   width: 95px;  height: 95px;  top: 33%;             left: -25px;  transform: rotate(-19deg); }
.s18 { background: var(--soft-blue); width: 150px; height: 150px; top: 41%;             right: -40px; transform: rotate(7deg); }
.s20 {                               width: 130px; height: 130px; top: 54%;             right: 20px;  transform: rotate(-13deg); }
.s21 { background: var(--cyan);      width: 100px; height: 100px; top: 60%;             left: -30px;  transform: rotate(16deg); }
.s22 { background: var(--yellow);    width: 80px;  height: 80px;  top: 66%;             right: -15px; transform: rotate(-27deg); }

/* ============== Hero ============== */
.hero {
  position: relative;
  z-index: 1;
  padding: 96px 6vw 48px;
  max-width: 1100px;
  margin: 20px auto 0;
  background: var(--white);
  border: 4px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
}

.hero__tag {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 28px;
  font-weight: 700;
}

.hero__title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 11vw, 144px);
  line-height: 0.85;
  margin: 0;
  letter-spacing: -0.025em;
}
.hero__title-line { display: block; }
.line-1 { color: var(--ink); }
.line-2 {
  color: var(--white);
  background: var(--magenta);
  display: inline-block;
  padding: 0 18px;
  margin: 8px 0;
  transform: rotate(-1.5deg);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.line-3 { color: var(--ink); }

.hero__sub {
  font-size: clamp(16px, 1.5vw, 19px);
  max-width: 620px;
  margin-top: 36px;
  line-height: 1.5;
}

/* ============== Main / blocks ============== */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 6vw 80px;
}

.block {
  position: relative;
  padding: 56px clamp(24px, 5vw, 64px) 48px;
  margin: 36px 0;
  border: 4px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
}

.block--pink   { background: var(--cyan);    color: var(--white); }
.block--yellow { background: var(--magenta); color: var(--white); }
.block--teal   { background: var(--yellow);  color: var(--ink); }
.block--white  { background: var(--white);   color: var(--ink); }
.block--dark   { background: var(--black);   color: var(--cream); }

.block__index {
  position: absolute;
  z-index: 2;
  top: -22px;
  left: -4px;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 900;
  background: var(--ink);
  color: var(--yellow);
  padding: 4px 14px;
  font-size: 22px;
  letter-spacing: 0.05em;
}

.block__title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 900;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}

.block__hint {
  font-size: 16px;
  margin: 0 0 32px;
  opacity: 0.9;
  line-height: 1.5;
}

.block__sticker {
  position: absolute;
  pointer-events: none;
  box-shadow: 6px 6px 0 var(--ink);
}
.block__sticker--a {
  top: -24px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta), var(--yellow));
  transform: rotate(10deg);
}
.block__sticker--g {
  top: -30px;
  right: -28px;
  width: 100px;
  height: 100px;
  background: var(--cyan);
  transform: rotate(15deg);
}
.block__sticker--h {
  bottom: -22px;
  right: 90px;
  width: 60px;
  height: 60px;
  background: var(--white);
  transform: rotate(-20deg);
}
.block__sticker--i {
  bottom: -20px;
  left: -18px;
  width: 70px;
  height: 70px;
  background: var(--yellow);
  transform: rotate(12deg);
}
.block__sticker--j {
  top: 44%;
  right: -25px;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta), var(--yellow));
  transform: rotate(-11deg);
}
.block__sticker--k {
  bottom: -55px;
  left: calc(50% - 60px);
  width: 100px;
  height: 100px;
  background: var(--magenta);
  transform: rotate(9deg);
  z-index: 1;
}
.block__sticker--l {
  bottom: -10px;
  left: calc(50% + 20px);
  width: 55px;
  height: 55px;
  background: var(--yellow);
  transform: rotate(-19deg);
  z-index: 1;
}

/* ============== Fields ============== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.field { display: block; }
.field--full { grid-column: 1 / -1; }
.field > span {
  display: block;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.field input {
  width: 100%;
  padding: 16px 18px;
  border: 3px solid var(--ink);
  background: var(--white);
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  outline: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border-radius: 0;
  -webkit-appearance: none;
}
.field input:focus {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
}
.field input:invalid:not(:placeholder-shown) {
  background: var(--error-bg);
  border-color: var(--error);
}

/* ============== Checkboxes ============== */
.check {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  padding: 14px 0;
}
.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.check__box {
  width: 36px;
  height: 36px;
  border: 4px solid var(--ink);
  background: var(--white);
  flex-shrink: 0;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 2px;
}
.check input:checked + .check__box::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--ink);
}
.check input:focus-visible + .check__box {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.check__label {
  font-size: 17px;
  line-height: 1.4;
  padding-top: 6px;
}

/* ============== Legal text panel ============== */
.legal {
  background: var(--cream);
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 24px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.legal p { margin: 0 0 14px; }
.legal:focus { outline: 3px solid var(--ink); outline-offset: 4px; }

/* ============== Photo / camera ============== */
/* Make sure the [hidden] attribute always wins over display rules below. */
[hidden] { display: none !important; }

.cam {
  margin-top: 8px;
}
.cam__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--cream);
  border: 4px solid var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cam__stage video,
.cam__stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cam__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(15, 15, 15, 0.55);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
  padding: 24px;
}
.cam__placeholder-icon {
  font-size: 64px;
  line-height: 1;
  color: var(--magenta);
}
.cam__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.cam__hint {
  font-size: 13px;
  margin-top: 14px;
  opacity: 0.7;
  line-height: 1.5;
}
.btn--accent {
  background: var(--magenta);
  color: var(--white);
  border-color: var(--ink);
}
.btn--accent:hover {
  box-shadow: 6px 6px 0 var(--ink);
}
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { box-shadow: 6px 6px 0 var(--ink); }

/* ============== Signature pad ============== */
.sig { margin-top: 28px; }
.sig__label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
#sigPad {
  width: 100%;
  height: 240px;
  background: var(--cream);
  border: 3px solid var(--cream);
  cursor: crosshair;
  display: block;
  touch-action: none;
}
.sig__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.sig__hint { font-size: 13px; opacity: 0.7; }

/* ============== Buttons ============== */
.btn {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 900;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  padding: 14px 24px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.05em;
  border-radius: 0;
  text-transform: uppercase;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--cream); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}
.btn--ghost:hover { box-shadow: 6px 6px 0 var(--cream); }

.btn--big {
  font-size: clamp(20px, 3vw, 28px);
  padding: 24px 56px;
  background: var(--magenta);
  color: var(--white);
  border-color: var(--ink);
}
.btn--big:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 var(--ink);
}

.actions {
  margin-top: 48px;
  text-align: center;
}

/* ============== Messages ============== */
.form-message {
  margin-top: 28px;
  padding: 22px 28px;
  border: 4px solid var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}
.form-message.success { background: var(--success-bg); color: var(--ink); }
.form-message.error   { background: var(--error-bg); color: #8a0000; }

/* ============== Footer ============== */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px 6vw;
  text-align: center;
  font-size: 13px;
  background: var(--ink);
  color: var(--cream);
}
.footer p { margin: 4px 0; }
.footer__small { opacity: 0.55; font-size: 11px; }

/* ============== Responsive ============== */
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
  .block { box-shadow: 6px 6px 0 var(--ink); padding: 40px 22px 32px; margin: 28px 0; }
  .hero { padding-top: 64px; }
  .line-2 { box-shadow: 5px 5px 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
