/* Original PuzzleLab stationery artwork and public doorway presentation. */
:root {
  color-scheme: light;
  --cream: #fbf7f0;
  --paper: #fffdf9;
  --ink: #443344;
  --muted: #6b5d67;
  --plum: #674461;
  --plum-deep: #51344b;
  --line: #dfd3ce;
  --sage: #e1e9da;
  --sage-ink: #44613e;
  --peach: #f2dfd0;
  --peach-ink: #825036;
  --lavender: #e9e0ed;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 1rem/1.65 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--plum); text-underline-offset: .22em; }
a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 5px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
h2 { margin-bottom: .85rem; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.2; letter-spacing: -.035em; }
h3 { margin-bottom: .6rem; font-size: 1.13rem; line-height: 1.35; }
section, #open-puzzlelab { scroll-margin-top: 2rem; }
main { width: min(1120px, calc(100% - 3rem)); margin: 0 auto; }
.skip-link { position: absolute; z-index: 5; top: 1rem; left: -9999px; border-radius: 8px; background: white; padding: .7rem 1rem; color: var(--plum); }
.skip-link:focus { left: 1rem; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: min(1280px, calc(100% - 3rem)); min-height: 96px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .85rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: flex; gap: 2px; align-items: center; transform: rotate(-5deg); }
.brand-mark > * { display: grid; width: 32px; height: 36px; place-items: center; border-radius: 9px 3px 3px 9px; background: var(--plum); color: white; font-size: .95rem; font-weight: 750; line-height: 1; }
.brand-mark > :last-child { border-radius: 3px 9px 9px 3px; background: var(--sage); color: var(--sage-ink); }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 1.2rem; font-weight: 750; letter-spacing: -.015em; line-height: 1.4; }
.brand-copy small { color: var(--muted); font-size: .76rem; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .83rem; text-decoration-color: #b6a1ae; }
.back-link:hover { color: var(--plum-deep); }

.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(310px, .9fr); align-items: center; gap: clamp(2rem, 5vw, 4rem); padding: clamp(3rem, 6vw, 5rem) 0 3.5rem; }
.kicker { margin: 0 0 1rem; color: #775b6c; font-size: .74rem; font-weight: 750; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; }
.hero h1 { max-width: 10ch; margin: 0 0 1.5rem; font-size: clamp(3rem, 5.8vw, 4.65rem); line-height: 1.04; letter-spacing: -.055em; text-wrap: balance; }
.hero-description { max-width: 460px; margin-bottom: 1.7rem; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.16rem); line-height: 1.8; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 54px; border: 1px solid transparent; border-radius: 13px; padding: .85rem 1.3rem; font-size: .97rem; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; transition: background .16s ease, box-shadow .16s ease; }
.button--primary { border-color: var(--plum-deep); background: var(--plum); color: white; box-shadow: 0 4px 0 #e0d2d9; }
.button--primary:hover { background: var(--plum-deep); box-shadow: 0 4px 0 #d3c0ce; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .87rem; font-weight: 650; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--plum-deep); text-decoration-thickness: 2px; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.setup-note { max-width: 440px; margin: .9rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.65; }

/* Small, original paper-and-pencil desk scene; decorative, not a sample output. */
.paper-scene { position: relative; width: 100%; height: 420px; isolation: isolate; }
.paper-scene::before { content: ""; position: absolute; inset: 46px 0 20px; z-index: -1; border-radius: 48% 52% 42% 58%; background: #efe7e7; transform: rotate(-8deg); }
.paper-scene::after { content: ""; position: absolute; z-index: -1; left: 8%; bottom: 28px; width: 71%; height: 26px; border-radius: 50%; background: #bb9aa514; filter: blur(5px); }
.paper-sheet { position: absolute; width: 230px; height: 298px; border: 1px solid #d9d0ca; border-radius: 5px 5px 15px 5px; box-shadow: 0 12px 24px #5d404018; }
.paper-sheet--back { left: 11%; top: 57px; transform: rotate(-12deg); background: repeating-linear-gradient(0deg, #fffdf7 0 24px, #e8e2db 24px 25px); }
.paper-sheet--back::before { content: ""; position: absolute; inset: 0 auto 0 26px; border-left: 1px solid #e8bdba; }
.paper-sheet--front { left: 28%; top: 48px; padding: 30px 27px; transform: rotate(7deg); background: #fffef9; }
.paper-sheet--front::before { content: ""; position: absolute; top: -12px; left: 62px; width: 89px; height: 25px; background: #dfcfebbc; transform: rotate(-10deg); clip-path: polygon(3% 0, 100% 4%, 96% 100%, 0 92%); }
.paper-heading { display: block; min-height: 18px; margin-bottom: 17px; color: #654e62; font: 700 .9rem/1.3 Georgia, serif; letter-spacing: .015em; text-align: center; }
.paper-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.paper-grid span { display: grid; min-height: 27px; place-items: center; border: 1px solid #eee7de; border-radius: 3px; color: #776476; font: 600 .78rem/1 "Segoe UI", sans-serif; }
.paper-grid span:nth-child(n+6):nth-child(-n+10) { border-color: #d5e0cf; background: #e0ead8; color: #466045; }
.paper-lines { height: 29px; margin: 17px 9px 0; background: repeating-linear-gradient(0deg, transparent 0 8px, #d9cec9 8px 9px, transparent 9px 10px); }
.paper-checks { position: absolute; bottom: 30px; left: 20px; color: #668364; font-size: .85rem; line-height: 1.1; }
.paper-label { position: absolute; left: -23px; bottom: -22px; padding: 10px 16px; border-radius: 8px; background: #eed9c8; color: #694839; font: italic .9rem/1.3 Georgia, serif; transform: rotate(-13deg); box-shadow: 0 3px 6px #5d404011; }
.pencil { position: absolute; z-index: 2; top: 142px; right: 5%; width: 17px; height: 199px; border: 1px solid #b17d45; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #d9ab66 0 25%, #efcb8a 25% 72%, #d5a05b 72%); transform: rotate(24deg); box-shadow: 4px 5px 7px #593d3d16; }
.pencil::before { content: ""; position: absolute; top: -22px; left: -1px; width: 17px; height: 27px; border-radius: 6px 6px 0 0; border-bottom: 8px solid #c8c4bc; background: #dba9a0; }
.pencil::after { content: ""; position: absolute; left: -1px; bottom: -28px; width: 17px; height: 28px; background: linear-gradient(#e2c5a2 0 70%, #5b4850 70%); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.star { position: absolute; color: #ba884a; font-size: 35px; line-height: 1; }
.star:empty::before { content: "✧"; }
.star--one { top: 22px; right: 15%; transform: rotate(15deg); }
.star--two { bottom: 35px; left: 7%; color: #8b7499; font-size: 26px; transform: rotate(-8deg); }

.promise-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .65rem 3rem; margin: 0 0 4.5rem; border-block: 1px solid var(--line); padding: 1.1rem 1.5rem; list-style: none; }
.promise-strip li { display: inline-flex; align-items: center; gap: .65rem; color: #655460; font-size: .86rem; font-weight: 600; }
.promise-strip li > span { color: #5d7955; font-size: .9rem; }
.section-heading { max-width: 650px; margin: 0 auto 2rem; text-align: center; }
.section-heading .kicker { margin-bottom: .7rem; }
.section-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .97rem; }

/* These cards describe the collection; only the main launch link opens the app. */
.puzzle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.puzzle-card { --tile: var(--lavender); --tile-ink: #684a71; display: grid; grid-template-columns: 47px minmax(0, 1fr); align-items: start; gap: .9rem; min-height: 138px; border: 1px solid #e0d6d1; border-radius: 16px; background: var(--paper); padding: 1.35rem 1.2rem; box-shadow: 0 3px 0 #eee6de; }
.puzzle-card:nth-child(3n+2) { --tile: var(--sage); --tile-ink: var(--sage-ink); }
.puzzle-card:nth-child(3n) { --tile: var(--peach); --tile-ink: var(--peach-ink); }
.puzzle-icon { display: grid; width: 47px; height: 47px; place-items: center; border-radius: 12px; background: var(--tile); color: var(--tile-ink); font: 750 .89rem/1 "Segoe UI", sans-serif; letter-spacing: .03em; }
.puzzle-card strong { display: block; margin: .1rem 0 .45rem; font-size: 1rem; font-weight: 700; line-height: 1.35; }
.puzzle-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }

#how-it-works { padding-top: 4.75rem; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin: 0; padding: 0 .5rem; list-style: none; }
.steps > li { position: relative; padding-top: .3rem; }
.step-number { display: inline-grid; width: 42px; height: 42px; margin-bottom: 1rem; place-items: center; border: 1px solid #dac9dc; border-radius: 14px; background: var(--lavender); color: var(--plum); font: 700 1.15rem/1 Georgia, serif; transform: rotate(-4deg); }
.steps > li:nth-child(2) .step-number { border-color: #cbd9c0; background: var(--sage); color: var(--sage-ink); transform: rotate(4deg); }
.steps > li:nth-child(3) .step-number { border-color: #e3ccba; background: var(--peach); color: var(--peach-ink); transform: rotate(-3deg); }
.steps p { max-width: 320px; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.start-note { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 1.2rem; margin-top: 3.5rem; border: 1px solid #e2d2c8; border-radius: 18px; background: #f4e9df; padding: 1.7rem 2rem; }
.note-icon { color: #9b795a; font-size: 2.3rem; line-height: 1; text-align: center; }
.start-note h2 { margin-bottom: .45rem; font-size: clamp(1.35rem, 2.7vw, 1.75rem); line-height: 1.3; }
.start-note p { max-width: 640px; margin-bottom: 0; color: #715b59; font-size: .9rem; line-height: 1.65; }
.start-note .text-link { white-space: nowrap; }

.setup-details { margin: 2rem 0 4rem; border: 1px solid var(--line); border-radius: 15px; background: #f7f1e9; }
summary { cursor: pointer; }
.setup-details > summary { border-radius: 14px; padding: 1.15rem 1.3rem; color: #5e4858; font-size: .95rem; font-weight: 650; }
.setup-details > summary:hover { background: #f0e8df; }
.setup-details[open] > summary { border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.setup-content { max-width: 880px; padding: 1.15rem 1.5rem 1.5rem; color: var(--muted); font-size: .9rem; line-height: 1.8; }
.setup-content p { margin-bottom: .85rem; }
.setup-content > :last-child { margin-bottom: 0; }
.setup-content strong { color: #564351; font-weight: 700; }
.setup-content :is(ol, ul) { padding-left: 1.3rem; }
.setup-content li + li { margin-top: .4rem; }
.technical-note { margin-top: 1.2rem; border-top: 1px solid #e0d6d0; padding-top: .65rem; }
.technical-note summary { padding: .45rem 0; color: #765f70; font-size: .83rem; font-weight: 600; }
.technical-note p { margin: .65rem 0 0; font-size: .84rem; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(1280px, calc(100% - 3rem)); margin: 0 auto; border-top: 1px solid var(--line); padding: 1.5rem 0 2rem; color: var(--muted); font-size: .8rem; }
.site-footer > span { color: #604859; font-weight: 650; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(275px, .85fr); gap: 1.5rem; }
  .hero h1 { font-size: clamp(3rem, 6.3vw, 4rem); }
  .paper-scene { height: 360px; }
  .paper-sheet { width: 200px; height: 270px; }
  .paper-sheet--front { left: 23%; top: 39px; padding: 25px 22px; }
  .paper-sheet--back { left: 6%; top: 48px; }
  .paper-grid span { min-height: 24px; }
  .paper-lines { height: 23px; margin-top: 14px; }
  .paper-checks { bottom: 24px; left: 16px; }
  .pencil { top: 130px; right: 1%; height: 170px; }
  .star--two { bottom: 14px; }
  .promise-strip { gap: .6rem 1.4rem; }
  .puzzle-card { grid-template-columns: 40px minmax(0, 1fr); gap: .7rem; padding: 1.1rem; }
  .puzzle-icon { width: 40px; height: 40px; }
  .puzzle-card strong { font-size: .94rem; }
  .steps { gap: 1.7rem; }
  .start-note { grid-template-columns: 38px minmax(0, 1fr); padding: 1.5rem; }
  .start-note .text-link { grid-column: 2; justify-self: start; }
}
@media (max-width: 700px) {
  main, .site-header, .site-footer { width: calc(100% - 2.2rem); }
  .site-header { min-height: 86px; gap: 1rem; }
  .brand { gap: .6rem; }
  .brand-copy strong { font-size: 1.08rem; }
  .brand-copy small { font-size: .7rem; }
  .back-link { max-width: 115px; font-size: .75rem; line-height: 1.5; text-align: right; }
  .hero { grid-template-columns: 1fr; gap: 1.6rem; padding: 2.7rem 0 1.7rem; }
  .hero h1 { max-width: 12ch; font-size: clamp(3rem, 9.3vw, 4.2rem); }
  .hero-description { max-width: 520px; font-size: 1.05rem; }
  .paper-scene { justify-self: center; width: min(385px, 100%); height: 360px; overflow: clip; }
  .paper-scene::before { inset: 25px 5px 10px; }
  .paper-sheet--front { left: 30%; top: 27px; }
  .paper-sheet--back { left: 15%; top: 37px; }
  .pencil { right: 8%; top: 118px; }
  .star--one { top: 4px; right: 16%; }
  .star--two { bottom: 15px; left: 10%; }
  .promise-strip { margin-bottom: 3.3rem; padding: 1rem .2rem; }
  .promise-strip { justify-content: flex-start; gap: .65rem 1.7rem; }
  .promise-strip li { font-size: .81rem; }
  .section-heading { text-align: left; }
  .puzzle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .puzzle-card { grid-template-columns: 1fr; align-content: start; gap: .7rem; min-height: 172px; }
  .puzzle-card strong { font-size: 1rem; }
  .puzzle-card p { font-size: .82rem; }
  #how-it-works { padding-top: 3.5rem; }
  .steps { grid-template-columns: 1fr; gap: 1.7rem; padding: 0; }
  .steps > li { display: grid; grid-template-columns: 43px minmax(0, 1fr); gap: .1rem 1rem; }
  .step-number { grid-row: span 2; margin: 0; }
  .steps h3 { margin: .05rem 0 .25rem; }
  .steps p { grid-column: 2; max-width: none; }
  .start-note { margin-top: 2.5rem; gap: .8rem; padding: 1.35rem 1.1rem; }
  .setup-details { margin-bottom: 2.7rem; }
  .setup-details > summary { padding: 1rem; }
  .setup-content { padding: 1rem; }
}
@media (max-width: 400px) {
  .site-header { flex-wrap: wrap; gap: .2rem .7rem; padding: 1rem 0; }
  .brand-mark > * { width: 26px; height: 31px; font-size: .8rem; }
  .brand-copy strong { font-size: 1rem; }
  .brand-copy small { max-width: 150px; line-height: 1.4; }
  .back-link { max-width: 86px; font-size: .71rem; }
  .hero h1 { font-size: 2.85rem; }
  .button--primary { width: 100%; padding-inline: .85rem; font-size: .91rem; }
  .paper-scene { height: 360px; }
  .paper-sheet--front { left: 22%; }
  .paper-sheet--back { left: 5%; }
  .pencil { right: 12%; }
  .puzzle-grid { grid-template-columns: 1fr; }
  .puzzle-card { grid-template-columns: 44px minmax(0, 1fr); min-height: 119px; padding: 1.15rem; }
  .start-note { grid-template-columns: 1fr; }
  .note-icon { justify-self: start; font-size: 1.8rem; }
  .start-note .text-link { grid-column: 1; }
  .site-footer { align-items: flex-start; font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media (forced-colors: active) {
  .button, .puzzle-card, .setup-details, .step-number { border: 1px solid CanvasText; }
}
@media print {
  body { background: white; }
  main, .site-header, .site-footer { width: 100%; }
  .paper-scene { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 1.5rem; }
  .puzzle-card, .steps > li, .start-note { break-inside: avoid; box-shadow: none; }
}
