/* ============================================================
   SWC feedback: feedback.swcclt.com
   A more playful take on SWC. Light, graphic, chunky ink outlines
   and hard offset shadows, cream ground, SWC blue doing the shouting.
   DM Sans throughout. Nothing here is a pill.
   ============================================================ */

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dmsans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2074, U+20AC, U+2122;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dmsans-latin-ext.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC;
}

:root {
  --page: #fbf6ec;
  --page-2: #f5ecdd;
  --sheet: #ffffff;
  --ink: #191512;
  --ink-2: #3b332c;
  --muted: #6b625a;
  --line: rgba(25, 21, 18, 0.16);
  --line-soft: rgba(25, 21, 18, 0.08);
  --blue: #0084cc;
  --blue-vivid: #009de6;
  --blue-text: #0271a9;
  --blue-wash: #dceffb;
  --sun: #e2a02f;
  --sun-wash: #fbf0d8;
  --ok: #1c7a4a;
  --ok-wash: #e7f4ec;
  --warn: #a63a24;
  --warn-wash: #fdece7;
  --r: 12px;
  --r-sm: 10px;
  --r-xs: 8px;
  --pad: clamp(18px, 4vw, 40px);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

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

/* several blocks below are flex or grid, which would otherwise beat [hidden] */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(70% 45% at 88% -8%, var(--blue-wash), transparent 70%),
    radial-gradient(55% 40% at -10% 12%, var(--sun-wash), transparent 70%),
    var(--page);
  background-attachment: scroll; /* never fixed: iOS Safari mangles it */
}

img { max-width: 100%; display: block; }
a { color: var(--blue-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

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

.wrap {
  max-width: 660px;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  position: relative;
  z-index: 1;
}

.plus { color: var(--blue); font-style: normal; }

/* ---------- icons: drawn glyphs, never emoji ---------- */

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-xl { width: 40px; height: 40px; stroke-width: 1.7; }

/* ---------- entrances ---------- */

.rise { opacity: 0; transform: translateY(14px); animation: rise-in 0.62s var(--ease-out) var(--d, 0s) forwards; }
@keyframes rise-in { to { opacity: 1; transform: none; } }

/* ---------- header ---------- */

.top { padding: calc(20px + env(safe-area-inset-top)) 0 4px; }
.top-inner { display: flex; align-items: center; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo-badge {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  transition: transform 0.35s var(--ease-spring);
}
.brand:hover .logo-badge { transform: rotate(-6deg) scale(1.04); }
.brand-name { font-weight: 700; font-size: 0.88rem; line-height: 1.16; }

/* ---------- hero ---------- */

.hero { padding: 24px 0 22px; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-text);
  margin-bottom: 10px;
}

.display {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.92;
  font-size: clamp(2.6rem, 12vw, 4.4rem);
}

.stamp {
  display: inline-block;
  margin: 16px 0 4px;
  padding: 5px 14px 6px;
  border: 3px solid var(--sun);
  border-radius: var(--r);
  color: var(--sun);
  font-weight: 700;
  font-size: clamp(0.85rem, 3.4vw, 1.05rem);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transform: rotate(-4deg) scale(2.6);
  opacity: 0;
  animation: slam 0.5s var(--ease-out) 0.9s forwards;
}
@keyframes slam {
  0%   { transform: rotate(-4deg) scale(2.6); opacity: 0; }
  55%  { transform: rotate(-4deg) scale(0.93); opacity: 1; }
  75%  { transform: rotate(-6deg) scale(1.05); }
  100% { transform: rotate(-4deg) scale(1); opacity: 1; }
}

.lede {
  color: var(--ink-2);
  font-size: clamp(1rem, 1.1vw + 0.88rem, 1.16rem);
  max-width: 46ch;
  margin-top: 16px;
}


/* ---------- the card: chunky outline, hard blue shadow ---------- */

.card {
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--blue);
  padding: clamp(20px, 4.5vw, 32px);
  margin-top: 12px;
}

.card-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-title.big {
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 8px;
}

/* ---------- fields ---------- */

form { margin-top: 18px; }
.field { margin-bottom: 20px; }

label, .label-ish {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin-bottom: 7px;
}

.opt {
  font-weight: 500;
  font-size: 0.76rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px; /* a tiny chip, the only full-round shape on the page */
  padding: 1px 8px;
  margin-left: 5px;
  vertical-align: 1px;
  white-space: nowrap;
}
.opt.need { color: var(--blue-text); border-color: var(--blue); }

input[type="text"],
input[type="email"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px; /* iOS: anything under 16px zooms the page on focus */
  line-height: 1.5;
  color: var(--ink);
  background: var(--sheet);
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s var(--ease-spring);
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 156px; }

input::placeholder, textarea::placeholder { color: #a49b92; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 132, 204, 0.15);
}

input.invalid, textarea.invalid {
  border-color: var(--warn);
  box-shadow: 0 0 0 4px rgba(166, 58, 36, 0.13);
  animation: shake 0.36s var(--ease-out);
}
@keyframes shake {
  20% { transform: translateX(-6px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
  100% { transform: none; }
}

.hint {
  margin-top: 7px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hint.near { color: var(--warn); font-weight: 600; }

/* ---------- the contact checkbox ---------- */

.check {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 0;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.98rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.check:hover { border-color: var(--blue); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 26px; height: 26px; flex: none;
  border: 2px solid var(--ink);
  border-radius: var(--r-xs);
  background: var(--sheet);
  display: grid;
  place-items: center;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.3s var(--ease-spring);
}
.check .check-mark {
  width: 17px; height: 17px;
  color: #fff;
  stroke-width: 3;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.3s var(--ease-out) 0.05s;
}
.check input:checked ~ .box { background: var(--blue); border-color: var(--blue); transform: scale(1.06) rotate(-4deg); }
.check input:checked ~ .box .check-mark { stroke-dashoffset: 0; }
.check input:focus-visible ~ .box { box-shadow: 0 0 0 4px rgba(0, 132, 204, 0.2); }
.check-text { line-height: 1.3; }
.check:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }

.reveal {
  margin-top: 12px;
  animation: unfold 0.4s var(--ease-out);
  overflow: hidden;
}
@keyframes unfold {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; }
  to   { opacity: 1; transform: none; max-height: 200px; }
}

/* ---------- extra questions from the admin panel ---------- */

.extras {
  margin: 4px 0 20px;
  padding: 18px 16px 4px;
  border: 2px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--page);
}
.extras-head {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.select-shell { position: relative; }
.select-shell select { padding-right: 42px; cursor: pointer; }
.select-caret {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* five across at every width: wrapping a 1 to 5 scale onto two rows reads as
   two different questions */
.rating { display: flex; gap: 8px; }
.rating button {
  flex: 1 1 0; min-width: 0; max-width: 64px; height: 48px;
  border: 2px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--sheet);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.22s var(--ease-spring), background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.rating button:hover { border-color: var(--blue); transform: translateY(-3px); }
.rating button[aria-pressed="true"] {
  background: var(--blue); border-color: var(--ink); color: #fff;
  transform: translateY(-3px) rotate(-3deg);
}

/* 0 to 10 in one row: eleven buttons share the width, tighter on a phone */
.rating.nps { gap: 6px; }
.rating.nps button { height: 44px; font-size: 0.92rem; }
.scale-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}
@media (max-width: 480px) {
  .rating.nps { gap: 3px; }
  .rating.nps button { font-size: 0.84rem; border-width: 1.5px; }
}

/* honeypot: off screen, never keyboard reachable */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- buttons ---------- */

.actions { margin-top: 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.92em 1.7em;
  border: 2px solid var(--ink);
  border-radius: var(--r); /* rounded rectangle, never a pill */
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.005em;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.14s var(--ease-out), box-shadow 0.14s var(--ease-out), background 0.2s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-solid { background: var(--blue); color: #fff; }
.btn-solid:hover { background: var(--blue-vivid); }
.btn-solid:disabled {
  background: #9dc4d9; cursor: default;
  transform: none; box-shadow: 4px 4px 0 var(--line);
  border-color: var(--line);
}
.btn-ghost { background: var(--sheet); color: var(--ink); }
.btn-ghost:hover { background: var(--page-2); }
.btn-icon { width: 18px; height: 18px; stroke-width: 2.4; transition: transform 0.22s var(--ease-spring); }
.btn:hover .btn-icon { transform: translateX(3px); }

/* ---------- inline status: never a browser dialog ---------- */

.status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 2px solid; /* all four sides, never a single accent edge */
  border-radius: var(--r-sm);
  font-size: 0.93rem;
  line-height: 1.45;
  font-weight: 500;
  animation: pop-in 0.32s var(--ease-spring);
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}
.status.is-error { background: var(--warn-wash); border-color: var(--warn); color: var(--warn); }
.status.is-ok { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }

/* ---------- the receipt ---------- */

.receipt { position: relative; text-align: center; overflow: hidden; }
.receipt .ok-mark { color: var(--ok); margin: 4px auto 0; }
.receipt-body { color: var(--ink-2); margin-top: 8px; max-width: 40ch; margin-left: auto; margin-right: auto; }
.receipt .btn { margin-top: 4px; }

.tear {
  position: relative;
  height: 2px;
  margin: 22px -32px 14px;
  background: repeating-linear-gradient(to right,
    var(--line) 0 9px, transparent 9px 18px);
}
/* No notch circles: the card clips its overflow so the burst stays inside,
   which would slice them in half anyway. The dashed rule carries the idea. */

.receipt-meta {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.burst { position: absolute; inset: 0; pointer-events: none; }
.burst span {
  position: absolute;
  top: 46px; left: 50%;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--blue);
  opacity: 0;
  animation: spark 0.85s var(--ease-out) forwards;
}
.burst span:nth-child(even) { background: var(--sun); }
.burst span:nth-child(3n) { background: var(--ok); }
@keyframes spark {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1) rotate(220deg); }
}

/* ---------- footer ---------- */

.foot {
  padding: 26px 0 calc(32px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* ---------- calm it all down when asked ---------- */

@media (prefers-reduced-motion: reduce) {
  .rise, .stamp, .status, .burst span, .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  * { transition-duration: 0.01ms !important; }
}
