/* ============================================================
   book.wag.watch — request form and the BOOKED! takeover
   ============================================================ */

:root {
  --ink: #0E0E0E;
  --ink-soft: #4A4A4A;
  --ink-faint: #8A8A8A;
  --bone: #EFEFEF;
  --paper: #FFFFFF;
  --line: rgba(0,0,0,.16);
  --line-dark: rgba(255,255,255,.20);
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --pad: clamp(22px, 5vw, 72px);
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --slam: cubic-bezier(.2,1.5,.4,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.035em; line-height: .92; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

body::after {
  position: fixed; z-index: 999; inset: 0; opacity: .035; pointer-events: none; content: '';
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.layout { display: grid; grid-template-columns: .82fr 1.18fr; min-height: 100vh; }

/* ---- Left rail ---- */
.rail { display: flex; flex-direction: column; gap: 32px; padding: clamp(30px, 4vw, 56px) var(--pad); background: var(--ink); color: var(--bone); }
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand .mark {
  display: block; flex: none; width: 44px; height: 44px; background: currentColor;
  -webkit-mask: url('/images/wag-mark.png') center / contain no-repeat;
  mask: url('/images/wag-mark.png') center / contain no-repeat;
}
.brand-type { display: grid; line-height: 1; }
.brand-type b { font-family: var(--serif); font-size: 25px; font-weight: 400; }
.brand-type small { margin-top: 6px; font-size: 8px; font-weight: 600; letter-spacing: .21em; text-transform: uppercase; opacity: .6; }
.rail h1 { font-size: clamp(36px, 4.4vw, 62px); letter-spacing: -.05em; line-height: .88; text-transform: uppercase; }
.rail h1 em { text-transform: none; letter-spacing: -.02em; }
.rail > p { max-width: 38ch; margin: 0; color: rgba(255,255,255,.72); }
.ready { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-dark); }
.ready li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); font-size: 14.5px; }
.ready b { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.ready span { color: rgba(255,255,255,.72); }
.rail-foot { margin-top: auto; display: grid; gap: 8px; font-size: 14px; }
.rail-foot a { width: fit-content; border-bottom: 1px solid rgba(255,255,255,.4); }
.rail-foot a:hover { border-color: currentColor; }
.rail-foot span { color: rgba(255,255,255,.5); font-size: 12.5px; }

/* ---- Form ---- */
.panel { padding: clamp(34px, 4.5vw, 68px) var(--pad); }
.panel > header { margin-bottom: 34px; }
.panel h2 { font-size: clamp(28px, 3vw, 42px); }
.panel > header p { max-width: 52ch; margin: 12px 0 0; color: var(--ink-soft); font-size: 15px; }
fieldset { margin: 0 0 30px; padding: 0; border: 0; border-top: 2px solid var(--ink); }
legend { padding: 16px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; margin-top: 18px; }
.field { display: grid; gap: 7px; }
.field.wide { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
label .opt { color: var(--ink-soft); font-weight: 600; letter-spacing: .04em; text-transform: none; }
input, select, textarea {
  width: 100%; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 15px;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
textarea { min-height: 108px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-faint); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); background: var(--bone); outline: none; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 13px) 21px;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.hint { color: var(--ink-soft); font-size: 12.5px; }
.field.check label { display: flex; align-items: flex-start; gap: 11px; font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.45; cursor: pointer; }
.field.check input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 17px 28px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.cta::after { content: '\2192'; transition: transform 260ms var(--ease-out); }
.cta:hover:not(:disabled)::after { transform: translateX(6px); }
.cta:disabled { opacity: .45; cursor: progress; }
.cta-ghost { background: none; color: var(--ink); }
.cta-ghost:hover { background: var(--ink); color: var(--paper); }
.actions .note { color: var(--ink-soft); font-size: 13px; }
.actions .note a { border-bottom: 1px solid currentColor; }
.status { margin-top: 16px; font-size: 14px; font-weight: 600; }
.status[data-tone='error'] { padding-left: 12px; border-left: 3px solid var(--ink); }

/* ---- Wagging dog ---- */
.wag-dog { width: 100%; max-width: 300px; height: auto; fill: currentColor; }
.wag-dog-eye { fill: var(--paper); }
.wag-dog-ear { fill: currentColor; stroke: var(--paper); stroke-width: 5; stroke-linejoin: round; }
.booked .wag-dog-eye { fill: var(--ink); }
.booked .wag-dog-ear { stroke: var(--ink); }
.wag-dog-tail { transform-origin: 82px 122px; animation: wag 2.9s cubic-bezier(.45,0,.55,1) infinite alternate; }
@keyframes wag { from { transform: rotate(-15deg); } to { transform: rotate(16deg); } }

/* ---- 404 ---- */
.notfound { display: grid; place-items: center; min-height: 100vh; padding: var(--pad); text-align: center; }
.notfound .wag-dog { max-width: 340px; margin: 0 auto 26px; }
.notfound h1 { font-size: clamp(40px, 7vw, 88px); letter-spacing: -.05em; text-transform: uppercase; }
.notfound h1 em { text-transform: none; }
.notfound p { max-width: 42ch; margin: 16px auto 28px; color: var(--ink-soft); }

/* ============================================================
   BOOKED! — the takeover after a successful submit
   ============================================================ */
.booked {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: none;
  place-items: center;
  padding: clamp(28px, 5vh, 64px) var(--pad);
  background: var(--ink);
  color: var(--bone);
  overflow: auto;
}
.is-booked .booked { display: grid; }
.is-booked .layout { display: none; }

.booked-inner { display: grid; gap: clamp(22px, 3vw, 40px); width: min(1180px, 100%); }
.booked-head { display: grid; justify-items: start; }
.booked-head .eyebrow { margin-bottom: 14px; color: rgba(255,255,255,.6); animation: fade-up 600ms var(--ease-out) both; }
.booked-body { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(28px, 5vw, 70px); }

.booked-art { position: relative; display: grid; justify-items: center; }
.booked-art .wag-dog { max-width: min(300px, 62vw); fill: var(--bone); animation: dog-in 700ms var(--ease-out) both; animation-delay: 620ms; }
@keyframes dog-in { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }

/* Rubber stamp, slammed on at an angle. */
.stamp {
  position: absolute;
  right: -4%; bottom: 2%;
  display: grid; place-items: center; gap: 2px;
  width: clamp(118px, 15vw, 168px); height: clamp(118px, 15vw, 168px);
  border: 3px solid var(--bone); border-radius: 50%;
  color: var(--bone); text-align: center;
  font-size: clamp(9px, 1vw, 11px); font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(-14deg);
  animation: stamp-in 520ms var(--slam) both;
  animation-delay: 900ms;
}
.stamp b { display: block; font-family: var(--serif); font-size: clamp(19px, 2.2vw, 26px); font-weight: 400; letter-spacing: -.01em; text-transform: none; }
.stamp i { display: block; width: 42%; height: 1px; margin: 4px 0; background: currentColor; font-style: normal; }
@keyframes stamp-in {
  from { opacity: 0; transform: rotate(-14deg) scale(2.4); }
  to { opacity: 1; transform: rotate(-14deg) scale(1); }
}

.booked-copy { display: grid; align-content: center; }

/* Each letter of BOOKED! drops in on its own beat. */
.booked-word { display: flex; flex-wrap: nowrap; margin: 0; font-size: clamp(54px, 15vw, 240px); font-weight: 900; letter-spacing: -.055em; line-height: .84; text-transform: uppercase; white-space: nowrap; }
.booked-word span { display: inline-block; animation: letter-in 520ms var(--slam) both; }
.booked-word span:nth-child(1) { animation-delay: 60ms; }
.booked-word span:nth-child(2) { animation-delay: 130ms; }
.booked-word span:nth-child(3) { animation-delay: 200ms; }
.booked-word span:nth-child(4) { animation-delay: 270ms; }
.booked-word span:nth-child(5) { animation-delay: 340ms; }
.booked-word span:nth-child(6) { animation-delay: 410ms; }
.booked-word span:nth-child(7) { animation-delay: 500ms; }
@keyframes letter-in {
  from { opacity: 0; transform: translateY(-52px) scale(1.5) rotate(-7deg); }
  to { opacity: 1; transform: none; }
}

.booked-copy > p.lede { max-width: 46ch; margin: 0 0 26px; color: rgba(255,255,255,.74); font-size: clamp(15px, 1.3vw, 18px); animation: fade-up 620ms var(--ease-out) both; animation-delay: 700ms; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.ref {
  display: inline-flex; align-items: baseline; gap: 12px;
  padding: 13px 18px; margin-bottom: 30px;
  border: 1px solid var(--line-dark);
  animation: fade-up 620ms var(--ease-out) both; animation-delay: 780ms;
}
.ref small { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.ref b { font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; letter-spacing: .06em; }

.next { margin: 0 0 30px; padding: 0; list-style: none; animation: fade-up 620ms var(--ease-out) both; animation-delay: 860ms; }
.next li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-dark); font-size: 14.5px; color: rgba(255,255,255,.78); }
.next li:last-child { border-bottom: 1px solid var(--line-dark); }
.next b { font-family: var(--serif); font-size: 19px; font-weight: 400; color: var(--bone); }

.booked-actions { display: flex; flex-wrap: wrap; gap: 13px; animation: fade-up 620ms var(--ease-out) both; animation-delay: 940ms; }
.booked .cta { border-color: var(--bone); background: var(--bone); color: var(--ink); }
.booked .cta:hover { background: var(--paper); }
.booked .cta-ghost { background: none; color: var(--bone); border-color: rgba(255,255,255,.45); }
.booked .cta-ghost:hover { background: var(--bone); color: var(--ink); }

/* Monochrome confetti: plain flecks, no colour, no library. */
.flecks { position: absolute; inset: -10% -10% 40%; overflow: hidden; pointer-events: none; }
.flecks i {
  position: absolute; top: -12px;
  width: 7px; height: 12px;
  background: var(--bone);
  opacity: 0;
  animation: fall 2.6s cubic-bezier(.35,.15,.5,1) forwards;
}
@keyframes fall {
  0% { opacity: 0; transform: translateY(-20px) rotate(0deg); }
  12% { opacity: .95; }
  100% { opacity: 0; transform: translateY(78vh) rotate(540deg); }
}

@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; min-height: 0; }
  .rail { gap: 26px; }
  .grid { grid-template-columns: 1fr; }
  .booked-body { grid-template-columns: 1fr; gap: 30px; }
  .booked-art { order: -1; }
  .stamp { right: 6%; bottom: -2%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .wag-dog-tail { transform: rotate(0deg); }
  .stamp { transform: rotate(-14deg); }
  .flecks { display: none; }
}
