/* masht.ai coming soon (#914, D120): the v2a "Thought Balloon" world from
   DESIGN.md, with self-hosted OFL fonts and no third-party requests. */

@font-face {
  font-family: "Lilita One";
  src: url("/fonts/LilitaOne.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-warm: #fff6da;
  --ink: #151412;
  --ink-2: #3e3a33;
  --sun: #eac361;
  --sun-deep: #d9a93a;
  --halftone: #c9922a;
  --pop: #ff4a1c;
  --action: #d93a0e;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 18px/1.55 Figtree, system-ui, sans-serif;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--paper); padding: 8px 14px; }

.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }

/* The sun Ben-Day field behind the header and hero, closed by a 4px ink rule. */
.field {
  background: var(--sun) radial-gradient(var(--sun-deep) 1.5px, transparent 1.8px) 0 0 / 12px 12px;
  border-bottom: 4px solid var(--ink);
}

/* One screen on desktop: the sun field fills it, the footer closes it. */
body { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; }
.field { display: flex; flex-direction: column; }

.header { height: 76px; display: flex; align-items: center; flex: none; }
.wordmark {
  font: 900 32px/1 Figtree, system-ui, sans-serif;
  letter-spacing: -.05em;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: 8px 0 48px;
}
.hero-copy { max-width: 560px; }

.badge {
  display: inline-block;
  margin: 0 0 22px;
  padding: 9px 18px;
  background: var(--paper);
  border: solid var(--ink);
  border-width: 3px 5px 5px 3px;
  border-radius: 999px;
  font: 900 15px/1 Figtree, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font: 400 clamp(2.7rem, 5.6vw, 5.4rem)/.94 "Lilita One", system-ui, sans-serif;
  letter-spacing: -.005em;
}
.pop { color: var(--pop); }
.lede { margin: 26px 0 0; max-width: 32ch; font: 600 21px/1.5 Figtree, system-ui, sans-serif; }

/* The story: your photo -> your design (in the thought balloon) -> on your tee. */
.story { position: relative; margin: 0; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0 0 30px;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: clamp(10px, 2.4vw, 34px);
}
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: pop .55s var(--spring) both; }
.step:nth-child(2) { animation-delay: .25s; }
.step:nth-child(3) { animation-delay: .5s; }
.cap { font: 400 clamp(1rem, 1.9vw, 1.55rem)/1 "Lilita One", system-ui, sans-serif; white-space: nowrap; }

/* Trail dots between the steps (the balloon's thought trail, DESIGN.md). */
.step + .step::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(10px, 2.4vw, 34px) / 2 - 9px);
  top: 42%;
  width: 18px;
  height: 18px;
  border: solid var(--ink);
  border-width: 3px 4px 4px 3px;
  border-radius: 50%;
  background: var(--paper);
}

.snap {
  width: 100%;
  background: var(--paper);
  padding: 6% 6% 18%;
  border: solid var(--ink);
  border-width: 3px 5px 5px 3px;
  transform: rotate(-4deg);
}
.snap img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.cloud { position: relative; width: 100%; aspect-ratio: 400 / 330; display: grid; place-items: center; }
.cloud svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cloud .outline { fill: var(--paper); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.cloud img { position: relative; width: 58%; }

.panel {
  width: 100%;
  background: var(--paper);
  border: solid var(--ink);
  border-width: 3px 5px 5px 3px;
  border-radius: 14px;
  overflow: hidden;
  transform: rotate(3deg);
}
.panel img { width: 100%; }

.label {
  position: absolute;
  right: 0;
  bottom: 0;
  font: 700 11px/1 Figtree, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* The footer: one calm line. */
.footer { background: var(--paper); padding: 18px 0 22px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.footer .wordmark { font-size: 24px; }
.footer p { margin: 0; color: var(--ink-2); font-size: 15px; }
.footer .legal { margin-left: auto; font-size: 13px; }

/* Privacy: a short notice in a dialog, opened by #privacy (no script needed). */
.sheet { display: none; }
.sheet:target {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
}
.sheet-backdrop { position: absolute; inset: 0; background: rgba(21, 20, 18, .5); }
.sheet-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: 26px 26px 22px;
  background: var(--paper);
  border: solid var(--ink);
  border-width: 3px 5px 5px 3px;
  border-radius: 14px;
  font-size: 16px;
}
h2 { margin: 0 0 12px; font: 400 2.2rem/.95 "Lilita One", system-ui, sans-serif; }
.sheet-card p { margin: 0 0 12px; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px !important; }
.sheet-actions .btn { display: inline-flex; align-items: center; text-decoration: none; }

/* Buttons (DESIGN.md): pills with a 4px ink border. */
.btn, .link {
  font: 800 18px/1 Figtree, system-ui, sans-serif;
  color: var(--ink);
  cursor: pointer;
}
.btn {
  height: 52px;
  padding: 0 26px;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 999px;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--paper-warm); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.link { padding: 0; background: none; border: 0; font-size: 18px; text-decoration: underline; text-underline-offset: 3px; }

/* Consent notice: plain and calm (no balloons in consent content). */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  max-width: 560px;
  margin-inline: auto;
  padding: 20px 22px;
  background: var(--paper);
  border: solid var(--ink);
  border-width: 3px 5px 5px 3px;
  border-radius: 14px;
  box-shadow: 0 16px 26px -14px rgba(21, 20, 18, .55);
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 10px; }
.consent-title { font-weight: 900; }
.consent-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.consent-actions .btn { flex: 1 1 140px; }

@keyframes pop { from { transform: scale(.5); opacity: 0; } }

/* One breakpoint, 880px (DESIGN.md): the hero stacks; the three steps stay in a row, smaller. */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; align-items: start; gap: 28px; padding: 4px 0 28px; }
  .badge { margin-bottom: 16px; font-size: 13px; }
  h1 { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .lede { margin-top: 16px; font-size: 18px; }
  .steps { gap: 12px; padding-bottom: 24px; }
  .step { gap: 8px; }
  .step + .step::before { left: -15px; width: 12px; height: 12px; border-width: 2px 3px 3px 2px; }
  .cap { font-size: 1rem; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer .legal { margin-left: 0; }
}

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