/* ============================================================
   Warm Tactile — human-crafted, earthy, playful template
   Trend: 2026 tactile / human-crafted design — warm earthy
   palettes, organic blob shapes, claymorphic soft depth, a
   characterful display face. A deliberate counter to the
   "generic AI look." See design.md.
   ============================================================ */

:root {
  --sand:   #efe4d2;   /* page */
  --cream:  #fbf5ea;   /* cards */
  --ink:    #3a2a20;   /* warm near-black */
  --ink-2:  #6d5947;   /* secondary */
  --faint:  #9a866f;
  --line:   #e3d5bf;

  --clay:   #c96f4a;   /* terracotta accent */
  --clay-d: #ad5734;
  --sage:   #7c8b6a;   /* olive/sage */
  --mustard:#e0a54b;
  --rose:   #d98e7f;

  --disp: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Work Sans", ui-sans-serif, system-ui, sans-serif;

  --pad: clamp(18px, 4vw, 48px);
  --r:   28px;
  --r-lg:40px;
  --r-sm:16px;
  --soft: 0 2px 4px rgba(58,42,32,.05), 0 18px 40px -18px rgba(58,42,32,.28);
  --soft-hover: 0 4px 8px rgba(58,42,32,.07), 0 26px 56px -20px rgba(58,42,32,.36);
  --ease: cubic-bezier(.34,1.4,.5,1);   /* springy */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--sand); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(58,42,32,.04) 1px, transparent 1px);
  background-size: 5px 5px; /* faint paper grain */
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--pad); }
.eyebrow { font-family: var(--disp); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--clay); }

/* ---- nav ---------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px var(--pad); background: color-mix(in oklab, var(--sand) 84%, transparent); backdrop-filter: blur(8px); }
.nav .brand { font-family: var(--disp); font-weight: 700; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.nav .brand .mark { width: 30px; height: 30px; background: var(--clay); border-radius: 50% 50% 50% 12px; display: inline-block; }
.nav .links { display: flex; align-items: center; gap: clamp(4px,1.2vw,12px); }
.nav .links a { font-family: var(--disp); font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; transition: .2s var(--ease); }
.nav .links a:hover { background: var(--cream); color: var(--ink); }
.nav .links a[aria-current="page"] { background: var(--clay); color: #fff; }
.lang { display: inline-flex; background: var(--cream); border-radius: 999px; padding: 3px; box-shadow: var(--soft); }
.lang button { font-family: var(--disp); font-size: 13px; font-weight: 600; padding: 6px 13px; border: 0; background: transparent; color: var(--faint); border-radius: 999px; cursor: pointer; transition: .2s var(--ease); }
.lang button[aria-pressed="true"] { background: var(--clay); color: #fff; }
@media (max-width: 700px) { .nav { flex-wrap: wrap; } .nav .links { order: 3; width: 100%; justify-content: space-between; gap: 2px; } .nav .links a { padding: 8px 10px; font-size: 14px; } }

/* ---- buttons ------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 9px; font-family: var(--disp); font-size: 15px; font-weight: 600; padding: 13px 24px; border-radius: 999px; border: 0; background: var(--cream); color: var(--ink); box-shadow: var(--soft); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--soft-hover); }
.btn.solid { background: var(--clay); color: #fff; }
.btn.solid:hover { background: var(--clay-d); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- blobs -------------------------------------------------- */
.blob { position: absolute; border-radius: 42% 58% 63% 37% / 42% 45% 55% 58%; filter: blur(2px); opacity: .5; z-index: 0; pointer-events: none; }

/* ---- cards -------------------------------------------------- */
.card { background: var(--cream); border-radius: var(--r); padding: clamp(22px, 3vw, 36px); box-shadow: var(--soft); position: relative; z-index: 1; }
a.card, .card.hoverable { transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
a.card:hover, .card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--soft-hover); }
.card.clay { background: var(--clay); color: #fff; } .card.sage { background: var(--sage); color: #fff; } .card.mustard { background: var(--mustard); color: var(--ink); } .card.rose { background: var(--rose); color: #fff; }

/* ---- hero --------------------------------------------------- */
.hero { position: relative; padding: clamp(40px,7vw,96px) 0 clamp(24px,4vw,56px); }
.hero .avatar { width: clamp(88px,12vw,132px); height: clamp(88px,12vw,132px); border-radius: 46% 54% 60% 40% / 50% 44% 56% 50%; background: linear-gradient(150deg, var(--clay), var(--mustard)); display: grid; place-items: center; color: #fff; font-family: var(--disp); font-weight: 700; font-size: clamp(32px,5vw,52px); box-shadow: var(--soft); margin-bottom: 26px; }
.hero h1 { font-family: var(--disp); font-weight: 700; font-size: clamp(38px, 7vw, 82px); line-height: 1.03; letter-spacing: -.02em; text-wrap: balance; }
.hero h1 .u { background: linear-gradient(transparent 62%, color-mix(in oklab, var(--mustard) 70%, transparent) 62%); padding: 0 .05em; }
.hero .lede { font-size: clamp(17px,1.9vw,21px); color: var(--ink-2); max-width: 52ch; margin: 24px 0 30px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---- sections ---------------------------------------------- */
.section { padding: clamp(40px,6vw,80px) 0; position: relative; }
.section-head { margin-bottom: clamp(24px,3vw,40px); }
.section-head h2 { font-family: var(--disp); font-weight: 700; font-size: clamp(28px,4.4vw,48px); letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.section-head p { color: var(--ink-2); max-width: 52ch; margin-top: 12px; }

.grid { display: grid; gap: clamp(16px,2vw,24px); }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .g2, .g3 { grid-template-columns: 1fr; } }

.card h3 { font-family: var(--disp); font-weight: 600; font-size: clamp(19px,2.2vw,25px); letter-spacing: -.01em; margin-bottom: 8px; }
.card p { color: inherit; opacity: .9; font-size: 15.5px; }
.card .kicker { font-family: var(--disp); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font-family: var(--disp); font-size: 13px; font-weight: 500; padding: 6px 13px; border-radius: 999px; background: var(--sand); color: var(--ink-2); }
.card.clay .chip, .card.sage .chip, .card.rose .chip { background: rgba(255,255,255,.18); color: #fff; }

.stat-num { font-family: var(--disp); font-weight: 700; font-size: clamp(40px,6vw,64px); line-height: 1; letter-spacing: -.02em; }

/* ---- blog --------------------------------------------------- */
.post { display: grid; grid-template-columns: 140px 1fr auto; gap: clamp(16px,3vw,40px); align-items: baseline; padding: clamp(20px,2.6vw,30px); }
.post .date { font-family: var(--disp); font-size: 14px; font-weight: 600; color: var(--clay); }
.post h3 { font-family: var(--disp); font-weight: 600; font-size: clamp(20px,2.6vw,28px); letter-spacing: -.01em; margin-bottom: 8px; }
.post p { color: var(--ink-2); font-size: 15.5px; }
.post .read { font-family: var(--disp); font-size: 14px; color: var(--faint); white-space: nowrap; }
@media (max-width: 680px) { .post { grid-template-columns: 1fr; gap: 8px; } }

/* ---- form -------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--disp); font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.field input, .field textarea { width: 100%; font-family: var(--body); font-size: 16px; color: var(--ink); background: var(--sand); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 16px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 4px rgba(201,111,74,.16); }
.field textarea { resize: vertical; min-height: 130px; }

/* ---- AI chat ----------------------------------------------- */
.chat { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 460px; }
.chat .chat-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); font-family: var(--disp); font-weight: 600; font-size: 15px; }
.chat .chat-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(124,139,106,.2); }
.chat .log { flex: 1; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.msg { max-width: 84%; }
.msg .who { font-family: var(--disp); font-size: 12px; font-weight: 600; color: var(--faint); margin-bottom: 5px; }
.msg .bubble { font-size: 15px; line-height: 1.55; padding: 13px 16px; border-radius: 20px; background: var(--sand); }
.msg.user { align-self: flex-end; text-align: right; }
.msg.user .bubble { background: var(--clay); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai .bubble { border-bottom-left-radius: 6px; }
.chat .composer { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--line); }
.chat .composer input { flex: 1; font-family: var(--body); font-size: 15px; background: var(--sand); border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; }
.chat .composer input:focus { outline: none; border-color: var(--clay); }
button.prompt { text-align: left; cursor: pointer; }

/* ---- footer ------------------------------------------------ */
.footer { padding: clamp(40px,6vw,80px) 0; }
.footer .card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.footer h2 { font-family: var(--disp); font-weight: 700; font-size: clamp(24px,3.6vw,40px); letter-spacing: -.02em; }
.footer .social { display: flex; gap: 16px; flex-wrap: wrap; }
.footer .social a { font-family: var(--disp); font-weight: 500; }
.footer .card.clay .social a { color: #fff; opacity: .9; }

.tpl-note { font-size: 13px; color: var(--faint); text-align: center; margin-top: 24px; font-style: italic; }

/* ---- entrance motion (guarded) ----------------------------- */
html.js [data-rise] { opacity: 0; transform: translateY(20px) scale(.985); transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js [data-rise].in { opacity: 1; transform: none; }
html.js [data-rise][data-d="1"]{transition-delay:.06s} html.js [data-rise][data-d="2"]{transition-delay:.12s} html.js [data-rise][data-d="3"]{transition-delay:.18s}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } html.js [data-rise] { opacity: 1; transform: none; transition: none; } }
