/* Careless! — hand-drawn sketchbook */
@font-face { font-family: "Amatic SC"; src: url("/fonts/amatic-sc-latin-700-normal.woff2") format("woff2"); font-weight: 700; 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 {
  --paper: #f2f3f1;
  --ink: #161616;
  --ink-soft: #3b3b38;
  --marker: #ffd93b;
  --line: #161616;

  --hand: "Amatic SC", "Patrick Hand", "Comic Sans MS", cursive;
  --pen: "Patrick Hand", "Comic Sans MS", cursive;

  --fs-xs: 1rem;
  --fs-sm: 1.125rem;
  --fs-base: 1.3125rem;
  --fs-lg: 1.625rem;
  --fs-nav: clamp(1.5rem, 2.4vw, 1.875rem);
  --fs-box: clamp(1.75rem, 2.2vw, 2.25rem);
  --fs-xl: clamp(2.25rem, 4.4vw, 3rem);
  --fs-2xl: clamp(3rem, 7vw, 5rem);
  --fs-hero: clamp(5rem, 14vw, 10rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--pen); font-size: var(--fs-base); line-height: 1.45; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 0.8em; text-wrap: pretty; }
h1, h2, h3, .quote, .slogan, .still-q { text-wrap: balance; }
h1, h2, h3 { font-family: var(--hand); font-weight: 700; line-height: 0.95; margin: 0; letter-spacing: 0.01em; }
mark { background: linear-gradient(100deg, transparent 0 1%, var(--marker) 2% 97%, transparent 99%) no-repeat 0 62% / 100% 58%; color: inherit; padding: 0 0.12em; }
:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }

/* rough frames */
.rough { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rough path { fill: none; stroke: var(--line); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rough path.fill { stroke: none; fill: var(--marker); }
.draw { width: 100%; height: auto; overflow: visible; }
.draw path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.frame { position: relative; padding: clamp(1rem, 3vw, 2rem); }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 4vw, 3rem); padding: 0.85rem var(--gutter); background: var(--paper); box-shadow: 0 6px 14px -10px rgba(0, 0, 0, 0.35); }
.menu { display: flex; gap: clamp(1rem, 4vw, 3rem); }
.menu a, .langs a { font-family: var(--hand); font-weight: 700; font-size: var(--fs-nav); text-decoration: none; display: inline-block; transition: transform 0.25s ease; }
.menu a:hover, .menu a.on { transform: scale(1.3) rotate(-4deg); }
.langs { display: flex; gap: 0.7rem; position: absolute; right: var(--gutter); }
.langs a { font-size: var(--fs-lg); opacity: 0.55; }
.langs a[aria-current], .langs a:hover { opacity: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* buttons: hand-drawn boxes */
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1.1rem; margin-top: 1.6rem; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 3.6rem; padding: 0.55rem 1.6rem; text-decoration: none; font-family: var(--hand); font-weight: 700; font-size: var(--fs-lg); transition: transform 0.2s ease; }
.btn span { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn svg:not(.rough) { width: 1.25rem; height: 1.25rem; }
.btn:hover { transform: rotate(-2deg) scale(1.04); }
.btn:active { transform: scale(0.97); }

/* hero */
.hero { padding: clamp(2.5rem, 7vh, 5rem) 0 clamp(3rem, 8vh, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero h1 { font-size: var(--fs-hero); line-height: 0.85; margin-left: -0.04em; }
.slogan { font-family: var(--hand); font-weight: 700; font-size: var(--fs-xl); margin: 0.5rem 0 1.1rem; line-height: 1.05; }
.sub { color: var(--ink-soft); max-width: 30ch; }

/* sections */
.block { padding: clamp(4rem, 10vh, 7rem) 0; border-top: 0; }
.block + .block { position: relative; }
.block + .block::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 2px; background: var(--ink); opacity: 0.12; border-radius: 2px; }
.block h2 { font-size: var(--fs-2xl); margin-bottom: 1.2rem; }
.intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center; margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.lead { font-size: var(--fs-lg); max-width: 28ch; line-height: 1.35; }
.intro-art { max-width: 340px; justify-self: center; width: 100%; }

.boxes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.box { position: relative; aspect-ratio: 22 / 17; display: grid; place-items: center; padding: 1rem; margin-bottom: 0.9rem; transition: transform 0.25s ease; }
.boxes li:nth-child(odd) .box { transform: rotate(-1.2deg); }
.boxes li:nth-child(even) .box { transform: rotate(1deg); }
.boxes li:hover .box { transform: rotate(-3deg) scale(1.04); }
.box h3 { font-size: var(--fs-box); text-align: center; position: relative; hyphens: manual; overflow-wrap: normal; }
.boxes p { font-size: var(--fs-sm); color: var(--ink-soft); margin: 0; }

/* timeline */
.how h2 { margin-bottom: 2rem; }
.timeline { position: relative; padding-bottom: 1rem; }
.vline { position: absolute; left: 50%; top: 0; bottom: 14rem; width: 20px; height: calc(100% - 14rem); transform: translateX(-50%); overflow: visible; }
.vline path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.timeline ol { list-style: none; margin: 0; padding: 1rem 0 0; }
.timeline li { position: relative; width: 50%; padding: 0 0 clamp(2.5rem, 7vh, 4.5rem); display: flex; gap: 0.8rem; align-items: baseline; }
.timeline li::before { content: ""; position: absolute; top: 1.2rem; width: 2.2rem; height: 2px; background: var(--ink); border-radius: 2px; }
.timeline li:nth-child(odd) { padding-right: 3.4rem; justify-content: flex-end; text-align: right; }
.timeline li:nth-child(odd)::before { right: 0.2rem; transform: rotate(-4deg); }
.timeline li:nth-child(even) { margin-left: 50%; padding-left: 3.4rem; }
.timeline li:nth-child(even)::before { left: 0.2rem; transform: rotate(3deg); }
.num { font-family: var(--hand); font-weight: 700; font-size: var(--fs-2xl); line-height: 0.8; }
.timeline li p { margin: 0; max-width: 22ch; font-size: var(--fs-lg); line-height: 1.3; }
.timeline li:nth-child(odd) .num { order: 2; }
.still { position: relative; text-align: center; padding-top: 2rem; background: var(--paper); }
.still-q { font-family: var(--hand); font-weight: 700; font-size: var(--fs-xl); transform: rotate(-3deg); margin-bottom: 0.4rem; }
.still .actions { justify-content: center; }

/* youth care */
.care-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.care-art { max-width: 440px; }
.quote { font-family: var(--hand); font-weight: 700; font-size: var(--fs-xl); line-height: 1.05; margin-bottom: 1.2rem; }
.care p:not(.quote) { max-width: 54ch; }
.complaints { margin-top: 2.2rem; padding-top: 1.6rem; position: relative; }
.complaints::before { content: ""; position: absolute; left: 0; top: 0; width: 6rem; height: 2px; background: var(--ink); transform: rotate(-1.5deg); }
.complaints h3 { font-size: var(--fs-xl); margin-bottom: 0.6rem; }
.complaints p { font-size: var(--fs-sm); color: var(--ink-soft); }
.complaints a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* close */
.close { text-align: center; padding-bottom: clamp(5rem, 12vh, 8rem); }
.thanks { position: relative; width: min(320px, 80vw); margin: 0 auto 2.5rem; aspect-ratio: 300 / 120; display: grid; place-items: center; }
.rays { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rays path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.thanks p { font-family: var(--hand); font-weight: 700; font-size: var(--fs-2xl); margin: 0; transform: rotate(-2deg); }
.close h2 { font-size: var(--fs-2xl); }
.close .sub { margin: 0 auto; max-width: 34ch; }
.close .actions { justify-content: center; }

/* footer */
footer { border-top: 2px solid rgba(22, 22, 22, 0.12); padding: 2.5rem 0 3rem; }
.foot { display: flex; flex-wrap: wrap; gap: 0.6rem 2.5rem; align-items: baseline; justify-content: space-between; }
.foot p { margin: 0; }
.mark { font-family: var(--hand); font-weight: 700; font-size: var(--fs-xl); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; font-size: var(--fs-sm); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-links a[aria-current] { text-decoration: underline; }
.copy { font-size: var(--fs-xs); color: var(--ink-soft); }

/* floating WhatsApp (mobile) */
.wa-float { display: none; }

/* draw-in animation */
.js .draw path, .js .rays path { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); transition: stroke-dashoffset 1.6s ease; }
.js .seen .draw path, .js .seen .rays path, .js .draw.seen path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .js .draw path, .js .rays path { stroke-dashoffset: 0; transition: none; } .menu a, .btn, .box { transition: none; } }

@media (max-width: 1200px) {
  .boxes { grid-template-columns: repeat(3, 1fr); }
  .box h3 { font-size: var(--fs-xl); }
}
@media (max-width: 860px) {
  .hero-grid, .intro, .care-grid { grid-template-columns: 1fr; }
  .hero-text { order: -1; }
  .hero-art { max-width: 520px; }
  .care-art { max-width: 380px; }
  .intro-art { justify-self: start; max-width: 280px; }
}
@media (max-width: 640px) {
  .top { justify-content: flex-start; gap: 1rem; }
  .menu { gap: 1rem; }
  .langs { gap: 0.5rem; }
  .boxes { grid-template-columns: 1fr 1fr; gap: 1.4rem 1rem; }
  .boxes li:last-child { grid-column: 1 / -1; }
  .boxes li:last-child .box { aspect-ratio: 44 / 15; }
  .vline { left: 0.4rem; transform: none; }
  .timeline li, .timeline li:nth-child(even), .timeline li:nth-child(odd) { width: auto; margin-left: 0; padding: 0 0 2.4rem 3rem; justify-content: flex-start; text-align: left; }
  .timeline li::before, .timeline li:nth-child(odd)::before, .timeline li:nth-child(even)::before { left: 0.8rem; right: auto; width: 1.6rem; }
  .timeline li:nth-child(odd) .num { order: 0; }
  .btn { width: 100%; }
  .wa-float { display: grid; place-items: center; position: fixed; right: 1rem; bottom: 1rem; z-index: 30; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--marker); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.35); transition: opacity 0.2s; }
  .wa-float svg { width: 1.6rem; height: 1.6rem; }
  body.at-end .wa-float { opacity: 0; pointer-events: none; }
}
@media (max-width: 360px) {
  .menu a { font-size: var(--fs-lg); }
  .boxes { gap: 1.2rem 0.8rem; }
  .boxes p { font-size: var(--fs-xs); }
  .box h3 { font-size: var(--fs-lg); }
}
