:root {
  --paper: #F5EEE0;
  --sheet: #FBF7EF;
  --ink: #2A231E;
  --ink-2: #5E5248;
  --ink-3: #8C7E71;
  --sienna: #B8582F;
  --ochre: #D29A3A;
  --ultra: #2E4E97;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --ease: cubic-bezier(.2, .9, .1, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.open { overflow: hidden; }

/* cold-press watercolor paper: embossed tooth */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .3; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.38' numOctaves='3' seed='5' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='1.1'%3E%3CfeDistantLight azimuth='45' elevation='58'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

/* soft color blooms in the corners of the sheet */
.blooms { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; mix-blend-mode: multiply; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- top ---------- */
.top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 40px;
}
.mark {
  font: italic 500 30px/1 var(--serif); font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -.01em; color: var(--ink); text-decoration: none;
}
.mark i { color: var(--sienna); font-style: normal; }
.meta { font: 500 22px/1 var(--hand); color: var(--ink-2); }

/* ---------- stage ---------- */
.stage { position: relative; z-index: 1; align-self: center; text-align: center; padding: 0 24px 34px; }
.fade { transition: opacity .5s ease, transform .6s var(--ease); }

.eyebrow {
  position: relative; display: inline-block;
  margin: 0 0 6px;
  font: 600 27px/1 var(--hand); color: var(--sienna);
  transform: rotate(-2deg);
}
.eyebrow svg { position: absolute; left: calc(100% + 6px); top: 6px; width: 54px; height: 40px; overflow: visible; }

h1 {
  margin: 0;
  font: 380 clamp(42px, 5.8vw, 88px)/1.02 var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  letter-spacing: -.02em;
}
h1 .line { display: block; }
h1 em { font-style: italic; font-weight: 400; }
.swash { position: relative; white-space: nowrap; z-index: 0; }
.swash svg { position: absolute; left: -5%; top: 34%; width: 110%; height: 62%; z-index: -1; overflow: visible; }

.eyes {
  display: flex; justify-content: center; gap: clamp(0px, 1vw, 16px);
  margin: .1em 0 .02em;
  transition: transform .9s var(--ease);
}
.eye { width: clamp(150px, 20.5vw, 310px); height: auto; overflow: visible; }
.eye.mirror { transform: scaleX(-1); }
.eyes .eye { animation: paint 1.4s .1s ease-out backwards; }
@keyframes paint { from { opacity: 0; filter: blur(6px); } }

.sub {
  max-width: 590px; margin: 22px auto 0;
  font: 400 clamp(18px, 1.5vw, 21px)/1.5 var(--serif); color: var(--ink-2);
  text-wrap: balance;
}

.cta-row { margin-top: 30px; display: flex; justify-content: center; align-items: center; gap: 26px; flex-wrap: wrap; }

/* hand-inked button with a watercolor wash */
.brush {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 20px 38px; border: 0; background: none; cursor: pointer;
  font: 600 19px/1 var(--serif); font-variation-settings: "SOFT" 100, "WONK" 0;
  color: #FBF7EF;
  transition: transform .3s var(--ease);
}
.brush svg { position: absolute; inset: -4px -6px; width: calc(100% + 12px); height: calc(100% + 8px); z-index: -1; overflow: visible; }
.brush .wash { fill: var(--ultra); opacity: .82; transition: opacity .3s ease; mix-blend-mode: multiply; }
.brush .edge { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.brush:hover { transform: rotate(-1.2deg) scale(1.03); }
.brush:hover .wash { opacity: .95; }
.brush:focus-visible { outline: 2px dashed var(--sienna); outline-offset: 6px; }
.brush .arr { font-family: var(--hand); font-size: 26px; font-weight: 600; transition: transform .3s var(--ease); }
.brush:hover .arr { transform: translateX(4px); }

.aside {
  position: relative; text-align: left;
  font: 500 22px/1.05 var(--hand); color: var(--ink-2);
  transform: rotate(-3deg);
}
.aside svg { position: absolute; right: calc(100% + 2px); top: 4px; width: 34px; height: 26px; overflow: visible; }

/* ---------- order sheet (slides in) ---------- */
.scrim { position: fixed; inset: 0; z-index: 10; opacity: 0; pointer-events: none; background: rgba(60, 45, 30, .18); transition: opacity .5s ease; }
.drawer {
  position: fixed; z-index: 20; top: 14px; right: 14px; bottom: 14px;
  width: min(470px, calc(100vw - 28px));
  filter: drop-shadow(0 30px 40px rgba(70, 50, 30, .25)) drop-shadow(0 2px 3px rgba(70, 50, 30, .15));
  transform: translateX(calc(100% + 40px)) rotate(2deg);
  visibility: hidden;
  transition: transform .8s var(--ease), visibility 0s .8s;
}
body.open .drawer { transform: rotate(-.6deg); visibility: visible; transition: transform .8s var(--ease); }
body.open .scrim { opacity: 1; pointer-events: auto; }
body.open .fade { opacity: 0; transform: translateY(10px); pointer-events: none; }

.sheet {
  height: 100%; display: flex; flex-direction: column; overflow-y: auto;
  padding: 30px 38px 28px;
  background: var(--sheet);
  /* deckled paper edge */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 470 1000' preserveAspectRatio='none'%3E%3Cfilter id='d' x='-5%25' y='-5%25' width='110%25' height='110%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.09' numOctaves='3' seed='3'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='9' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Crect x='6' y='6' width='458' height='988' rx='6' fill='%23000' filter='url(%23d)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 470 1000' preserveAspectRatio='none'%3E%3Cfilter id='d' x='-5%25' y='-5%25' width='110%25' height='110%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.09' numOctaves='3' seed='3'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='9' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Crect x='6' y='6' width='458' height='988' rx='6' fill='%23000' filter='url(%23d)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.d-head { display: flex; justify-content: space-between; align-items: center; }
.kick { font: 600 24px/1 var(--hand); color: var(--sienna); transform: rotate(-2deg); display: inline-block; }
.close { border: 0; background: none; cursor: pointer; width: 40px; height: 40px; padding: 6px; border-radius: 50%; transition: transform .3s var(--ease); }
.close:hover { transform: rotate(90deg); }
.close:focus-visible { outline: 2px dashed var(--sienna); outline-offset: 2px; }
.close svg { width: 100%; height: 100%; overflow: visible; }

.sheet h2 {
  margin: auto 0 8px; padding-top: 22px;
  font: 380 50px/.98 var(--serif); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; letter-spacing: -.02em;
}
.sheet h2 em { font-style: italic; }
.d-sub { margin: 0 0 22px; font: 400 16px/1.5 var(--serif); color: var(--ink-2); }

.f { display: block; margin-bottom: 14px; }
.f span { display: flex; justify-content: space-between; align-items: baseline; font: 600 22px/1.1 var(--hand); color: var(--ink); }
.f em { font-style: normal; font-weight: 500; font-size: 19px; color: var(--ink-3); }
.f input {
  width: 100%; margin-top: 2px; padding: 8px 2px 10px;
  font: 400 18px/1.3 var(--serif); color: var(--ink);
  background: transparent no-repeat left bottom / 100% 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5C60 3 120 6 190 4S330 2 399 5' fill='none' stroke='%232A231E' stroke-opacity='.35' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  border: 0; border-radius: 0;
}
.f input::placeholder { color: #B5A99A; font-style: italic; }
.f input:focus {
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5C60 3 120 6 190 4S330 2 399 5' fill='none' stroke='%23B8582F' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.sheet .brush { width: 100%; margin-top: 12px; }
.msg { margin: 12px 0 auto; text-align: center; font: 500 20px/1.2 var(--hand); color: var(--ink-3); }
.msg.bad { color: var(--sienna); }

@media (min-width: 901px) {
  .scrim { background: transparent; }
  body.open .eyes { transform: translateX(calc((min(470px, 100vw - 28px) + 28px) / -2)) scale(1.1); }
}

/* ---------- thanks ---------- */
.done { position: relative; z-index: 1; align-self: center; text-align: center; padding: 10px 24px 80px; }
.done h1 { font-size: clamp(64px, 10vw, 140px); margin-top: 6px; }
.done p { max-width: 520px; margin: 18px auto 0; font: 400 clamp(19px, 1.7vw, 22px)/1.5 var(--serif); color: var(--ink-2); text-wrap: balance; }
.done .small { margin-top: 14px; font: 500 22px/1.25 var(--hand); color: var(--ink-3); max-width: 460px; }

/* ---------- entrance ---------- */
.rise { animation: rise 1s var(--ease) var(--d, 0s) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .top { padding: 18px 20px; }
  .mark { font-size: 26px; }
  .meta { display: none; }
  .stage { padding: 14px 18px 30px; }
  .eyebrow { font-size: 24px; }
  .eyebrow svg { display: none; }
  h1 { font-size: clamp(40px, 11vw, 68px); line-height: 1.04; }
  .eye { width: 46vw; }
  .eyes { gap: 0; margin: .1em -8px 0; }
  .cta-row { flex-direction: column; gap: 22px; }
  .cta-row .brush { width: 100%; }
  .aside { text-align: center; transform: rotate(-2deg); }
  .aside svg { display: none; }
  .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(760px, calc(100svh - 16px)); transform: translateY(calc(100% + 30px)); }
  body.open .drawer { transform: none; }
  .sheet { padding: 24px 24px 22px; }
  .sheet h2 { font-size: 40px; padding-top: 14px; }
}

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