/* ============================================================
   MELLOW / clay design system
   Shared by / and /guide
   ============================================================ */

:root {
  /* --- field --- */
  --bg: #FFF4EC;
  --field: #FBEEDC;            /* sampled from the rendered clay plate */
  --field-deep: #F6E7D2;

  /* --- clay pigments --- */
  --peach: #FFB39B;
  --butter: #FFD6A5;
  --mint: #C9E4DE;
  --tan: #E7BFA1;              /* matched to the rendered platform */
  --cocoa: #4A3B36;

  /* highlight / core-shadow pairs, hand-picked (not linear white mixes) */
  --peach-hi: #FFCEBC;  --peach-lo: #EC8E75;
  --butter-hi: #FFE9C9; --butter-lo: #F0B872;
  --mint-hi: #E2F1ED;   --mint-lo: #A3C9C1;
  --tan-hi: #F5DCC6;    --tan-lo: #CE9A78;
  --cream: #FDF4EA;     --cream-hi: #FFFFFF; --cream-lo: #F0DFC9;

  /* --- ink --- */
  --ink: #4A3B36;              /* 9.8:1 on --bg */
  --ink-2: rgba(74, 59, 54, .75);  /* 4.7:1 on --bg */
  --ink-3: rgba(74, 59, 54, .46);  /* hairlines only, never text */
  --hair: rgba(74, 59, 54, .13);

  /* --- type --- */
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Gantari", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-display: clamp(2.75rem, 6.6vw, 5.4rem);
  --t-h2: clamp(2rem, 4vw, 3.3rem);
  --t-h3: clamp(1.3rem, 1.9vw, 1.7rem);
  --t-lead: clamp(1.02rem, 1.3vw, 1.2rem);
  --t-body: 1rem;
  --t-label: .72rem;

  /* --- rhythm (8px base) --- */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1240px;

  /* --- easings --- */
  --spring:    cubic-bezier(.34, 1.56, .64, 1);
  --spring-hi: cubic-bezier(.22, 1.72, .36, 1);
  --squish:    cubic-bezier(.18, .89, .32, 1.28);
  --soft:      cubic-bezier(.4, .14, .3, 1);
  --exit:      cubic-bezier(.55, .06, .68, .19);

  /* --- the clay material ---------------------------------
     8 stops. inset highlight top-left (key light), inset core
     shadow bottom-right, then three outer stops for contact,
     mid and ambient occlusion. Matches the rendered lighting. */
  --clay:
    inset 0 4px 7px rgba(255, 255, 255, .72),
    inset 3px 0 6px rgba(255, 255, 255, .34),
    inset 0 -7px 13px rgba(74, 59, 54, .15),
    inset -4px -2px 9px rgba(74, 59, 54, .09),
    0 1px 1px rgba(74, 59, 54, .09),
    0 5px 9px -3px rgba(74, 59, 54, .15),
    0 14px 22px -8px rgba(74, 59, 54, .17),
    0 30px 48px -16px rgba(74, 59, 54, .13);

  /* squished: wider, shorter, closer to the surface, tighter shadow */
  --clay-squish:
    inset 0 3px 5px rgba(255, 255, 255, .6),
    inset 2px 0 4px rgba(255, 255, 255, .26),
    inset 0 -5px 10px rgba(74, 59, 54, .2),
    inset -3px -2px 7px rgba(74, 59, 54, .12),
    0 1px 1px rgba(74, 59, 54, .1),
    0 3px 5px -2px rgba(74, 59, 54, .16),
    0 7px 12px -5px rgba(74, 59, 54, .15),
    0 12px 18px -10px rgba(74, 59, 54, .1);

  /* plumped: lifted off the surface, shadow spreads and softens */
  --clay-plump:
    inset 0 5px 9px rgba(255, 255, 255, .8),
    inset 3px 0 7px rgba(255, 255, 255, .4),
    inset 0 -8px 15px rgba(74, 59, 54, .14),
    inset -5px -3px 11px rgba(74, 59, 54, .08),
    0 2px 2px rgba(74, 59, 54, .07),
    0 9px 16px -4px rgba(74, 59, 54, .16),
    0 22px 34px -10px rgba(74, 59, 54, .18),
    0 44px 66px -20px rgba(74, 59, 54, .16);

  /* big surfaces need proportionally bigger shadows. the chip-tuned
     --clay reads as nothing under a 380px card. */
  --clay-lg:
    inset 0 6px 11px rgba(255, 255, 255, .78),
    inset 4px 0 9px rgba(255, 255, 255, .36),
    inset 0 -12px 22px rgba(74, 59, 54, .13),
    inset -6px -4px 15px rgba(74, 59, 54, .07),
    0 2px 2px rgba(74, 59, 54, .06),
    0 10px 18px -5px rgba(74, 59, 54, .12),
    0 26px 42px -12px rgba(74, 59, 54, .15),
    0 56px 86px -26px rgba(74, 59, 54, .19);

  --clay-lg-squish:
    inset 0 5px 8px rgba(255, 255, 255, .66),
    inset 3px 0 7px rgba(255, 255, 255, .28),
    inset 0 -9px 17px rgba(74, 59, 54, .17),
    inset -5px -3px 12px rgba(74, 59, 54, .1),
    0 2px 2px rgba(74, 59, 54, .07),
    0 6px 11px -3px rgba(74, 59, 54, .13),
    0 15px 25px -8px rgba(74, 59, 54, .15),
    0 30px 46px -18px rgba(74, 59, 54, .15);

  /* pressed into the surface (trays, wells, inputs) */
  --clay-well:
    inset 0 4px 9px rgba(74, 59, 54, .13),
    inset 0 1px 2px rgba(74, 59, 54, .1),
    inset 0 -3px 5px rgba(255, 255, 255, .7),
    0 1px 0 rgba(255, 255, 255, .8);

  /* fine plasticine grain, sits on every clay surface */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* small phones: buy back gutter so the 7-col day grid keeps
   44px tap targets at 390px */
@media (max-width: 420px) {
  :root { --gutter: 16px; }
}

/* ============================================================
   base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* page-wide grain: keeps the flat cream from reading as a flat fill */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--grain);
  opacity: .05;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 9;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 600;
  margin: 0;
  line-height: 1.05;
  letter-spacing: -.028em;
  text-wrap: balance;
}

h1 { font-size: var(--t-display); line-height: .94; letter-spacing: -.038em; font-weight: 700; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -.018em; }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

button { font: inherit; color: inherit; border: 0; background: none; }

::selection { background: var(--peach); color: var(--cocoa); }

/* scrollbar as an extruded clay rail */
* { scrollbar-color: var(--peach) var(--field-deep); scrollbar-width: thin; }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--field-deep); }
::-webkit-scrollbar-thumb {
  border-radius: 11px 9px 10px 12px / 10px 12px 9px 11px;
  border: 3px solid var(--field-deep);
  background-image: linear-gradient(158deg, var(--peach-hi) 0%, var(--peach) 46%, var(--peach-lo) 100%);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .7),
    inset 0 -2px 3px rgba(74, 59, 54, .2);
}
::-webkit-scrollbar-thumb:hover { background-image: linear-gradient(158deg, var(--peach) 0%, var(--peach-lo) 100%); }

:focus-visible {
  outline: 3px solid var(--cocoa);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ============================================================
   layout helpers
   ============================================================ */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 10vw, 132px); position: relative; }

.label {
  font-family: var(--body);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 56ch;
}

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ============================================================
   the clay material
   ============================================================ */

.clay {
  --c: var(--peach);
  --hi: var(--peach-hi);
  --lo: var(--peach-lo);
  position: relative;
  background-image: linear-gradient(158deg, var(--hi) 0%, var(--c) 46%, var(--lo) 100%);
  box-shadow: var(--clay);
  isolation: isolate;
}

/* every clay surface carries the same fingerprint texture as the
   rendered clay. this is what sells the material match. */
.clay::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--grain);
  opacity: .085;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}

.clay.is-peach  { --c: var(--peach);  --hi: var(--peach-hi);  --lo: var(--peach-lo); }
.clay.is-butter { --c: var(--butter); --hi: var(--butter-hi); --lo: var(--butter-lo); }
.clay.is-mint   { --c: var(--mint);   --hi: var(--mint-hi);   --lo: var(--mint-lo); }
.clay.is-tan    { --c: var(--tan);    --hi: var(--tan-hi);    --lo: var(--tan-lo); }
.clay.is-cream  { --c: var(--cream);  --hi: var(--cream-hi);  --lo: var(--cream-lo); }
.clay.is-cocoa {
  --c: #5C4A43; --hi: #7A645B; --lo: #3B2F2A;
  color: var(--bg);
}
.clay.is-cocoa::before { mix-blend-mode: overlay; opacity: .14; }

/* --- blob radii: irregular on purpose, never a default pill --- */
.blob-a { border-radius: 34px 30px 33px 37px / 33px 37px 30px 34px; }
.blob-b { border-radius: 28px 34px 27px 33px / 32px 27px 34px 29px; }
.blob-c { border-radius: 44px 38px 46px 40px / 40px 46px 38px 44px; }
.blob-xl { border-radius: 68px 56px 72px 60px / 60px 72px 56px 68px; }

/* ============================================================
   buttons / the squish
   ============================================================ */

.btn {
  --c: var(--peach); --hi: var(--peach-hi); --lo: var(--peach-lo);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 17px 30px;
  min-height: 56px;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--cocoa);
  cursor: pointer;
  position: relative;
  isolation: isolate;
  border-radius: 30px 26px 29px 33px / 29px 33px 26px 30px;
  background-image: linear-gradient(158deg, var(--hi) 0%, var(--c) 46%, var(--lo) 100%);
  box-shadow: var(--clay);
  transform: scale(1);
  transition:
    transform .42s var(--squish),
    box-shadow .42s var(--squish),
    border-radius .42s var(--squish);
  will-change: transform;
}

.btn::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image: var(--grain);
  opacity: .09;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}

.btn:hover {
  transform: scale(1.055, .9) translateY(3px);
  box-shadow: var(--clay-squish);
  border-radius: 34px 30px 33px 37px / 25px 28px 22px 26px;
}

.btn:active {
  transform: scale(1.08, .84) translateY(5px);
  transition-duration: .12s;
}

.btn.is-butter { --c: var(--butter); --hi: var(--butter-hi); --lo: var(--butter-lo); }
.btn.is-mint   { --c: var(--mint);   --hi: var(--mint-hi);   --lo: var(--mint-lo); }
.btn.is-cream  { --c: var(--cream);  --hi: var(--cream-hi);  --lo: var(--cream-lo); }
.btn.is-cocoa  { --c: #5C4A43; --hi: #7A645B; --lo: #3B2F2A; color: var(--bg); }
.btn.is-cocoa::before { mix-blend-mode: overlay; opacity: .16; }

.btn.is-sm { padding: 12px 20px; min-height: 44px; font-size: .92rem; border-radius: 22px 18px 21px 24px / 21px 24px 18px 22px; }

.btn[disabled] {
  cursor: not-allowed;
  filter: saturate(.35) brightness(1.03);
  color: var(--ink-3);
}
.btn[disabled]:hover { transform: none; box-shadow: var(--clay); }

/* ghost button: a shallow well pressed into the clay */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 22px 18px 21px 24px / 21px 24px 18px 22px;
  font-family: var(--display);
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink-2);
  cursor: pointer;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--hair);
  transition: box-shadow .3s var(--soft), color .3s var(--soft), transform .38s var(--squish);
}
.btn-ghost:hover {
  color: var(--ink);
  box-shadow: var(--clay-well);
  transform: scale(1.03, .95);
}

/* ============================================================
   chips
   ============================================================ */

.chip {
  --c: var(--cream); --hi: var(--cream-hi); --lo: var(--cream-lo);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: -.008em;
  color: var(--cocoa);
  position: relative;
  isolation: isolate;
  border-radius: 20px 16px 19px 22px / 19px 22px 16px 20px;
  background-image: linear-gradient(158deg, var(--hi) 0%, var(--c) 46%, var(--lo) 100%);
  box-shadow: var(--clay);
}
.chip::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image: var(--grain);
  opacity: .09;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}
.chip.is-peach  { --c: var(--peach);  --hi: var(--peach-hi);  --lo: var(--peach-lo); }
.chip.is-butter { --c: var(--butter); --hi: var(--butter-hi); --lo: var(--butter-lo); }
.chip.is-mint   { --c: var(--mint);   --hi: var(--mint-hi);   --lo: var(--mint-lo); }
.chip.is-tan    { --c: var(--tan);    --hi: var(--tan-hi);    --lo: var(--tan-lo); }

.chip svg { flex: none; }

/* .float is a wrapper so the bob animation and the hover squish never
   fight over the same transform */
.chip {
  transition: transform .4s var(--squish), box-shadow .4s var(--squish);
}
.float > .chip:hover,
.desk-facts .chip:hover {
  transform: scale(1.06, .9) translateY(2px);
  box-shadow: var(--clay-squish);
}

/* ============================================================
   nav
   ============================================================ */

.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(calc(100% - 32px), var(--maxw));
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 9px 9px 9px 22px;
  border-radius: 30px 26px 29px 32px / 29px 32px 26px 30px;
  background-image: linear-gradient(158deg, rgba(255, 255, 255, .95) 0%, rgba(253, 244, 234, .92) 46%, rgba(240, 223, 201, .9) 100%);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow:
    inset 0 3px 5px rgba(255, 255, 255, .92),
    inset 0 -5px 10px rgba(74, 59, 54, .09),
    inset 0 0 0 1px rgba(74, 59, 54, .05),
    0 1px 1px rgba(74, 59, 54, .07),
    0 6px 13px -4px rgba(74, 59, 54, .13),
    0 16px 28px -10px rgba(74, 59, 54, .16),
    0 34px 52px -22px rgba(74, 59, 54, .14);
  transition: transform .5s var(--soft), box-shadow .5s var(--soft);
}

.nav.is-hidden { transform: translateX(-50%) translateY(calc(-100% - 24px)); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -.04em;
  margin-right: auto;
}
.brand svg { flex: none; }
.brand-mark { transition: transform .5s var(--spring); transform-origin: 50% 80%; }
.brand:hover .brand-mark { transform: scale(1.12, .88) translateY(2px); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 9px 14px;
  font-size: .93rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 16px 13px 15px 17px / 15px 17px 13px 16px;
  transition: color .3s var(--soft), box-shadow .34s var(--soft), transform .38s var(--squish);
}
.nav-link:hover {
  color: var(--ink);
  box-shadow: var(--clay-well);
  transform: scale(1.04, .94);
}

.nav-cta { padding: 12px 22px; min-height: 44px; font-size: .93rem; }

.nav-burger { display: none; }

@media (max-width: 860px) {
  .nav { padding: 8px 8px 8px 18px; gap: var(--s2); }
  .nav-links { display: none; }
  .brand { font-size: 1.2rem; }
}

/* ============================================================
   footer
   ============================================================ */

.foot {
  position: relative;
  margin-top: var(--s6);
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: var(--s5);
}

.foot::before {
  content: "";
  position: absolute;
  top: 0; left: var(--gutter); right: var(--gutter);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--hair) 12%, var(--hair) 88%, transparent);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--s5) var(--s4);
}

.foot-blurb { max-width: 30ch; color: var(--ink-2); font-size: .93rem; margin-top: var(--s2); }

.foot-col h4 {
  font-family: var(--body);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s2);
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-col a {
  font-size: .93rem;
  color: var(--ink-2);
  display: inline-block;
  transition: color .3s var(--soft), transform .4s var(--spring);
}
.foot-col a:hover { color: var(--ink); transform: translateX(4px); }

.foot-base {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: var(--s4);
  border-top: 1.5px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  align-items: center;
  justify-content: space-between;
  font-size: .84rem;
  color: var(--ink-3);
}
.foot-base p { max-width: 62ch; }

.credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 18px 14px 17px 20px / 17px 20px 14px 18px;
  transition: box-shadow .34s var(--soft), color .3s var(--soft), transform .4s var(--squish);
}
.credit:hover {
  color: var(--ink);
  box-shadow: var(--clay-well);
  transform: scale(1.03, .95);
}
.credit svg { flex: none; }

@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ============================================================
   ambient blobs / border-radius morph + slow rotation
   ============================================================ */

/* These stay near-subliminal on purpose. The whole site rests on a
   flat studio field matching the rendered plate's cream; any real
   tint here and the generated image stops compositing invisibly.
   The mask keeps a section boundary from slicing a blob into a
   hard horizontal edge. */
.blobs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%);
}

.ablob {
  position: absolute;
  filter: blur(72px);
  opacity: .13;
  animation:
    morph var(--md, 26s) var(--soft) infinite alternate,
    spin var(--sd, 60s) linear infinite;
  will-change: border-radius, transform;
}

@keyframes morph {
  0%   { border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%; }
  25%  { border-radius: 44% 56% 62% 38% / 56% 42% 58% 44%; }
  50%  { border-radius: 62% 38% 40% 60% / 42% 62% 38% 58%; }
  75%  { border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%; }
  100% { border-radius: 52% 48% 38% 62% / 44% 52% 48% 56%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   scroll reveal / wobble in
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px) scale(.965) rotate(var(--rot, -1.4deg));
  transition:
    opacity .68s var(--soft) var(--d, 0ms),
    transform .88s var(--spring) var(--d, 0ms);
  will-change: transform, opacity;
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
}

/* ============================================================
   reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .ablob { animation: none; border-radius: 52% 48% 44% 56% / 48% 54% 46% 52%; }

  [data-reveal] { opacity: 1; transform: none; }

  .btn:hover, .btn:active,
  .nav-link:hover, .credit:hover, .btn-ghost:hover { transform: none; }

  .float { animation: none !important; }
}
