/* ==========================================================================
   Crayon Briefs Co — site styles
   Palette taken from the logo: paper cream, ink navy and the crayon doodles.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../assets/fonts/bricolage-grotesque-var.woff2") format("woff2-variations"),
       url("../assets/fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

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

:root {
  /* Base */
  --paper: #fff9ef;
  --paper-deep: #fbf0dc;
  --sheet: #ffffff;
  --ink: #2e3a59;
  --ink-deep: #222c45;
  --ink-soft: #545e78;
  --rule: rgba(46, 58, 89, 0.14);

  /* Crayons */
  --yellow: #f3c22f;
  --pink: #f25db8;
  --green: #00b65e;
  --blue: #37b6ff;
  --blue-deep: #296491;
  --orange: #e97450;
  --purple: #9c74a6;
  --error: #b3261e;

  /* Type */
  --font-sans: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hand: "Caveat Brush", "Segoe Print", "Comic Sans MS", cursive;

  --step--1: 0.9rem;
  --step-0: 1.125rem;
  --step-1: 1.35rem;
  --step-2: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.9rem, 1.4rem + 4.6vw, 5.5rem);

  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: currentColor; }
a[href^="tel:"] { white-space: nowrap; }

:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--yellow); color: var(--ink-deep); }

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.hand { font-family: var(--font-hand); font-weight: 400; letter-spacing: 0; }

/* Crayon marks are SVG strokes passed through the #crayon filter */
.crayon { overflow: visible; pointer-events: none; }
.crayon path, .crayon ellipse, .crayon circle {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 4px 0 var(--yellow);
}
.btn--primary:hover { background: var(--ink-deep); transform: translateY(-1px); box-shadow: 0 5px 0 var(--yellow); }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--yellow); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: rgba(46, 58, 89, 0.06); }

.btn--light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  box-shadow: 0 4px 0 var(--yellow);
}
.btn--light:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--yellow); }
.btn--light:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--yellow); }

.btn--small { min-height: 42px; padding: 0.5rem 1.1rem; font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 249, 239, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.brand img { height: 58px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { display: flex; gap: 1.75rem; list-style: none; }
.site-nav a:not(.btn) {
  text-decoration: none;
  font-weight: 560;
  font-size: 1.02rem;
  padding: 0.35rem 0;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-size: 0 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.2s ease;
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { background-size: 100% 3px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .brand img { height: 44px; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem var(--gutter) 1.75rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 16px 24px -16px rgba(46, 58, 89, 0.25);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a:not(.btn) {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--rule);
    background-image: none;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(4rem, 3rem + 5vw, 7rem);
}

.hero__doodles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__doodles svg { position: absolute; }
.doodle-loop-pink { width: 120px; top: -18px; left: 38%; }
.doodle-arc-green { width: 230px; top: -70px; right: -60px; }
.doodle-sun { width: 150px; bottom: -40px; left: -36px; }
.doodle-loop-blue { width: 170px; bottom: -70px; right: 24%; }

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.035em;
}
.hero h1 span { display: block; }

.hero__lead {
  margin-top: 1.75rem;
  max-width: 36rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

.hero__aside {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
.hero__aside a { color: var(--ink); font-weight: 600; }

/* The brief sheet — the signature piece of the page */
.brief {
  position: relative;
  margin: 0;
  padding: 2.25rem 2rem 2rem;
  background: var(--sheet);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(46, 58, 89, 0.06),
    0 2px 6px rgba(46, 58, 89, 0.06),
    0 28px 50px -24px rgba(46, 58, 89, 0.4);
  transform: rotate(1.6deg);
}

.brief__tape {
  position: absolute;
  top: -15px; left: 50%;
  width: 120px; height: 32px;
  margin-left: -60px;
  background: rgba(243, 194, 47, 0.55);
  transform: rotate(-4deg);
  border-left: 2px dashed rgba(255, 255, 255, 0.6);
  border-right: 2px dashed rgba(255, 255, 255, 0.6);
}

.brief__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 3px solid var(--ink);
}
.brief__title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.brief__for { font-size: 1.45rem; color: var(--blue-deep); line-height: 1; }

.brief__fields { margin: 0; }
.brief__row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  border-bottom: 1px dashed #d5d9e3;
}
.brief__row dt { font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); }
.brief__row dd {
  position: relative;
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--blue-deep);
}
.brief__row dd > span { position: relative; display: inline-block; }

.mark-circle { position: absolute; left: -12px; top: -10px; width: calc(100% + 24px); height: calc(100% + 20px); }
.mark-underline { position: absolute; left: -4px; bottom: -9px; width: calc(100% + 8px); height: 14px; }

.brief__row .brief__platforms { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-family: var(--font-sans); font-size: 0.95rem; color: var(--ink); }
.brief__row .brief__platforms > span { display: inline-flex; align-items: center; gap: 0.3rem; }
.brief__platforms .box { position: relative; width: 18px; height: 18px; border: 1.5px solid var(--ink-soft); border-radius: 3px; flex: none; }
.brief__platforms .tick { position: absolute; left: -3px; top: -9px; width: 26px; height: 26px; }

.brief__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}
.brief__palette { display: flex; align-items: center; gap: 0.45rem; }
.brief__palette-label { font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); margin-right: 0.35rem; }
.brief__palette svg { width: 36px; height: 26px; }

.brief__stamp {
  position: absolute;
  right: -10px;
  bottom: -24px;
  font-family: var(--font-hand);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--green);
  transform: rotate(-9deg);
  padding: 0.35rem 0.6rem;
}
.brief__stamp svg { position: absolute; inset: -8px -12px; width: calc(100% + 24px); height: calc(100% + 16px); }

/* Page-load moment: the crayon marks draw themselves onto the brief */
.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.6s cubic-bezier(0.5, 0, 0.3, 1) forwards;
  animation-delay: var(--d, 0.4s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.brief__stamp .hand-text { opacity: 0; animation: appear 0.3s ease forwards; animation-delay: 2.5s; display: inline-block; }
@keyframes appear { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .draw { animation: none; stroke-dashoffset: 0; }
  .brief__stamp .hand-text { animation: none; opacity: 1; }
  .btn, .site-nav a { transition: none; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .brief { max-width: 34rem; transform: rotate(1deg); }
  .doodle-loop-pink { left: auto; right: 12%; }
  .doodle-loop-blue, .doodle-sun { display: none; }
}

@media (max-width: 560px) {
  .doodle-loop-pink { display: none; }
  .work-band__doodle { width: 150px; right: -60px; top: -40px; opacity: 0.7; }
}

@media (max-width: 480px) {
  .brief { padding: 2rem 1.25rem 1.5rem; }
  .brief__row { grid-template-columns: 5.25rem 1fr; gap: 0.75rem; }
  .brief__row dd { font-size: 1.35rem; }
  .brief__foot { flex-direction: column; align-items: flex-start; }
  .brief__stamp { right: -6px; bottom: -28px; }
  .doodle-arc-green { width: 160px; right: -70px; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section--deep { background: var(--paper-deep); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 4vw, 3.75rem); }
.section-head h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; }
.section-head p { margin-top: 1.1rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 38rem; }

/* Services: one row per service, like lines on a brief */
.services { list-style: none; border-bottom: 2px solid var(--rule); }

.service {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: 1.25rem 2.5rem;
  align-items: start;
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 2px solid var(--rule);
}
.service__swatch { width: 64px; height: 40px; margin-top: 0.15rem; }
.service h3 { font-size: var(--step-2); font-weight: 760; letter-spacing: -0.02em; max-width: 15ch; }
.service p { color: var(--ink-soft); max-width: 36rem; }

.service__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; list-style: none; }
.service__tags li {
  font-size: 0.88rem;
  font-weight: 560;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1.5px solid var(--rule);
  color: var(--ink);
}

@media (max-width: 760px) {
  .service { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
  .service h3 { max-width: none; }
  .service__swatch { width: 48px; height: 30px; }
}

/* Products: dark band */
.products { background: var(--ink); color: var(--paper); }
.products .section-head p { color: rgba(255, 249, 239, 0.78); }
.products a:not(.btn) { text-decoration-color: var(--yellow); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}
.product {
  display: flex;
  flex-direction: column;
  padding: 0 clamp(1.25rem, 2.5vw, 2.25rem);
  border-left: 1px solid rgba(255, 249, 239, 0.18);
}
.product:first-child { padding-left: 0; border-left: 0; }
.product:last-child { padding-right: 0; }

.product__stroke { width: 100%; max-width: 180px; height: 22px; margin-bottom: 1.5rem; }
.product h3 { font-size: var(--step-2); font-weight: 780; letter-spacing: -0.02em; }
.product__desc { margin-top: 0.85rem; color: rgba(255, 249, 239, 0.8); }

.product__list { margin-top: 1.25rem; list-style: none; display: grid; gap: 0.5rem; }
.product__list li { display: flex; gap: 0.6rem; align-items: baseline; }
.product__list li::before {
  content: "";
  flex: none;
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  background: var(--yellow);
  transform: translateY(0.05rem);
}

.product .btn { margin-top: auto; align-self: flex-start; }
.product__spacer { flex: 1; min-height: 1.75rem; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr; gap: 3rem; }
  .product, .product:first-child, .product:last-child { padding: 0; border-left: 0; }
  .product + .product { padding-top: 3rem; border-top: 1px solid rgba(255, 249, 239, 0.18); }
}

/* Why + how we work */
.why {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}
.why h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; }
.why__text p { font-size: var(--step-1); line-height: 1.55; }
.why__text p + p { margin-top: 1.1rem; color: var(--ink-soft); font-size: var(--step-0); line-height: 1.6; }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  list-style: none;
  counter-reset: step;
}
.steps__line { position: absolute; left: 2.5rem; right: 6%; top: 1.6rem; height: 20px; z-index: 0; }

.step { position: relative; z-index: 1; }
.step__num {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 1.25rem;
  background: var(--paper-deep);
  font-family: var(--font-hand);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--ink);
}
.step__num svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.step h3 { font-size: 1.35rem; font-weight: 760; }
.step p { margin-top: 0.6rem; color: var(--ink-soft); font-size: 1.02rem; }

@media (max-width: 900px) {
  .why { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; }
  .steps__line { display: none; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

/* Work band */
.work-band {
  position: relative;
  overflow: hidden;
  background: var(--yellow);
  color: var(--ink-deep);
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
}
.work-band__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.work-band h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; }
.work-band p { margin-top: 0.75rem; max-width: 34rem; font-size: var(--step-1); line-height: 1.45; }
.work-band__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.work-band .btn--primary { box-shadow: 0 4px 0 var(--paper); }
.work-band .btn--primary:hover { box-shadow: 0 5px 0 var(--paper); }
.work-band .btn--ghost:hover { background: rgba(46, 58, 89, 0.08); }
.work-band__doodle { position: absolute; right: -40px; top: -50px; width: 260px; z-index: 0; opacity: 0.9; }

/* Contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.contact h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; }
.contact__intro { margin-top: 1rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }

.contact-list { margin: 2.25rem 0 0; display: grid; gap: 1.25rem; }
.contact-list div { display: grid; gap: 0.1rem; }
.contact-list dt { font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); }
.contact-list dd { margin: 0; font-size: 1.15rem; font-weight: 620; }

.form-sheet {
  background: var(--sheet);
  border-radius: 6px;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  box-shadow:
    0 1px 0 rgba(46, 58, 89, 0.06),
    0 24px 48px -28px rgba(46, 58, 89, 0.38);
  border-top: 6px solid var(--ink);
}
.form-sheet__title { font-size: 1.4rem; font-weight: 800; }
.form-sheet__sub { margin-top: 0.35rem; font-size: 0.98rem; color: var(--ink-soft); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.25rem;
  margin-top: 1.75rem;
}
.field { display: grid; gap: 0.4rem; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.98rem; font-weight: 620; }
.field .optional { font-weight: 450; color: var(--ink-soft); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.7rem 0.95rem;
  font: inherit;
  font-size: 1.02rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid #cfd4df;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e3a59' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 18px;
  padding-right: 2.6rem;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #aeb5c6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(243, 194, 47, 0.45);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { min-height: 0; font-size: 0.9rem; font-weight: 560; color: var(--error); }
.field__error:empty { display: none; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.98rem;
  line-height: 1.5;
}
.consent input {
  flex: none;
  width: 22px; height: 22px;
  margin: 0.1rem 0 0;
  accent-color: var(--ink);
}

.form-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }
.form-note { margin-top: 1rem; font-size: 0.93rem; color: var(--ink-soft); }

.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.5;
}
.form-status:empty { display: none; }
.form-status[data-tone="success"] { background: rgba(0, 182, 94, 0.1); border-left: 5px solid var(--green); }
.form-status[data-tone="error"] { background: rgba(179, 38, 30, 0.07); border-left: 5px solid var(--error); }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  font-size: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.footer-brand img { height: 64px; width: auto; }
.footer-brand .hand { margin-top: 1rem; font-size: 1.6rem; line-height: 1.1; color: var(--ink); }
.footer-brand p:not(.hand) { margin-top: 0.75rem; color: var(--ink-soft); max-width: 22rem; }

.footer-col h2 { font-size: 1rem; font-weight: 760; margin-bottom: 0.9rem; letter-spacing: 0; }
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a { text-decoration-color: transparent; }
.footer-col a:hover { text-decoration-color: var(--yellow); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Floating WhatsApp button */
.wa-float {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0 1.15rem 0 0.95rem;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 680;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--ink), 0 12px 24px -10px rgba(46, 58, 89, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.wa-float svg { width: 26px; height: 26px; flex: none; }
.wa-float:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink), 0 14px 26px -10px rgba(46, 58, 89, 0.5); }
.wa-float:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.wa-float:focus-visible { outline-color: var(--ink); }
@media (max-width: 560px) {
  .wa-float { padding: 0; width: 56px; justify-content: center; }
  .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* --------------------------------------------------------------------------
   Policy pages
   -------------------------------------------------------------------------- */

.legal-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
.legal-hero h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; max-width: 18ch; }
.legal-hero__meta { margin-top: 0.9rem; font-size: 1rem; color: var(--ink-soft); }
.legal-hero__summary { margin-top: 1.25rem; max-width: 44rem; font-size: var(--step-1); line-height: 1.5; }
.legal-hero__doodle { position: absolute; right: -30px; top: -40px; width: 190px; pointer-events: none; }

.legal {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2.5rem, 5vw, 4rem) var(--section);
}

.toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
.toc h2 { font-size: 1rem; font-weight: 760; margin-bottom: 0.9rem; }
.toc ol { list-style: none; display: grid; gap: 0.15rem; border-left: 2px solid var(--rule); }
.toc a {
  display: block;
  padding: 0.35rem 0 0.35rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink-soft);
  text-decoration: none;
}
.toc a:hover { color: var(--ink); border-left-color: var(--yellow); }

.toc-mobile { display: none; }

.prose { max-width: 44rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 {
  margin-top: 3rem;
  padding-top: 0.25rem;
  font-size: var(--step-2);
  font-weight: 780;
  letter-spacing: -0.02em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.75rem; font-size: 1.2rem; font-weight: 740; }
.prose h2 + p, .prose h3 + p, .prose h2 + ul, .prose h3 + ul { margin-top: 0.8rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: 0.45rem; }
.prose li::marker { color: var(--ink-soft); }
.prose strong { font-weight: 680; }

.prose .callout {
  margin-top: 1.5rem;
  padding: 1.15rem 1.35rem;
  background: var(--sheet);
  border-left: 5px solid var(--yellow);
  border-radius: 6px;
}

.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; margin-top: 1.25rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.75rem 0.75rem 0.75rem 0; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 700; }

.contact-card {
  margin-top: 1.25rem;
  padding: 1.35rem 1.5rem;
  background: var(--sheet);
  border-radius: 6px;
  border-top: 5px solid var(--ink);
}
.contact-card dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; }
.contact-card dt { font-weight: 640; color: var(--ink-soft); }
.contact-card dd { margin: 0; }

@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; }
  .toc { display: none; }
  .toc-mobile { display: block; margin-bottom: 0.5rem; }
  .toc-mobile details {
    background: var(--sheet);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    border: 1.5px solid var(--rule);
  }
  .toc-mobile summary { font-weight: 680; cursor: pointer; }
  .toc-mobile ol { margin-top: 0.75rem; padding-left: 1.25rem; display: grid; gap: 0.35rem; }
  .contact-card dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .contact-card dd + dt { margin-top: 0.6rem; }
}

/* 404 */
.not-found { padding-block: clamp(4rem, 10vw, 8rem); }
.not-found h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; max-width: 12ch; }
.not-found p { margin-top: 1.25rem; font-size: var(--step-1); color: var(--ink-soft); max-width: 34rem; }
.not-found .hero__actions { margin-top: 2rem; }

/* Print: policies print cleanly */
@media print {
  .site-header, .site-footer, .wa-float, .toc, .toc-mobile, .legal-hero__doodle { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .legal { display: block; padding: 0; }
  .prose { max-width: none; }
  a { text-decoration: none; }
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (max-width: 560px) {
  .legal-hero__doodle { width: 110px; right: -55px; top: -30px; opacity: 0.6; }
}
