/* Crafnia — "Organic" design system
   Implemented 2026-08-13 from claude.ai/design project "Crafnia landing page design"
   → file "Crafnia Landing A - Organic.dc.html" (+ _ds organic bundle styles.css).
   Tokens are the source of truth — retune here, both landing and doc pages follow. */

:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #c67139;
  --color-accent-2: #7a8a5e;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe1d0;
  --color-accent-300: #ffc6a5;
  --color-accent-400: #f6a06b;
  --color-accent-500: #d67f48;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-800: #643312;
  --color-accent-900: #402310;

  --color-accent-2-100: #f0fae1;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-300: #ccdbb2;
  --color-accent-2-400: #aebf92;
  --color-accent-2-500: #8fa073;
  --color-accent-2-600: #728157;
  --color-accent-2-700: #56633f;
  --color-accent-2-800: #3d472b;
  --color-accent-2-900: #272e1b;

  --font-heading: "Caprasimo", "Leelawadee UI", system-ui, sans-serif;
  --font-body: "Figtree", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);

  --wrap: 1160px;
  --pad-x: clamp(20px, 5vw, 64px);
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  text-wrap: pretty;
  overflow-x: hidden; /* fallback for browsers without `clip` support */
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0;
}

p { margin: 0; }
img { display: block; max-width: 100%; }
figure { margin: 0; }

a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad-x); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 400;
  font-size: 15px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  border-radius: 999px; padding: 13px 26px;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); color: var(--color-text); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center;
  font-size: 12.5px; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px;
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }

/* — header — */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 234, 216, .93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-divider);
}
.site-header .wrap {
  padding-block: 14px;
  display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--color-text);
  font-family: var(--font-heading); font-size: 22px;
}
.brand:hover { color: var(--color-text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--color-accent);
  display: grid; place-content: center; flex: none;
}
.brand-mark svg { width: 20px; height: 20px; color: var(--color-bg); }
.site-nav {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-left: auto; font-size: 15px; font-weight: 500;
}
.site-nav a { color: var(--color-neutral-700); text-decoration: none; }
.site-nav a:hover { color: var(--color-accent-700); }

/* — hero — */
.hero { position: relative; padding-block: clamp(48px, 7vw, 96px) 24px; }
.hero-blob {
  position: absolute; right: -140px; top: -180px;
  width: 420px; height: 420px; border-radius: 50%;
  background: var(--color-accent-2-200);
  z-index: 0; pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.hero h1 { font-size: clamp(40px, 5.6vw, 74px); margin-left: -.028em; }
.hero h1 span { display: block; }
.hero-lead { margin-top: 24px; max-width: 54ch; color: var(--color-neutral-800); }
.hero-lead em { font-style: italic; color: var(--color-accent-700); }
.hero-sub { margin-top: 14px; max-width: 54ch; color: var(--color-neutral-700); font-size: 15.5px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-figure { border-radius: 56px; overflow: hidden; box-shadow: var(--shadow-md); }
.hero-figure .art-panel { aspect-ratio: 4 / 5; }

/* — decorative art panels (stand-ins for photos; swap for a real <img> anytime) — */
.washed { filter: saturate(0.6) contrast(0.85) brightness(1.1) opacity(0.94); }
.art-panel {
  width: 100%; display: grid; place-content: center;
  background:
    radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--color-accent-200) 55%, transparent), transparent 60%),
    radial-gradient(110% 90% at 85% 90%, color-mix(in srgb, var(--color-accent-2-200) 70%, transparent), transparent 55%),
    var(--color-surface);
}
.art-panel svg { width: min(58%, 300px); height: auto; color: var(--color-neutral-500); opacity: .85; }
.hero-figure img, .bench-figure img, .about-figure img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-figure img { aspect-ratio: 4 / 5; }
.bench-figure img { aspect-ratio: 16 / 10; }
.about-figure img { aspect-ratio: 3 / 4; }

/* — stats band — */
.stats { padding-block: clamp(28px, 4vw, 52px); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; }
.stat { border-radius: 28px; padding: 24px 26px; }
.stat p:first-child { font-family: var(--font-heading); font-size: 38px; line-height: 1.1; }
.stat-label {
  margin-top: 8px; font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 600; color: var(--color-neutral-700);
}
.stat-a1 { background: var(--color-accent-100); } .stat-a1 p:first-child { color: var(--color-accent-700); }
.stat-g2 { background: var(--color-accent-2-200); } .stat-g2 p:first-child { color: var(--color-accent-2-800); }
.stat-a2 { background: var(--color-accent-200); } .stat-a2 p:first-child { color: var(--color-accent-800); }
.stat-g1 { background: var(--color-accent-2-100); } .stat-g1 p:first-child { color: var(--color-accent-2-700); }

/* — section scaffolding — */
.section { padding-block: clamp(40px, 5vw, 72px); }
.section-lg { padding-block: clamp(48px, 6vw, 88px); }
.kicker {
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  font-weight: 600; color: var(--color-accent-700); margin-bottom: 12px;
}
.kicker-green { color: var(--color-accent-2-700); }
.section h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; }
.section-lead { margin-top: 16px; max-width: 60ch; color: var(--color-neutral-800); }

/* — work grid — */
.work-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px; margin-top: 36px;
}
.town {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--color-neutral-100);
  border: 1px solid var(--color-divider);
  border-radius: 28px; padding: 28px 26px 24px;
  color: var(--color-text);
}
a.town { text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
a.town:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--color-text); }
.town-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.town h3 { font-size: 24px; }
.town-body { color: var(--color-neutral-800); font-size: 15.5px; flex-grow: 1; }
.town-stack {
  font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  font-weight: 600; color: var(--color-neutral-600);
}
.town-link { font-size: 14px; font-weight: 600; color: var(--color-accent-700); }
.town-soon { font-size: 14px; color: var(--color-neutral-600); }

.workshop-note {
  margin-top: 24px; background: var(--color-neutral-100);
  border: 1px dashed var(--color-neutral-400);
  border-radius: 28px; padding: 26px 28px; display: grid; gap: 8px;
}
.workshop-note h3 { font-size: 19px; color: var(--color-neutral-800); }
.workshop-note p { color: var(--color-neutral-700); font-size: 15.5px; max-width: 70ch; }

/* — bench band — */
.bench {
  background: var(--color-accent-2-100); border-radius: 56px;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) clamp(24px, 4vw, 64px);
}
.bench-grid {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.bench-figure { border-radius: 40px; overflow: hidden; }
.bench-figure .art-panel { aspect-ratio: 16 / 10; }
.bench h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }
.bench p { margin-top: 14px; color: var(--color-neutral-800); font-size: 15.5px; max-width: 52ch; }
.bench p.first { margin-top: 18px; }

/* — craft rules — */
.rules { display: grid; margin-top: 40px; }
.rule {
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 14px clamp(24px, 4vw, 64px); align-items: start;
  padding: 26px 0; border-top: 1px solid var(--color-divider);
}
.rule:last-child { border-bottom: 1px solid var(--color-divider); }
.rule-title { display: flex; align-items: center; gap: 16px; }
.rule-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--color-accent); flex: none; }
.rule-dot.green { background: var(--color-accent-2-500); }
.rule h3 { font-size: 24px; }
.rule p { color: var(--color-neutral-800); font-size: 15.5px; max-width: 56ch; }

/* — timeline — */
.timeline { list-style: none; margin: 44px 0 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); }
.tl-rail { display: grid; grid-template-rows: auto 1fr; justify-items: center; }
.tl-rail.last { grid-template-rows: auto; }
.tl-num {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-content: center;
  font-family: var(--font-heading); font-size: 17px;
}
.tl-num.green { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.tl-num.amber { background: var(--color-accent-200); color: var(--color-accent-800); }
.tl-num.next { border: 2px dashed var(--color-neutral-400); color: var(--color-neutral-600); }
.tl-line { width: 2px; background: var(--color-neutral-300); border-radius: 2px; }
.tl-body { padding-bottom: 34px; }
.tl-body.last { padding-bottom: 0; }
.tl-body h3 { font-size: 22px; }
.tl-body.muted h3 { color: var(--color-neutral-700); }
.tl-body p { margin-top: 10px; color: var(--color-neutral-800); font-size: 15.5px; max-width: 60ch; }
.tl-body.muted p { color: var(--color-neutral-700); }

/* — about card — */
.about-card {
  background: var(--color-neutral-100); border-radius: 56px;
  padding: clamp(32px, 4vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
  gap: clamp(28px, 5vw, 64px); align-items: start;
}
.about-card h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }
.about-card p { margin-top: 14px; color: var(--color-neutral-800); font-size: 16px; max-width: 58ch; }
.about-card p.first { margin-top: 20px; }
.about-figure { border-radius: 40px; overflow: hidden; }
.about-figure .art-panel { aspect-ratio: 3 / 4; }

/* — contact band — */
.contact-band { background: var(--color-accent-2-100); border-radius: 56px; padding: clamp(32px, 4vw, 64px); }
.contact-band h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.2; max-width: 34ch; }
.contact-band p { margin-top: 16px; color: var(--color-neutral-800); font-size: 16px; max-width: 56ch; }
.contact-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* — footer — */
.site-footer { border-top: 1px solid var(--color-divider); }
.footer-inner {
  padding-block: 32px 44px;
  display: flex; flex-wrap: wrap; gap: 14px 28px;
  justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--color-neutral-700);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-nav a { color: var(--color-neutral-700); text-decoration: underline; }
.footer-nav a:hover { color: var(--color-accent-700); }

/* — doc pages (privacy / terms) — */
.doc { padding-block: clamp(40px, 6vw, 72px); }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(32px, 4.4vw, 48px); }
.doc-meta { margin-top: 10px; font-size: 14px; color: var(--color-neutral-600); }
.doc h2 { font-family: var(--font-heading); font-size: 23px; margin-top: 40px; }
.doc p, .doc li { color: var(--color-neutral-800); font-size: 16px; }
.doc p { margin-top: 12px; }
.doc ul { margin: 12px 0 0; padding-left: 22px; }
.doc li + li { margin-top: 8px; }
.doc .note {
  margin-top: 26px; background: var(--color-accent-2-100);
  border-radius: 28px; padding: 22px 26px; font-size: 15px;
}
.doc .note p { margin: 0; }

/* — motion (skipped entirely for prefers-reduced-motion users) — */
@media (prefers-reduced-motion: no-preference) {
  /* hero entrance */
  .hero h1 span, .hero-lead, .hero-sub, .hero-cta, .hero-figure {
    opacity: 0; transform: translateY(26px);
    animation: rise .85s cubic-bezier(.22, .61, .36, 1) forwards;
  }
  .hero h1 span:nth-child(2) { animation-delay: .12s; }
  .hero-lead { animation-delay: .28s; }
  .hero-sub { animation-delay: .38s; }
  .hero-cta { animation-delay: .48s; }
  .hero-figure { animation-delay: .3s; animation-duration: 1s; }
  @keyframes rise { to { opacity: 1; transform: none; } }

  /* ambient drift on the decorative blob */
  .hero-blob { animation: drift 16s ease-in-out infinite alternate; }
  @keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-26px, 20px) scale(1.05); }
  }

  /* scroll reveal — JS adds .in when the element enters the viewport */
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1); }
  .reveal.in { opacity: 1; transform: none; }
  .work-grid .reveal:nth-child(2), .stats-grid .reveal:nth-child(2) { transition-delay: .08s; }
  .work-grid .reveal:nth-child(3), .stats-grid .reveal:nth-child(3) { transition-delay: .16s; }
  .stats-grid .reveal:nth-child(4) { transition-delay: .24s; }

  /* micro-interactions */
  .btn { transition: transform .18s ease, background .18s ease; }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .stat { transition: transform .18s ease; }
  .stat:hover { transform: translateY(-3px); }
  .art-panel svg { transition: transform .5s ease; }
  figure:hover .art-panel svg, figure:hover img { transform: scale(1.03); }
  .art-panel img, .hero-figure img { transition: transform .5s ease; }
}

/* — responsive — */
@media (max-width: 900px) {
  .hero-grid, .bench-grid, .about-card { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { max-width: 420px; }
  .bench-grid .bench-figure { order: 2; }
  .rule { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-block: 22px; }
  .bench, .about-card, .contact-band { border-radius: 40px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header .wrap { gap: 10px 18px; }
  .town { padding: 24px 22px 20px; }
  .hero-blob { width: 300px; height: 300px; right: -120px; top: -140px; }
}
