/*
  VOICE: warm, quiet, homemade; a minimalist studio notebook.
  IDEA: a crafter's sketchbook page: cream paper, ink-green type, framed work.
  PICTURE: her own framed kinusaiga pieces, large and square-cropped.
  COLOUR and TYPE: her brand: cream paper, forest green, one rust accent. Lora + Nunito Sans.
  LAYOUT: fixed side menu (Option E), single scrolling page; top bar + drawer under 900px.
*/
:root {
  color-scheme: light dark;
  --paper: light-dark(#FBF8F2, #18211D);
  --card: light-dark(#FFFFFF, #212C27);
  --ink: light-dark(#26302B, #ECE6D9);
  --muted: light-dark(#5A635D, #B4AD9F);
  --green: light-dark(#2F5141, #9CC3AE);
  --green-deep: light-dark(#2F5141, #23382E);
  --on-green: #F6F1E6;
  --rust: light-dark(#A54A25, #E39A73);
  --line: light-dark(#E6DFD1, #34413A);
  --field: light-dark(#B9B09F, #56625B);
  --soft: light-dark(#EFE9DD, #26322C);
  --serif: Lora, Georgia, serif;
  --sans: "Nunito Sans", system-ui, sans-serif;
}
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--green); line-height: 1.08; text-wrap: balance; margin: 0 0 12px; }
h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.5px; }
h2 { font-size: clamp(32px, 4vw, 44px); }
h3 { font-size: 24px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.eyebrow { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.text-link { font-weight: 700; color: var(--green); text-decoration: none; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

/* Layout shell */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--line); padding: 40px 32px;
  display: flex; flex-direction: column; gap: 36px; background: var(--paper);
}
.logo img { width: 100px; height: 120px; object-fit: cover; border-radius: 6px; }
.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a { color: var(--muted); text-decoration: none; min-height: 40px; display: flex; align-items: center; font-size: 16px; }
.sidebar nav a:hover, .sidebar nav a.active { color: var(--green); font-weight: 700; }
.next { border-top: 1px solid var(--line); padding-top: 22px; }
.next-title { font-weight: 700; margin: 0; }
.next-meta { font-size: 15px; color: var(--muted); margin: 0 0 6px; }
.insta { margin-top: auto; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; text-decoration: none; }

main { padding: 72px clamp(20px, 5vw, 64px) 48px; max-width: 1180px; display: flex; flex-direction: column; gap: clamp(72px, 10vw, 128px); }
section { scroll-margin-top: 24px; }
.rule { border-top: 1px solid var(--line); padding-top: clamp(48px, 7vw, 72px); }

/* Welcome */
.tagline { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); color: var(--rust); margin: 0 0 16px; }
.lede { max-width: 560px; color: var(--muted); }
.hero-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 40px; max-width: 1000px; }
.hero-strip img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border: 8px solid light-dark(#E8D3B0, #3A4A41); border-radius: 2px; }

/* Actions */
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: calc(-1 * clamp(24px, 5vw, 64px)); }
.action { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 28px; transition: border-color .2s ease, transform .2s ease; }
.action:hover { border-color: var(--green); transform: translateY(-2px); }
.action-title { font-family: var(--serif); font-size: 26px; color: var(--green); }
.action-text { color: var(--muted); }

/* Craft */
.craft { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.craft > div:first-child { flex: 1 1 380px; }
.timelapse { flex: 0 1 280px; min-width: 220px; aspect-ratio: 9 / 16; background: var(--soft); border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-weight: 700; font-size: 15px; text-align: center; padding: 16px; }

/* Workshops list */
.class-list { border-bottom: 1px solid var(--line); margin: 16px 0 14px; }
.class-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; padding: 22px 0; border-top: 1px solid var(--line); }
.class-date { flex: 0 0 150px; font-weight: 700; color: var(--rust); white-space: nowrap; }
.class-info { flex: 1 1 260px; }
.class-name { font-family: var(--serif); font-size: 22px; margin: 0; }
.class-meta { font-size: 15px; color: var(--muted); margin: 0; }
.class-price { font-weight: 700; white-space: nowrap; }
.full { color: var(--muted); font-weight: 700; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 24px; border-radius: 999px; border: 0; background: var(--green-deep); color: var(--on-green); font: 700 16px var(--sans); text-decoration: none; cursor: pointer; }
.btn-outline { background: transparent; color: var(--green); border: 1.5px solid var(--green); min-height: 44px; padding: 8px 20px; }
.btn-light { background: var(--on-green); color: #2F5141; }

/* Party band */
.party { background: var(--green-deep); color: var(--on-green); border-radius: 4px; padding: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.party h2 { color: var(--on-green); }
.party p { color: #DCD5C5; max-width: 560px; margin: 0; }
.party > div { flex: 1 1 360px; }

/* Grids */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin: 24px 0 16px; }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kit { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.kit img, .kit .ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; margin-bottom: 6px; transition: transform .2s ease; }
.kit:hover img, .kit:hover .ph { transform: translateY(-2px); }
.kit-season { font-size: 14px; color: var(--rust); font-weight: 700; }
.kit-name { font-family: var(--serif); font-size: 20px; color: var(--green); }
.kit-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Photo placeholder for designs without a real photo yet */
.ph { display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; background: var(--soft); color: var(--muted); font-size: 14px; font-weight: 700; border-radius: 4px; aspect-ratio: 1 / 1; width: 100%; }

/* Kit page (kits/<id>/) */
.kitp { display: block; max-width: 1040px; margin: 0 auto; padding: 32px clamp(16px, 5vw, 48px) 72px; }
.kitp-top { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 56px); align-items: flex-start; margin-top: 12px; }
.kitp-photo { flex: 1 1 320px; max-width: 460px; }
.kitp-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 10px solid light-dark(#E8D3B0, #3A4A41); border-radius: 2px; }
.kitp-info { flex: 1 1 340px; }
.kitp-level { font-weight: 700; color: var(--green); }
.kitp-h { font-size: 24px; margin: 28px 0 10px; }
.kitp-list { margin: 0 0 24px; padding-left: 20px; }
.kitp-list li { margin-bottom: 4px; }
.kitp-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 16px; }
.kitp-price { font-family: var(--serif); font-size: 32px; color: var(--ink); }
.btn-disabled { background: var(--soft); color: var(--muted); cursor: default; }
.kitp-more { margin-top: 72px; border-top: 1px solid var(--line); padding-top: 24px; }
.back a { text-decoration: none; }

/* Pattern portal cards (main page) */
.pattern { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 16px; background: var(--card); transition: border-color .2s ease; }
.pattern:hover { border-color: var(--green); }
.pattern img, .pattern .ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 2px; }
.pattern-kind { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.pattern-name { font-family: var(--serif); font-size: 21px; color: var(--green); }
.contact label { font-size: 14px; font-weight: 700; }
input, textarea, select { font: 16px var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--field); border-radius: 4px; padding: 10px 12px; min-height: 44px; width: 100%; }
.msg { font-size: 15px; margin: 0; min-height: 1.5em; }
.msg.err { color: var(--rust); }

/* Pattern access page (p/<id>/) */
.pack-header { padding: 14px clamp(16px, 5vw, 48px); border-bottom: 1px solid var(--line); }
.pack-header .topbar-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; color: var(--green); text-decoration: none; }
.pack-header img { border-radius: 4px; object-fit: cover; }
.pack { max-width: 760px; margin: 0 auto; padding: 48px clamp(16px, 5vw, 48px) 64px; display: block; }
.pack-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin: 24px 0 32px; }
.pack-item { margin: 0; }
.pack-item .ph { border: 6px solid light-dark(#E8D3B0, #3A4A41); }
.pack-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 6px solid light-dark(#E8D3B0, #3A4A41); border-radius: 2px; }
.pack-item figcaption { margin-top: 8px; font-weight: 700; font-size: 15px; }
.pack-form label { font-weight: 700; font-size: 15px; display: block; margin-bottom: 8px; }
.pack-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.pack-row input { flex: 1 1 220px; width: auto; }
.unlocked-note { color: var(--green); font-weight: 700; }
.pack-soon { border: 1px solid var(--line); border-radius: 4px; background: var(--card); padding: 20px 24px; margin-bottom: 32px; }
.pack-soon p { margin: 0; }
.pack-soon-title { font-family: var(--serif); font-size: 22px; color: var(--green); margin-bottom: 6px !important; }
.downloads { scroll-margin-top: 24px; }
.download-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0 24px; }
.download-all:empty { display: none; }
.btn-download { font-size: 17px; padding: 14px 26px; }
.download-list { list-style: none; padding: 0; margin: 8px 0 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.dl-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); text-decoration: none; transition: border-color .2s ease; }
.dl-card:hover, .dl-card:focus-visible { border-color: var(--green); }
.dl-card img, .dl-card .ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 2px; }
.dl-card .ph { font-size: 12px; }
.dl-name { font-weight: 700; font-size: 15px; }
.dl-name::after { content: " ↓"; color: var(--green); }

/* Videos */
.video figure { margin: 0; }
.video-frame { aspect-ratio: 16 / 9; background: var(--soft); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video figcaption { font-weight: 700; margin-top: 10px; }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.about-text { flex: 1 1 320px; }
.portrait { width: 150px; aspect-ratio: 1 / 1; border-radius: 999px; background: var(--soft); color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-bottom: 20px; }
.contact { flex: 1 1 340px; display: flex; flex-direction: column; gap: 8px; }
.contact .btn { align-self: flex-start; margin-top: 8px; }
.form-note { font-size: 15px; color: var(--green); margin: 4px 0 0; }

footer { border-top: 1px solid var(--line); padding-top: 24px; color: var(--muted); font-size: 14px; }

/* Mobile */
.topbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar { display: flex; position: sticky; top: 0; z-index: 10; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .topbar-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; color: var(--green); text-decoration: none; }
  .topbar-brand img { border-radius: 4px; object-fit: cover; }
  .menu-btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 700 15px var(--sans); }
  .sidebar { display: none; position: fixed; inset: 65px 0 auto 0; height: auto; max-height: calc(100vh - 65px); z-index: 9; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 20px 28px; gap: 20px; }
  .sidebar.open { display: flex; }
  .sidebar .logo { display: none; }
  .insta { margin-top: 0; }
  main { padding-top: 40px; }
  html { scroll-padding-top: 80px; }
  section { scroll-margin-top: 80px; }
  .actions { margin-top: 0; }
}
@media (max-width: 600px) {
  .hero-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .class-date { flex-basis: 100%; }
  .timelapse { flex-basis: 100%; max-width: 320px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .action { transition: none; }
}
.pack > p.muted.small { margin-top: 32px; }
.kitp h1 { font-size: clamp(34px, 4.5vw, 48px); }
@media (max-width: 600px) {
  #kit-grid, .kitp-more .grid, #pattern-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .kit-name, .pattern-name { font-size: 17px; }
  .kit .ph, .pattern .ph { font-size: 12px; }
  .kit-row { flex-wrap: wrap; gap: 2px 8px; font-size: 15px; }
}
.party p.party-facts { margin-top: 14px; font-weight: 700; color: var(--on-green); }
