/* Lukely World — site styles. Mobile-first, no frameworks, no external requests. */

@font-face { font-family: "Andika"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/andika-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Andika"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/andika-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Sniglet"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/sniglet-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Sniglet"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/sniglet-800-latin.woff2") format("woff2"); }

:root {
  --ink: #2b2d42;
  --ink-soft: #4a4e69;
  --paper: #fffaf0;
  --cream: #fff4df;
  --sun: #ffc93c;
  --sun-deep: #f4a300;
  --sun-tint: #fff1c9;
  --sky: #8ecae6;
  --sky-tint: #e6f4fa;
  --coral: #f2785c;
  --coral-tint: #fde3db;
  --leaf: #7cb342;
  --leaf-tint: #e8f3dc;
  --lilac: #b39ddb;
  --lilac-tint: #efe9f8;
  --white: #ffffff;
  --link: #a33a1f;          /* deep coral: 6.4:1 on paper */
  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobble-2: 18px 225px 18px 255px / 255px 18px 225px 18px;
  --shadow: 4px 5px 0 var(--ink);
  --shadow-sm: 2px 3px 0 var(--ink);
  --max: 72rem;
  --font-body: "Andika", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-display: "Sniglet", "Andika", "Trebuchet MS", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* faint paper grain, generated in code (SVG noise) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .18 0 0 0 0 .26 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }

img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-style: wavy; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 6px var(--sun); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.25rem, 8.4vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 5.6vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 3.6vw, 1.6rem); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.15rem, 3.4vw, 1.35rem); color: var(--ink-soft); max-width: 36em; }
.muted { color: var(--ink-soft); }
.small { font-size: .92rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--sun); color: var(--ink); padding: .6rem 1rem; border: 3px solid var(--ink); border-radius: var(--wobble); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }
.section { padding: clamp(3rem, 9vw, 6rem) 0; position: relative; }
.section--sky { background: var(--sky-tint); }
.section--sun { background: var(--sun-tint); }
.section--leaf { background: var(--leaf-tint); }
.section--lilac { background: var(--lilac-tint); }
.section-head { max-width: 40rem; margin-bottom: clamp(1.75rem, 5vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-block; font-family: var(--font-display); font-size: .95rem; letter-spacing: .02em; padding: .2rem .85rem; margin-bottom: 1rem; background: var(--white); border: 2px solid var(--ink); border-radius: var(--wobble); }

/* crayon squiggle under a word */
.scribble { position: relative; white-space: nowrap; z-index: 0; }
.scribble svg { position: absolute; left: -2%; bottom: -.18em; width: 104%; height: .42em; z-index: -1; overflow: visible; }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 10; padding: 1rem 0 .5rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; line-height: 1; }
.brand:hover { text-decoration: none; }
.brand svg { width: 2.6rem; height: 2.6rem; flex: none; }
.brand small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-top: .2rem; }
.brand .tm { font-size: .5em; vertical-align: super; font-family: var(--font-body); font-weight: 400; }
.nav { width: 100%; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .3rem; }
.nav a { display: inline-block; padding: .45rem .7rem; color: var(--ink); text-decoration: none; font-weight: 700; border-radius: var(--wobble); border: 2px solid transparent; }
.nav a:hover { border-color: var(--ink); background: var(--white); }
.nav a[aria-current="page"] { background: var(--white); border-color: var(--ink); box-shadow: var(--shadow-sm); }
.nav .nav-cta { margin-left: auto; }
.nav .nav-cta a { background: var(--sun); border-color: var(--ink); box-shadow: var(--shadow-sm); }
@media (min-width: 52rem) {
  .nav { width: auto; }
  .nav ul { gap: .4rem; }
  .nav .nav-cta { margin-left: .6rem; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.4rem; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; line-height: 1.1; color: var(--ink); background: var(--sun); border: 3px solid var(--ink); border-radius: var(--wobble); box-shadow: var(--shadow); text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translate(-1px, -2px) rotate(-.6deg); box-shadow: 6px 7px 0 var(--ink); text-decoration: none; }
.btn:active { transform: translate(2px, 3px); box-shadow: var(--shadow-sm); }
.btn--white { background: var(--white); }
.btn--sky { background: var(--sky); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(1.5rem, 5vw, 3.5rem) 0 clamp(3.5rem, 9vw, 6rem); position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; } }
.hero h1 { margin-bottom: .45em; }
.hero .note { margin-top: 1.4rem; font-size: .98rem; color: var(--ink-soft); display: flex; align-items: center; gap: .5rem; }
.hero .note svg { width: 1.4rem; height: 1.4rem; flex: none; }
.hero-art { position: relative; }
.hero-art .art-slot { aspect-ratio: 1 / 1; }

/* decorative doodles */
.doodle { position: absolute; pointer-events: none; z-index: 0; }
.doodle--sun { width: clamp(5rem, 16vw, 9rem); top: -1.5rem; right: -1rem; }
.doodle--cloud-a { width: clamp(6rem, 18vw, 10rem); top: 6%; left: -3rem; opacity: .9; }
.doodle--cloud-b { width: clamp(5rem, 12vw, 8rem); bottom: 4%; right: 46%; opacity: .75; display: none; }
.doodle--star-a { width: 2.2rem; bottom: -.5rem; left: -1rem; }
.doodle--star-b { width: 1.6rem; top: 30%; right: -1.2rem; }
.doodle--curl { width: 3.5rem; bottom: -1.5rem; right: 8%; }
@media (min-width: 56rem) { .doodle--cloud-b { display: block; } }
.hero > .wrap, .section > .wrap, .section > .wrap--narrow { position: relative; z-index: 1; }

/* ---------- art placeholders ---------- */
.art-slot {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: .4rem; padding: 1.25rem; min-height: 10rem;
  background-color: var(--white);
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(43,45,66,.045) 14px 16px);
  border: 3px dashed var(--ink-soft);
  border-radius: var(--wobble-2);
  color: var(--ink-soft);
}
.art-slot svg { width: 3rem; height: 3rem; }
.art-slot strong { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); line-height: 1.2; }
.art-slot .slot-tag { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; background: var(--sun-tint); border: 1.5px solid var(--ink-soft); border-radius: 999px; padding: .1rem .6rem; }
.art-slot--sm { min-height: 7rem; padding: .75rem; gap: .25rem; }
.art-slot--sm svg { width: 2rem; height: 2rem; }
.art-slot--sm strong { font-size: 1rem; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.card { position: relative; background: var(--white); border: 3px solid var(--ink); border-radius: var(--wobble); box-shadow: var(--shadow); padding: 1.6rem 1.5rem 1.5rem; }
.card:nth-child(2n) { border-radius: var(--wobble-2); }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 3.5rem; height: 3.5rem; margin-bottom: .75rem; }
.card--tilt-l { transform: rotate(-.8deg); }
.card--tilt-r { transform: rotate(.7deg); }
.card--link { display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.card--link:hover { transform: translate(-1px, -3px) rotate(-.4deg); box-shadow: 6px 8px 0 var(--ink); text-decoration: none; }
.card--link .more { margin-top: auto; padding-top: 1rem; font-weight: 700; color: var(--link); }
.card--link:hover .more { text-decoration: underline wavy; text-underline-offset: 4px; }
.card .art-slot { margin: -.25rem 0 1.1rem; min-height: 9rem; }

.badge { display: inline-block; font-family: var(--font-display); font-size: .85rem; padding: .15rem .7rem; border: 2px solid var(--ink); border-radius: var(--wobble); background: var(--sun); margin-bottom: .75rem; }
.badge--sky { background: var(--sky); }
.badge--lilac { background: var(--lilac); }
.badge--leaf { background: var(--leaf); }

/* ---------- split ---------- */
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } .split--rev > :first-child { order: 2; } }
.split .art-slot { aspect-ratio: 4 / 3; }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; position: relative; padding: 1.4rem 1.25rem 1.25rem 4.4rem; background: var(--white); border: 3px solid var(--ink); border-radius: var(--wobble-2); }
.steps li::before { content: counter(step); position: absolute; left: 1rem; top: 1.1rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; background: var(--sun); border: 2.5px solid var(--ink); border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%; }
.steps li:nth-child(2)::before { background: var(--sky); }
.steps li:nth-child(3)::before { background: var(--coral); }
.steps h3 { font-size: 1.25rem; margin-bottom: .2em; }
.steps p { margin: 0; }

/* ---------- crayon divider ---------- */
.divider { display: block; width: 100%; height: 22px; color: var(--ink); opacity: .85; }
.divider-wrap { padding: 0; }

/* ---------- join ---------- */
.join { background: var(--sky-tint); }
.join-box { position: relative; background: var(--white); border: 3px solid var(--ink); border-radius: var(--wobble); box-shadow: 6px 7px 0 var(--ink); padding: clamp(1.75rem, 5vw, 3rem); max-width: 44rem; margin-inline: auto; text-align: center; }
.join-box h2 { margin-bottom: .3em; }
.join-box .doodle--star-a { left: auto; right: -1rem; top: -1rem; bottom: auto; width: 2.6rem; }
.join-box .doodle--star-b { right: auto; left: -.9rem; top: auto; bottom: 1.5rem; }
.signup { margin-top: 1.5rem; display: grid; gap: .9rem; text-align: left; }
.signup label.field-label { font-weight: 700; display: block; margin-bottom: .3rem; }
.signup input[type="email"] { width: 100%; min-height: 3.1rem; font: inherit; color: var(--ink); padding: .6rem 1rem; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px 22px 16px 20px / 20px 14px 22px 16px; }
.signup input[type="email"]::placeholder { color: #6b6f86; }
.signup .check { display: flex; gap: .65rem; align-items: flex-start; font-size: .98rem; }
.signup .check input { width: 1.4rem; height: 1.4rem; margin: .15rem 0 0; accent-color: var(--ink); flex: none; }
.signup .btn { width: 100%; }
@media (min-width: 40rem) { .signup .btn { width: auto; justify-self: start; } }
.signup .fine { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.signup-status { min-height: 1.5em; font-weight: 700; margin: 0; }
.signup-status:not(:empty) { padding: .75rem 1rem; background: var(--leaf-tint); border: 2px solid var(--ink); border-radius: var(--wobble-2); }
.list-flag { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; padding: .2rem .7rem; background: var(--sun-tint); border: 2px dashed var(--ink-soft); border-radius: 999px; }

/* ---------- book page ---------- */
.book-hero { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .book-hero { grid-template-columns: .85fr 1.15fr; gap: 4rem; } }
.cover-slot { aspect-ratio: 8.5 / 11; max-width: 26rem; width: 100%; margin-inline: auto; }
.facts { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .55rem; }
.facts li { display: flex; gap: .7rem; align-items: flex-start; }
.facts svg { width: 1.5rem; height: 1.5rem; flex: none; margin-top: .2rem; }
.sample { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) { .sample { grid-template-columns: .8fr 1.2fr; gap: 3.5rem; } }
.page-mock { aspect-ratio: 8.5 / 11; width: 100%; max-width: 22rem; margin-inline: auto; background: var(--white); border: 2px solid #cfcfd6; border-radius: 6px; box-shadow: 0 1px 0 #e5e5ea, 6px 8px 0 rgba(43,45,66,.12); padding: 9% 9% 7%; display: flex; flex-direction: column; transform: rotate(-1.2deg); }
.page-mock .art-slot { flex: 1; min-height: 0; border-radius: 10px; }
.page-mock .word { font-family: var(--font-body); font-weight: 700; font-size: clamp(2.2rem, 9vw, 3rem); text-align: center; line-height: 1; margin: 1rem 0 .4rem; }
.page-mock .prompt { font-size: .78rem; text-align: center; color: var(--ink-soft); margin: 0; border-top: 1.5px dashed #c9c9d1; padding-top: .5rem; }
.words { display: grid; gap: 1.25rem; }
@media (min-width: 40rem) { .words { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .words { grid-template-columns: repeat(5, 1fr); } }
.words h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li { padding: .15rem .65rem; background: var(--white); border: 2px solid var(--ink); border-radius: 14px 18px 12px 16px / 16px 12px 18px 14px; font-size: .95rem; }
.words > div:nth-child(1) .chips li { background: var(--sun-tint); }
.words > div:nth-child(2) .chips li { background: var(--sky-tint); }
.words > div:nth-child(3) .chips li { background: var(--coral-tint); }
.words > div:nth-child(4) .chips li { background: var(--leaf-tint); }
.words > div:nth-child(5) .chips li { background: var(--lilac-tint); }

/* ---------- printables ---------- */
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 40rem) { .thumbs { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 60rem) { .thumbs { grid-template-columns: repeat(5, 1fr); } }
.thumbs li { background: var(--white); border: 2px solid var(--ink); border-radius: 8px; padding: .6rem .6rem .7rem; box-shadow: var(--shadow-sm); text-align: center; }
.thumbs li:nth-child(odd) { transform: rotate(-1deg); }
.thumbs li:nth-child(even) { transform: rotate(.9deg); }
.thumbs .art-slot { aspect-ratio: 8.5 / 11; min-height: 0; padding: .5rem; border-width: 2px; border-radius: 6px; }
.thumbs .art-slot svg { width: 1.6rem; height: 1.6rem; }
.thumbs .moment { display: block; font-size: .82rem; color: var(--ink-soft); margin-top: .4rem; }
.thumbs .w { display: block; font-weight: 700; font-size: 1.05rem; line-height: 1.2; }

/* ---------- prose (legal) ---------- */
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); margin-top: 2.2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose .callout { background: var(--white); border: 3px solid var(--ink); border-radius: var(--wobble-2); padding: 1.1rem 1.25rem; margin: 1.5rem 0; }
.prose .callout p:last-child { margin: 0; }
.todo { background: #fff3a8; outline: 2px dashed #b38600; outline-offset: 1px; border-radius: 3px; padding: 0 .2em; font-weight: 700; }
.draft-flag { display: inline-block; font-size: .85rem; font-weight: 700; padding: .25rem .8rem; background: var(--coral-tint); border: 2px dashed var(--link); border-radius: 999px; margin-bottom: 1rem; }
.toc { background: var(--white); border: 2px solid var(--ink); border-radius: var(--wobble); padding: 1rem 1.25rem; margin: 1.5rem 0 2rem; }
.toc ol { margin: .4rem 0 0; columns: 1; }
@media (min-width: 40rem) { .toc ol { columns: 2; } }

/* ---------- page header ---------- */
.page-hero { padding: clamp(1.5rem, 5vw, 3rem) 0 clamp(2rem, 6vw, 3.5rem); position: relative; overflow: hidden; }
.page-hero .doodle--sun { top: -1rem; right: 1rem; width: clamp(4rem, 12vw, 7rem); }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: clamp(3rem, 10vw, 7rem) 0; }
.lost .big { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 22vw, 10rem); line-height: 1; margin: 0; color: var(--sun-deep); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.lost .btn-row { justify-content: center; }
.lost .art-slot { max-width: 18rem; margin: 2rem auto 0; aspect-ratio: 1; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #f4f1ea; padding: 3rem 0 2rem; margin-top: 0; }
.site-footer a { color: #ffe08a; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer .brand small { color: #d9d6e4; }
.site-footer h2 { font-size: 1.05rem; font-family: var(--font-display); margin-bottom: .6rem; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 2px dashed rgba(255,255,255,.25); font-size: .88rem; color: #d9d6e4; }
.footer-legal p { margin: 0 0 .4rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover, .card--link:hover { transform: none; }
}
@media print {
  body { background: #fff; }
  .site-header .nav, .join, .doodle, .site-footer .footer-grid > div:not(:first-child) { display: none !important; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.h3-size { font-size: clamp(1.3rem, 3.6vw, 1.6rem); }

/* ---- refinements ---- */
.section, .hero, .page-hero { overflow-x: hidden; overflow-x: clip; }
.section > .doodle--star-b { top: 1.5rem; right: 4%; width: 2rem; }
@media (max-width: 51.99rem) {
  .site-header { padding-top: .85rem; }
  .nav ul { justify-content: space-between; gap: .25rem; flex-wrap: nowrap; }
  .nav a { padding: .4rem .5rem; font-size: 1rem; }
  .nav .nav-cta { margin-left: 0; }
}
@media (max-width: 22rem) {
  .nav a { padding: .35rem .35rem; font-size: .92rem; }
}
.nav a { white-space: nowrap; }
.signup-status:empty { min-height: 0; margin-top: -.9rem; }
@media (max-width: 51.99rem) { .nav a { padding: .4rem .45rem; font-size: .97rem; } .nav .nav-cta a { padding: .4rem .65rem; } }
.cover-slot .art-slot { height: 100%; }
