/* Blab Media: "Hand-drawn cream and orange". Tokens from PALETTES.md / the approved mock-up. */

@font-face { font-family: 'Caveat Brush'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/caveat-brush-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/kalam-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/kalam-latin-700-normal.woff2') format('woff2'); }

:root {
  --paper: #FBF5E9; --card: #FFFDF7; --ink: #1D1A16;
  --orange: #F58A2C; --orange-deep: #F07F2A; --peach: #F9D9B8; --peach-light: #F9C58F;
  --sky: #CFE3F2; --sky-hl: #9DC3E6; --green-light: #B7D9A0;
  --orange-text: #B8560A; /* only if orange text is ever needed (AA on cream/white) */
  --focus: #3A63D1;
  --error: #A3322B;
  --radius-card: 22px 26px 20px 28px / 26px 20px 28px 22px;
  --radius-btn: 16px 20px 14px 22px / 20px 14px 22px 16px;
  --shadow-btn: 3px 4px 0 var(--ink); --shadow-img: 6px 8px 0 var(--ink);
  --max: 1180px; --gutter: 28px;
  --hand: 'Caveat Brush', 'Gochi Hand', 'Patrick Hand', cursive;
  --body: 'Kalam', 'Patrick Hand', system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 20px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 20px; line-height: 1.65; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
p, ul, h1, h2, h3 { margin: 0; }
a { color: inherit; }
.hand { font-family: var(--hand); font-weight: 400; letter-spacing: .005em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--card); color: var(--ink); padding: 10px 20px; border: 3px solid var(--ink); border-radius: var(--radius-btn); text-decoration: none; }
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.center { text-align: center; justify-content: center; }
.small { font-size: 17px; }
.measure { max-width: 34ch; }
.stack { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }

/* Headings */
.h1 { font-size: clamp(54px, 7.4vw, 112px); line-height: 1.02; }
.h2 { font-size: clamp(46px, 5.4vw, 78px); line-height: 1.02; }
.h2-about { font-size: clamp(44px, 5vw, 72px); line-height: 1.04; margin-bottom: 6px; }
.h2-contact { font-size: clamp(56px, 7.4vw, 108px); line-height: 1; }
.lede { font-size: 23px; }

/* Highlighter swashes */
.sw { display: inline-block; padding: 0 .2em .02em; background: var(--orange); color: var(--ink); border-radius: 10px 22px 8px 24px / 20px 8px 22px 10px; transform: rotate(-1.6deg); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sw2 { background: var(--sky-hl); transform: rotate(1.4deg); }
.sw4 { transform: rotate(-2deg); }
.und { background: linear-gradient(transparent 70%, var(--orange) 70% 88%, transparent 88%); }

/* Wobbly hand-drawn outline: a border-only pseudo-element with the SVG filter (never on text) */
.sk { position: relative; }
.sk::before { content: ""; position: absolute; inset: 0; border: 3px solid var(--ink); border-radius: var(--radius-card); filter: url(#rough); pointer-events: none; z-index: 3; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .3em; padding: 14px 30px; background: var(--orange); color: var(--ink); text-decoration: none; font-family: var(--hand); font-size: 25px; line-height: 1.2; border: 3px solid var(--ink); border-radius: var(--radius-btn); box-shadow: var(--shadow-btn); transition: transform .12s, box-shadow .12s; cursor: pointer; }
.btn:hover { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: var(--paper); }
.btn-sm { padding: 11px 24px; font-size: 21px; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- Header ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 26px; padding-bottom: 28px; }
.logo { --logo-w: 270px; display: block; position: relative; flex: none; width: var(--logo-w); height: calc(var(--logo-w) * 104 / 270); color: var(--ink); text-decoration: none; }
.logo-bubble { position: absolute; inset: 0; width: 100%; height: 100%; filter: url(#rough); }
.logo-text { position: absolute; left: 0; right: 0; top: calc(var(--logo-w) * 8 / 270); text-align: center; font-size: calc(var(--logo-w) * 50 / 270); line-height: 1.1; white-space: nowrap; }
.site-nav { display: flex; gap: 30px; font-size: 21px; }
.site-nav a { text-decoration: none; padding-bottom: 2px; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--orange); }
.note { align-self: flex-start; font-size: 30px; line-height: 1.05; text-align: right; transform: rotate(3deg); margin-top: -2px; white-space: nowrap; }
@media (max-width: 1120px) { .note { display: none; } }
@media (max-width: 780px) { .site-nav { display: none; } }
/* Phones: header shows the logo only (the hero's "Fancy a blab?" button is just below) */
@media (max-width: 600px) { .site-header .btn-sm { display: none; } }
@media (max-width: 520px) {
  :root { --gutter: 20px; }
  .cta-row { flex-wrap: nowrap; gap: 10px; }
  .cta-row .btn { flex: 0 1 auto; padding: 11px 13px; font-size: 21px; white-space: nowrap; }
  .site-header { padding-top: 18px; padding-bottom: 14px; gap: 12px; }
  .logo { --logo-w: 200px; }
}
@media (max-width: 370px) {
  .cta-row { gap: 8px; }
  .cta-row .btn { font-size: 18px; padding: 10px 9px; }
  .logo { --logo-w: 180px; }
}

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "head img" "text ."; column-gap: 40px; align-items: start; padding-top: 56px; padding-bottom: 84px; }
.hero-head { grid-area: head; align-self: center; }
.hero-portrait { grid-area: img; align-self: center; display: flex; justify-content: center; }
.hero-text { grid-area: text; padding-top: 28px; }
.hero-text .lede { margin-bottom: 36px; max-width: 30ch; }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.frame { position: relative; width: min(460px, 100%); aspect-ratio: 1; background: var(--sky); border-radius: var(--radius-card); overflow: hidden; transform: rotate(1.6deg); box-shadow: var(--shadow-img); }
.frame picture { position: absolute; left: -4%; top: 4%; width: 108%; z-index: 1; }
.frame img { width: 100%; max-width: none; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "head" "img" "text"; row-gap: 28px; padding-top: 28px; padding-bottom: 56px; }
  .hero-text { padding-top: 0; }
  .frame { width: min(400px, 92%); }
  /* Headline on four lines, sized to the phone width (about 67px on a 390px phone) */
  .h1 { font-size: min(96px, calc((100vw - 2 * var(--gutter)) / 5.2)); }
}

/* ---------- Icon strip ---------- */
.strip-wrap { padding-bottom: 40px; }
.strip { list-style: none; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 30px 24px; background: var(--card); border-radius: 22px; }
.strip li { flex: 1 1 150px; max-width: 220px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.strip svg { width: 68px; height: 68px; }
.strip span { font-size: 27px; line-height: 1.05; padding-bottom: 6px; background: linear-gradient(transparent 88%, var(--orange) 88%); }
@media (max-width: 520px) { .strip { padding: 24px 12px; gap: 24px 8px; } .strip li { flex-basis: 130px; } .strip span { font-size: 24px; } }
@media (max-width: 370px) { .strip li { flex-basis: 110px; } }

/* ---------- Dotted dividers ---------- */
.divider { padding: 0 var(--gutter) 56px; }
.divider svg { display: block; width: 66.667%; height: 14px; margin: 0 auto; filter: url(#rough); overflow: visible; }

/* ---------- Cards / services ---------- */
.card { background: var(--card); border-radius: 22px; overflow: hidden; }
.card-bar { height: 34px; border-bottom: 3px solid var(--ink); }
.bar-peach { background: var(--peach); }
.bar-sky { background: var(--sky); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 48px; align-items: start; }
.card-body { padding: 44px 48px 48px; }
.service { padding-bottom: 28px; }
.service + .service { padding-bottom: 40px; }
.stack-ticks { gap: 30px; padding-top: 8px; }
/* Service card: desktop = copy and button left, ticks right; mobile = heading, copy, ticks, then the button at the bottom */
.svc-body { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "head list" "text list" "btn list"; grid-template-rows: auto auto 1fr; column-gap: 48px; row-gap: 26px; align-items: start; }
.svc-head { grid-area: head; } .svc-text { grid-area: text; } .svc-list { grid-area: list; } .svc-btn { grid-area: btn; justify-self: start; }
@media (max-width: 760px) { .svc-body { grid-template-columns: 1fr; grid-template-areas: "head" "text" "list" "btn"; grid-template-rows: auto; } .svc-list { padding-top: 0; } }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; font-size: 23px; }
.ticks li { padding-left: 44px; position: relative; line-height: 1.2; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 30px; height: 26px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 26'%3E%3Cpath d='M3 14l8 9L27 3' fill='none' stroke='%23F58A2C' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat; }
.card-line { font-size: 32px; line-height: 1.5; }
@media (max-width: 640px) { .card-body { padding: 32px 24px 36px; } .two { gap: 32px; } .card-line { font-size: 28px; } }

/* ---------- About ---------- */
.about { padding-bottom: 56px; }
.about-grid { align-items: center; }
.avatar { position: relative; width: min(420px, 100%); aspect-ratio: 1; background: var(--sky); border-radius: 50%; overflow: hidden; box-shadow: var(--shadow-img); }
.avatar::before { border-radius: 50%; }
.avatar picture, .avatar img { width: 100%; height: 100%; }
.avatar img { object-fit: cover; }
.about-text { gap: 18px; }
.about-text .measure { max-width: 36ch; }
@media (max-width: 760px) { .avatar { width: min(340px, 86%); margin-inline: auto; } }

/* ---------- Contact ---------- */
.contact { padding-bottom: 110px; }
.contact-card { background: var(--peach); }
.contact-body { padding: 56px 52px; align-items: center; }
.contact-lede { max-width: 28ch; }
.phone-row { display: flex; align-items: center; gap: 18px; flex-wrap: nowrap; margin-top: 4px; }
.phone { font-size: 42px; line-height: 1; text-decoration: none; border-bottom: 3px solid var(--orange); white-space: nowrap; }
.btn-wa { padding: 10px 18px; font-size: 23px; gap: 8px; white-space: nowrap; flex: none; }
.btn-wa svg { flex: none; }
/* Phone number and WhatsApp button always share one line: sized to the width of their column */
.contact-body > .stack { container-type: inline-size; }
@container (max-width: 420px) { .phone-row { gap: 12px; } .phone { font-size: 34px; } .btn-wa { font-size: 21px; padding: 8px 13px; } }
@container (max-width: 340px) { .phone-row { gap: 10px; } .phone { font-size: 29px; } .btn-wa { font-size: 19px; padding: 7px 10px; gap: 6px; } .btn-wa svg { width: 24px; height: 24px; } }
@container (max-width: 290px) { .phone-row { gap: 8px; } .phone { font-size: 26px; } .btn-wa { font-size: 17px; padding: 6px 8px; gap: 5px; } .btn-wa svg { width: 20px; height: 20px; } }
@media (max-width: 640px) { .contact-body { padding: 36px 20px; } .contact { padding-bottom: 72px; } }

/* Form */
.form-card { background: var(--card); border-radius: 22px; padding: 36px; display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 20px; }
.field input:not([type="checkbox"]), .field textarea { font-family: inherit; font-size: 19px; padding: 13px 16px; border: 3px solid var(--ink); background: #fff; color: var(--ink); border-radius: 12px 14px 12px 16px; width: 100%; }
.field textarea { resize: vertical; min-height: 130px; }
.field ::placeholder { color: #6B645B; opacity: 1; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 17px; line-height: 1.4; }
.field-error:empty { display: none; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; }
.field-check input { width: 24px; height: 24px; margin: 4px 0 0; accent-color: var(--orange); cursor: pointer; }
.field-check label { font-size: 18px; line-height: 1.5; cursor: pointer; }
.field-check .field-error { grid-column: 2; }
.btn-submit { align-self: flex-start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: 12px 14px 12px 16px; font-size: 19px; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status.is-success, .form-status.is-error, .form-status.is-info { padding: 14px 18px; border: 3px solid var(--ink); }
.form-status.is-success { background: #E6F2DC; }
.form-status.is-error, .form-status.is-info { background: var(--paper); }
.btn-submit { white-space: nowrap; }
@media (max-width: 640px) { .form-card { padding: 26px 18px; } .btn-submit { align-self: stretch; justify-content: center; padding-inline: 12px; } }
@media (max-width: 400px) { .contact-body { padding: 30px 14px; } .form-card { padding: 22px 14px; } .btn-submit { font-size: 22px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 3px dashed var(--ink); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 32px; font-size: 17px; line-height: 1.5; }
.footer-left, .footer-right { display: flex; flex-direction: column; gap: 2px; }
.footer-right { text-align: right; align-items: flex-end; }
.footer-name { font-size: 26px; }
@media (max-width: 700px) { .footer-right { text-align: left; align-items: flex-start; } }

/* ---------- Legal pages ---------- */
.legal { padding-top: 32px; padding-bottom: 80px; }
.legal > * + * { margin-top: 16px; }
.legal h2 { font-size: clamp(32px, 3.6vw, 44px); line-height: 1.1; margin-top: 40px; }
.legal p, .legal li { max-width: 68ch; }
.legal.center p { margin-inline: auto; }
.legal ul { padding-left: 24px; }
.legal li + li { margin-top: 6px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: clamp(16px, 2.5vw, 28px); bottom: clamp(16px, 2.5vw, 28px); z-index: 40;
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--orange); color: var(--ink); border: 3px solid var(--ink); box-shadow: var(--shadow-btn);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s;
}
.to-top.is-visible, .no-js .to-top { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { box-shadow: 1px 1px 0 var(--ink); }
@media print { .to-top, .skip-link { display: none; } }

/* Image focal points (generated from site.json) */
.pos-portrait-hero { object-position: 50% 50%; }
.pos-portrait-about { object-position: 50% 30%; }
