/* Padul Studios — padulstudios.com
   Layout: a sheet of watercolor paper. Asymmetric two-column hero with a live doodle pad,
   then quiet single-column sections. Real paint blobs float on top and can be tossed around.
   Single light theme on purpose: the site is paper. */

@font-face { font-family: "Crimson Pro"; src: url("fonts/crimson-pro-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("fonts/crimson-pro-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("fonts/crimson-pro-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("fonts/crimson-pro-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("fonts/playfair-display-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("fonts/playfair-display-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("fonts/patrick-hand-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* colour: paper, ink and the four paints from the book */
  --paper: #f8f6f2;
  --paper-deep: #efe9e0;
  --ink: #1f1d1b;
  --ink-soft: #57504a;
  --line: rgba(31, 29, 27, 0.16);
  --red: #c9434e;
  --teal: #2f7f89;
  --green: #6f9a35;
  --violet: #6b5b92;

  /* type */
  --display: "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Crimson Pro", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --hand: "Patrick Hand", "Comic Neue", "Bradley Hand", "Segoe Print", cursive;
  --round: "Fredoka", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;

  --step--1: clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-0: clamp(1.15rem, 1.1rem + 0.25vw, 1.3rem);
  --step-1: clamp(1.4rem, 1.3rem + 0.5vw, 1.7rem);
  --step-2: clamp(1.9rem, 1.6rem + 1.4vw, 2.8rem);
  --step-3: clamp(2.8rem, 2rem + 4vw, 5.6rem);

  --wrap: 1120px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper) url("img/paper.jpg") repeat;
  background-size: 520px;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 2px dashed var(--teal); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
p, li { text-wrap: pretty; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 18px;
  flex-wrap: wrap;
}
.logo { display: inline-block; line-height: 0; }
.logo img { width: 128px; height: auto; mix-blend-mode: multiply; transform: rotate(-3deg); }

.nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); flex-wrap: wrap; font-size: var(--step--1); }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.lang { display: inline-flex; gap: 2px; font-family: var(--hand); font-size: 1.1rem; }
.lang a, .lang span { padding: 2px 6px; border-radius: 40% 55% 45% 60%; }
.lang [aria-current] { background: var(--ink); color: var(--paper); }

/* ---------- hero ---------- */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(20px, 4vw, 56px) clamp(48px, 7vw, 96px);
}
.hero h1 {
  font-family: var(--display); font-weight: 900;
  font-size: var(--step-3); line-height: 0.92; letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero h1 .in-the {
  font-family: var(--hand); font-weight: 400; text-transform: uppercase;
  font-size: 0.42em; letter-spacing: 0.02em; line-height: 1;
  display: inline-block; transform: rotate(-6deg) translateY(-0.15em); margin-right: 0.12em;
}
.kicker { font-family: var(--hand); font-size: var(--step-1); color: var(--teal); margin-bottom: 10px; display: block; transform: rotate(-1.5deg); transform-origin: left; }
.lede { font-size: var(--step-1); line-height: 1.4; margin-top: 22px; max-width: 30ch; }
.small { font-size: var(--step--1); color: var(--ink-soft); margin-top: 14px; max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: var(--step-0);
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 12px 22px 13px;
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px; /* hand-cut edge */
  border: 0; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { background: #000; transform: rotate(-1deg) translateY(-1px); text-decoration: none; }
.btn .arrow { font-family: var(--hand); font-size: 1.3em; line-height: 0; }
.link-hand { font-family: var(--hand); font-size: var(--step-1); text-decoration: underline wavy var(--red) 1px; text-underline-offset: 0.25em; }

/* ---------- doodle pad ---------- */
.pad { position: relative; justify-self: center; width: min(100%, 470px); }
.pad-sheet {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 100%;
  background: #fbfaf7 url("img/paper.jpg") repeat; background-size: 520px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 14px 30px -12px rgba(60, 45, 30, .35), 0 2px 6px rgba(60,45,30,.12);
  transform: rotate(1.6deg);
  touch-action: none;
  cursor: crosshair;
}
.pad-sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pad-tape {
  position: absolute; width: 92px; height: 26px; background: rgba(236, 226, 205, .78);
  top: -12px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 1px 2px rgba(0,0,0,.08); z-index: 2;
}
.pad-note {
  position: absolute; z-index: 3; pointer-events: none;
  font-family: var(--hand); font-size: var(--step-1); line-height: 1.05; color: var(--ink);
  left: -8px; top: -58px; transform: rotate(-5deg);
  transition: opacity .4s ease;
}
.pad-note svg { position: absolute; left: 100%; top: 14px; width: 64px; height: 50px; overflow: visible; }
.pad.used .pad-note { opacity: 0; }
.pad-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 22px; }
.tool {
  font-family: var(--hand); font-size: 1.2rem; background: none; border: 0; color: var(--ink);
  padding: 4px 6px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px;
}
.tool:hover { text-decoration-color: var(--red); }
.tool:disabled { opacity: .4; cursor: default; }
.pad-caption { text-align: center; font-family: var(--hand); color: var(--ink-soft); font-size: 1.15rem; margin-top: 4px; }

/* ---------- sections ---------- */
.section { padding-block: clamp(48px, 7vw, 92px); position: relative; }
.section-title {
  font-family: var(--display); font-weight: 700; font-size: var(--step-2); line-height: 1.05;
  margin-bottom: 22px;
}
.section-title .hand { font-family: var(--hand); font-weight: 400; color: var(--red); font-size: 0.7em; display: block; margin-bottom: 4px; }
.prose { max-width: 62ch; display: grid; gap: 16px; }

/* book */
.book-grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.cover {
  position: relative; transform: rotate(-2.2deg);
  box-shadow: 0 22px 40px -20px rgba(50, 35, 20, .55), 0 3px 8px rgba(50,35,20,.15);
}
.cover::after { /* spine crease */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 10px;
  background: linear-gradient(90deg, rgba(0,0,0,.12), rgba(255,255,255,.15) 40%, transparent);
}
.specs { margin: 28px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 22px; font-size: var(--step--1); }
.specs dt { font-family: var(--hand); font-size: 1.15rem; color: var(--ink-soft); line-height: 1.45; }
.specs dd { margin: 0; border-bottom: 1px dotted var(--line); padding-bottom: 8px; min-width: 0; }
.specs .num { font-variant-numeric: tabular-nums; }

.photos {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 28px);
  margin-top: clamp(48px, 7vw, 88px); align-items: start;
}
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; box-shadow: 0 10px 22px -14px rgba(50,35,20,.6); background: var(--paper-deep); }
.photo:nth-child(1) { transform: rotate(-1.5deg); }
.photo:nth-child(2) { transform: rotate(1deg) translateY(18px); }
.photo:nth-child(3) { transform: rotate(-0.6deg); }
.photo:nth-child(4) { transform: rotate(1.8deg) translateY(10px); }
.photo figcaption { font-family: var(--hand); font-size: 1.1rem; color: var(--ink-soft); margin-top: 8px; text-align: center; }

/* steps — a real sequence, so numbered */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 26px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; counter-increment: step; }
.steps li::before {
  content: counter(step); font-family: var(--hand); font-size: 2rem; line-height: 1;
  width: 52px; height: 52px; display: grid; place-items: center; color: var(--ink);
  background: center / 100% 100% no-repeat;
}
.steps li:nth-child(1)::before { background-image: url("img/blob-peach.webp"); }
.steps li:nth-child(2)::before { background-image: url("img/blob-green.webp"); }
.steps li:nth-child(3)::before { background-image: url("img/blob-violet.webp"); color: #fff; text-shadow: 0 0 4px rgba(60,40,90,.6); }
.steps h3 { font-family: var(--display); font-weight: 700; font-size: var(--step-1); line-height: 1.1; margin-bottom: 4px; }
.how-img { transform: rotate(1deg); mix-blend-mode: multiply; }

/* classroom */
.class-band { background: rgba(239, 233, 224, .72); }
.benefits { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px clamp(24px, 4vw, 48px); }
.benefits li { min-width: 0; }
.benefits h3 { font-family: var(--display); font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.benefits h3::before { content: ""; width: 26px; height: 26px; flex: none; background: center / contain no-repeat; }
.benefits li:nth-child(4n+1) h3::before { background-image: url("img/blob-red.webp"); }
.benefits li:nth-child(4n+2) h3::before { background-image: url("img/blob-green.webp"); }
.benefits li:nth-child(4n+3) h3::before { background-image: url("img/blob-violet.webp"); }
.benefits li:nth-child(4n+4) h3::before { background-image: url("img/blob-peach.webp"); }
.benefits p { font-size: var(--step--1); color: var(--ink-soft); }
.curriculum { margin-top: 40px; max-width: 70ch; font-style: italic; color: var(--ink-soft); font-size: var(--step--1); border-left: 2px solid var(--teal); padding-left: 16px; }

/* schools contact */
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 6px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✓"; font-family: var(--hand); position: absolute; left: 4px; top: 0; color: var(--green); font-size: 1.25em; line-height: 1.2; }
.mail-card {
  position: relative; padding: 34px 30px 30px; background: #fffdf9;
  box-shadow: 0 16px 34px -20px rgba(50,35,20,.55), 0 2px 5px rgba(50,35,20,.1);
  transform: rotate(-1deg);
}
.mail-card::before { /* postage-stamp blob */
  content: ""; position: absolute; right: 16px; top: -18px; width: 70px; height: 70px;
  background: url("img/blob-green.webp") center / contain no-repeat; transform: rotate(14deg);
}
.mail-card .hand-label { font-family: var(--hand); color: var(--ink-soft); font-size: 1.15rem; }
.mail-address { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 1rem + 1.4vw, 1.9rem); word-break: break-word; margin: 4px 0 20px; user-select: all; }
.mail-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.copy-btn { font-family: var(--hand); font-size: 1.15rem; background: none; border: 0; cursor: pointer; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; padding: 4px; }
.copy-btn:hover { text-decoration-color: var(--red); }
.mail-alt { margin: 16px 0 0; font-size: .95rem; color: var(--ink-soft); }
.mail-alt a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
.mail-alt a:hover { text-decoration-color: var(--red); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-photo img { transform: rotate(1.4deg); box-shadow: 0 16px 30px -18px rgba(50,35,20,.6); }
.signoff { font-family: var(--hand); font-size: var(--step-1); color: var(--ink); }

/* footer */
.site-foot { border-top: 1px solid var(--line); margin-top: clamp(24px, 4vw, 48px); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; align-items: baseline; padding-block: 28px 40px; font-size: var(--step--1); color: var(--ink-soft); }
.site-foot strong { color: var(--ink); font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* placeholders the owner must fill before launch */
.fill { background: #fff1a8; color: var(--ink); padding: 0 4px; border-radius: 3px; }

/* ---------- floating paint blobs ---------- */
.blob-layer { position: absolute; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.blob {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: grab;
  mix-blend-mode: multiply; opacity: .9; touch-action: none; user-select: none; -webkit-user-drag: none;
  will-change: transform;
}
.blob.dragging { cursor: grabbing; opacity: 1; }
.blob-hint {
  position: absolute; font-family: var(--hand); font-size: 1.05rem; color: var(--ink-soft);
  pointer-events: none; white-space: nowrap; transition: opacity .5s ease; z-index: 21;
}
.blob-hint.gone { opacity: 0; }

/* ---------- legal pages ---------- */
.legal { padding-block: clamp(24px, 4vw, 56px) clamp(56px, 8vw, 96px); }
.legal h1 { font-family: var(--display); font-weight: 900; font-size: var(--step-2); line-height: 1.05; margin-bottom: 8px; }
.legal h2 { font-family: var(--display); font-weight: 700; font-size: var(--step-1); margin: 44px 0 12px; }
.legal h3 { font-family: var(--body); font-weight: 600; font-size: var(--step-0); margin: 24px 0 6px; }
.legal .prose { gap: 12px; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.legal .updated { font-family: var(--hand); color: var(--ink-soft); font-size: 1.15rem; }
.legal .toc { font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; }
.legal-table { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 22px; margin: 0; }
.legal-table dt { color: var(--ink-soft); }
.legal-table dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap, .book-grid, .how, .contact, .about { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { padding-top: 8px; }
  .pad { margin-top: 64px; width: min(100%, 420px); }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover { max-width: min(100%, 420px); }
  .how-img { order: -1; }
}
@media (max-width: 560px) {
  .benefits { grid-template-columns: minmax(0, 1fr); }
  .nav { gap: 10px 16px; }
  .nav .nav-sec { display: none; }
  .pad-note { left: 0; top: -54px; }
  .blob-hint { display: none; }
  .specs { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .specs dd { margin-bottom: 8px; }
  .legal-table { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .legal-table dd { margin-bottom: 10px; }
}
/* touch screens: bigger tap areas on small text links, same look */
@media (pointer: coarse) {
  .nav a:not(.lang a), .legal .toc a, .foot-links a, .mail-alt a { display: inline-block; padding: 10px 0; margin: -10px 0; }
  .lang a, .lang span { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
