/* =====================================================================
   WAYDAZ Studio one-pager
   Layout: a character studio's front desk. A dictionary entry for the
   name opens the page beside a character model sheet on graph paper;
   then the studio facts, the character roster and the contact desk.
   Same thick ink frames as RAWRK so the two sites read as one family;
   WAYDAZ gets its own colour (studio cobalt) and an extra-wide typeface.
   ===================================================================== */

:root {
  --paper: #f3f4f0;
  --white: #ffffff;
  --ink: #111312;
  --muted: #4a4f4b;
  --cobalt: #2340e8;
  --cobalt-deep: #1a2fb0;
  --cobalt-soft: #dfe5ff;
  --grid-line: #c9d3ff;
  --rawrk-green: #2b7732;
  --rawrk-belly: #dbf952;
  --rawrk-burst: #ffe94d;
  --rawrk-burst-soft: #fff6ad;

  --f-display: "Anybody", "Arial Black", "Helvetica Neue", sans-serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-doc: "Courier Prime", "Courier New", ui-monospace, monospace;

  --fs-h1: clamp(1.7rem, 1.15rem + 2.3vw, 2.9rem);
  --fs-h2: clamp(1.7rem, 1.2rem + 2.1vw, 2.8rem);
  --fs-body: 1.0625rem;

  --frame: 3px;
  --r: 8px;
  --hard: 5px 5px 0 var(--ink);
  --wrap: 1180px;
  --section-y: clamp(64px, 9vw, 120px);

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.55 var(--f-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 64px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white);
  padding: 10px 14px; border-radius: var(--r); font-weight: 700;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0.75em 1.35em;
  font: 700 1.0625rem/1.1 var(--f-body);
  text-decoration: none; color: var(--ink); background: var(--white);
  border: var(--frame) solid var(--ink); border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--primary { background: var(--cobalt); color: var(--white); }
.btn--primary:hover { background: var(--cobalt-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- nav ---------- */
.wd-nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: var(--paper);
  border-bottom: var(--frame) solid var(--ink);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 41; background: var(--paper);
}
.wd-nav__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wd-logo {
  font: 900 1.45rem/1 var(--f-display);
  font-stretch: 150%;
  font-variation-settings: "wdth" 150;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding-block: 10px;
}
.wd-nav__links { display: none; gap: 28px; list-style: none; margin: 0; padding: 0; font-weight: 600; }
.wd-nav__links a {
  display: inline-block; padding-block: 12px; text-decoration: none;
  background: linear-gradient(var(--ink), var(--ink)) left 75% / 0 2px no-repeat;
  transition: background-size 0.2s ease;
}
.wd-nav__links a:hover { background-size: 100% 2px; }
.wd-nav .btn { min-height: 44px; padding: 0.55em 1em; font-size: 0.95rem; box-shadow: 3px 3px 0 var(--ink); }
@media (min-width: 900px) { .wd-nav__links { display: flex; } }

/* ---------- hero ---------- */
.wd-hero {
  background: var(--cobalt);
  border-bottom: var(--frame) solid var(--ink);
  padding-block: 20px 48px;
}
.wd-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: stretch; }
.wd-entry {
  background: var(--white);
  border: var(--frame) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--hard);
  padding: 22px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-content: start;
  min-width: 0;
  container-type: inline-size;
}
.wd-entry__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.wd-word {
  font: 900 clamp(2.3rem, 0.85rem + 8.4vw, 5.6rem)/0.9 var(--f-display);
  font-size: min(14.2cqi, 5.6rem); /* "WAYDAZ" is ~6.7em wide: always fits its card */
  font-stretch: 150%;
  font-variation-settings: "wdth" 150;
  letter-spacing: -0.02em;
}
.wd-say { font: 400 1.05rem/1.3 var(--f-doc); color: var(--muted); }
.wd-say i { font-style: italic; }
.wd-defs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: def; }
.wd-defs li { display: grid; grid-template-columns: 1.6em 1fr; gap: 6px; align-items: baseline; counter-increment: def; }
.wd-defs li::before { content: counter(def) "."; font: 700 1rem/1 var(--f-doc); color: var(--cobalt); }
.wd-defs h1 { font-size: var(--fs-h1); }
.wd-defs p { font-size: 1.05rem; }
.wd-defs .wd-tagline { font: 700 1.15rem/1.3 var(--f-doc); }
.wd-entry .actions { margin-top: 4px; }
.wd-entry .actions .btn { flex: 1 1 200px; }

.wd-sheet {
  position: relative;
  background-color: var(--white);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  border: var(--frame) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--hard);
  padding: 52px 16px 16px;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
}
.wd-sheet__label {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 14px;
  background: var(--white);
  border-bottom: 2px solid var(--ink);
  font: 700 0.85rem/1.2 var(--f-doc);
}
.wd-sheet img { width: min(100%, 560px); }
.wd-sheet__views {
  display: grid; grid-template-columns: repeat(3, 1fr);
  width: min(100%, 560px);
  margin-top: 6px;
  font: 700 0.78rem/1.2 var(--f-doc);
  text-align: center;
  color: var(--muted);
}

@media (min-width: 900px) {
  .wd-hero { padding-block: 56px 72px; }
  .wd-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
  .wd-entry { padding: 36px 34px; gap: 20px; }
  .wd-sheet { padding: 64px 28px 28px; }
}

/* ---------- section heads ---------- */
.wd-section { padding-block: var(--section-y); }
.wd-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.wd-head h2 { font-size: var(--fs-h2); }
.wd-head p { font-size: 1.08rem; color: var(--muted); max-width: 38em; }

/* ---------- about ---------- */
.wd-about__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.wd-about__text { display: grid; gap: 16px; max-width: 36em; font-size: 1.1rem; }
.wd-facts {
  margin: 0;
  background: var(--white);
  border: var(--frame) solid var(--ink);
  border-radius: var(--r);
  font-family: var(--f-doc);
}
.wd-facts div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 14px 16px;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--ink);
}
.wd-facts div:last-child { border-bottom: 0; }
.wd-facts dt { color: var(--muted); }
.wd-facts dd { margin: 0; font-weight: 700; }
@media (min-width: 900px) {
  .wd-about__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: start; }
}

/* ---------- characters ---------- */
.wd-chars { background: var(--white); border-block: var(--frame) solid var(--ink); }
.wd-roster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.wd-card {
  border: var(--frame) solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  display: grid;
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wd-card--rawrk:hover { transform: translateY(-2px); box-shadow: 6px 6px 0 var(--ink); }
.wd-card__art {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  overflow: hidden;
  border-bottom: var(--frame) solid var(--ink);
  background: repeating-conic-gradient(from -3deg at 42% 62%, var(--rawrk-burst) 0deg 7deg, var(--rawrk-burst-soft) 7deg 14deg);
}
.wd-card__art img {
  position: absolute; left: 50%; bottom: 4%;
  height: 92%; width: auto;
  transform: translateX(-50%);
  transition: transform 0.4s ease;
}
.wd-card--rawrk:hover .wd-card__art img { transform: translateX(-50%) scale(1.03); }
.wd-card__body { padding: 20px 18px 22px; display: grid; gap: 12px; justify-items: start; }
.wd-card__body .wordmark { height: 40px; width: auto; }
.wd-card__body p { max-width: 34em; }
.wd-meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.wd-meta li {
  padding: 5px 11px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
}
.wd-meta li.is-green { background: var(--rawrk-belly); }

.wd-card--next {
  border-style: dashed;
  background: var(--paper);
  align-content: start;
}
.wd-card--next .wd-card__art {
  background: var(--paper);
  border-bottom-style: dashed;
  display: grid;
  place-items: center;
}
.wd-slot {
  width: 42%;
  max-width: 160px;
  aspect-ratio: 4 / 5;
  border: var(--frame) dashed var(--ink);
  border-radius: 22px 22px 10px 10px;
  background: var(--white);
  display: grid;
  place-items: center;
}
.wd-slot span {
  font: 900 4.2rem/1 var(--f-display);
  color: var(--cobalt);
}
.wd-card--next h3 { font-size: 1.45rem; }
.wd-card--next p { color: var(--muted); }

@media (min-width: 900px) {
  .wd-roster { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; }
  .wd-card--rawrk { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .wd-card--rawrk .wd-card__art { aspect-ratio: auto; min-height: 420px; border-bottom: 0; border-right: var(--frame) solid var(--ink); }
  .wd-card__body { padding: 32px 28px; align-content: center; }
  .wd-card--next .wd-card__art { aspect-ratio: auto; height: 260px; }
}

/* ---------- work with us ---------- */
.wd-desk { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.wd-desk li {
  background: var(--white);
  border: var(--frame) solid var(--ink);
  border-radius: var(--r);
  padding: 22px 18px;
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: start;
}
.wd-desk h3 { font-size: 1.4rem; }
.wd-desk p { color: var(--muted); max-width: 30em; }
.wd-desk .btn { margin-top: 8px; }
.wd-inbox {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 16px 18px;
  background: var(--cobalt-soft);
  border: var(--frame) solid var(--ink);
  border-radius: var(--r);
}
.wd-inbox code {
  font: 700 1.08rem/1.3 var(--f-doc);
  user-select: all;
  word-break: break-all;
}
.wd-copy {
  min-height: 44px;
  padding: 0.4em 0.9em;
  font: 700 0.92rem/1 var(--f-body);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  cursor: pointer;
  transition: transform 0.14s ease;
}
.wd-copy:hover { transform: translateY(-1px); }
.wd-copy:active { transform: translateY(1px); }
.wd-copy-status { font-size: 0.9rem; font-weight: 600; }
@media (min-width: 900px) {
  .wd-desk { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .wd-desk li { padding: 28px 24px; }
}

/* ---------- footer ---------- */
.wd-footer { background: var(--ink); color: #e8eae6; padding-block: 48px calc(36px + env(safe-area-inset-bottom, 0px)); }
.wd-footer__grid { display: grid; gap: 24px; }
.wd-footer .wd-logo { color: var(--white); font-size: 1.8rem; display: inline-block; }
.wd-footer p { color: #b9bdb7; font-size: 0.92rem; max-width: 34em; }
.wd-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.wd-footer ul a {
  display: inline-block; padding-block: 10px; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left 80% / 0 1.5px no-repeat;
  transition: background-size 0.2s ease;
}
.wd-footer ul a:hover { background-size: 100% 1.5px; }
.wd-footer__legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid #333733; font-size: 0.82rem; color: #9da29b; display: grid; gap: 4px; }
@media (min-width: 900px) {
  .wd-footer__grid { grid-template-columns: 1fr auto; align-items: end; }
}

/* ---------- hero entrance (once, on load) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-enter] { animation: wd-rise 0.6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--d, 0) * 110ms); }
  .js .wd-word { animation: wd-daze 1.1s cubic-bezier(.3,1.3,.5,1) 0.1s both; display: inline-block; }
}
@keyframes wd-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wd-daze {
  0% { opacity: 0; transform: translateX(-10px) skewX(-8deg); filter: blur(3px); }
  45% { opacity: 1; transform: translateX(6px) skewX(4deg); filter: blur(0); }
  70% { transform: translateX(-3px) skewX(-2deg); }
  100% { transform: none; }
}

/* ---------- owner helper: add #todo to the URL to outline every placeholder ---------- */
.show-todo [data-todo] { outline: 3px dashed #d8261c !important; outline-offset: 3px; position: relative; }
.show-todo [data-todo]::after {
  content: "TODO: " attr(data-todo);
  position: absolute; left: 0; top: 100%; z-index: 60; margin-top: 6px;
  padding: 4px 8px; background: #d8261c; color: #fff;
  font: 700 12px/1.3 var(--f-body); border-radius: 4px;
  width: max-content; max-width: 260px;
}
