/* ==========================================================================
   Loom — marketing site, rebuilt to the LOCKED Loom spec (Prism):
   style  st-warm-grey-loom  — calm warm grey, dot grid, glass pills, handwriting
   palette pal-loom-warmgrey — #f9f9f9 / #f2f4f4, ink #2d3435, primary #111,
                                gold accent #c79440, saturation cap 40
   fonts  fp-loom-locked     — Inter everywhere, Caveat handwriting accents
   Concept: every page IS a Loom canvas. Dot grid ground, canvas-cards,
   hand-drawn connector squiggles, Caveat margin notes, sticky notes.
   ========================================================================== */

:root {
  --bg0: #f9f9f9;
  --bg1: #f2f4f4;
  --card: #ffffff;
  --ink: #2d3435;
  --ink2: #596061;
  --faint: #9aa1a2;
  --black: #111111;
  --gold: #c79440;
  --gold-soft: #f0e3c8;

  /* muted card-tag hues (saturation-capped) */
  --tag-sage: #7d9d87;
  --tag-clay: #b3826d;
  --tag-slate: #7e93a8;
  --tag-plum: #97819f;

  --sticky: #f6ecd4;
  --sticky-ink: #6d5a33;

  --hair: 1px solid rgba(45, 52, 53, 0.1);
  --hair-strong: 1px solid rgba(45, 52, 53, 0.16);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --sh-card: 0 1px 2px rgba(45, 52, 53, 0.05), 0 8px 24px -12px rgba(45, 52, 53, 0.18);
  --sh-lift: 0 2px 4px rgba(45, 52, 53, 0.06), 0 18px 40px -16px rgba(45, 52, 53, 0.25);
  --sh-pill: 0 1px 2px rgba(45, 52, 53, 0.06), 0 10px 30px -12px rgba(45, 52, 53, 0.16);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.5, 1);
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

/* the canvas ground: dot grid on everything */
.canvas-ground {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(45, 52, 53, 0.13) 1.3px, transparent 1.3px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, black 0%, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 78%, transparent 100%);
}

a { color: inherit; text-decoration: none; }
::selection { background: rgba(199, 148, 64, 0.25); }

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.06; margin: 0; font-weight: 700; }

.hand {
  font-family: "Caveat", cursive;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink2);
}
.hand.gold { color: var(--gold); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 44px); }

/* ---------------- nav: a floating glass pill ---------------- */
.nav-wrap {
  position: fixed; inset: 18px 0 auto 0; z-index: 80;
  display: flex; justify-content: center; padding: 0 16px;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 4px;
  padding: 8px 10px 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: var(--hair);
  box-shadow: var(--sh-pill);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; margin-right: 14px; }
.brand .mark { width: 24px; height: 24px; display: grid; place-items: center; color: var(--black); }
.brand .mark svg { width: 100%; height: 100%; }
.navlink {
  padding: 8px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--ink2);
  transition: all 0.2s var(--ease);
}
.navlink:hover { color: var(--ink); background: rgba(45, 52, 53, 0.06); }
.navlink.active { color: var(--ink); background: rgba(45, 52, 53, 0.08); }
.nav .btn { margin-left: 10px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-family: "Inter"; font-weight: 600; font-size: 14.5px;
  cursor: pointer; border: none; transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-black { background: var(--black); color: #fff; box-shadow: 0 10px 24px -10px rgba(17, 17, 17, 0.5); }
.btn-black:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(17, 17, 17, 0.55); }
.btn-line { background: var(--card); color: var(--ink); border: var(--hair-strong); box-shadow: var(--sh-card); }
.btn-line:hover { transform: translateY(-2px); box-shadow: var(--sh-lift); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ---------------- hero (centered, ON the canvas) ---------------- */
.hero {
  position: relative;
  padding: 170px 0 90px;
  text-align: center;
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  background: var(--card); border: var(--hair); box-shadow: var(--sh-card);
  font-size: 12.5px; font-weight: 600; color: var(--ink2);
  margin-bottom: 26px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); letter-spacing: -0.045em; }
.hero h1 .underline { position: relative; white-space: nowrap; }
.hero h1 .underline svg {
  position: absolute; left: 0; right: 0; bottom: -10px; width: 100%; height: 16px;
  color: var(--gold);
}
.hero .lede {
  font-size: clamp(15.5px, 1.55vw, 18.5px); color: var(--ink2);
  font-weight: 450; max-width: 54ch; margin: 26px auto 32px; line-height: 1.65;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 19px; }

/* scattered canvas cards around the hero */
.scatter { position: absolute; inset: 0; pointer-events: none; }
.cv-card {
  position: absolute;
  background: var(--card); border: var(--hair); border-radius: var(--r-md);
  box-shadow: var(--sh-card); padding: 13px 15px;
  font-size: 13px; font-weight: 600; text-align: left;
  min-width: 130px;
  animation: bob 9s var(--ease) infinite;
}
.cv-card .tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  margin-bottom: 6px; color: var(--ink2);
}
.cv-card .tag::before { content: ""; width: 7px; height: 7px; border-radius: 3px; background: currentColor; opacity: 0.85; }
.cv-card .tag.sage { color: var(--tag-sage); }
.cv-card .tag.clay { color: var(--tag-clay); }
.cv-card .tag.slate { color: var(--tag-slate); }
.cv-card .tag.plum { color: var(--tag-plum); }
.cv-card .tag.gold { color: var(--gold); }
.cv-card small { display: block; font-weight: 450; color: var(--faint); font-size: 11.5px; margin-top: 4px; }
.cv-card .check { display: flex; align-items: center; gap: 7px; font-weight: 500; font-size: 12.5px; margin-top: 5px; color: var(--ink2); }
.cv-card .check svg { width: 14px; height: 14px; color: var(--tag-sage); flex: none; }

.sticky-note {
  position: absolute;
  background: var(--sticky);
  border-radius: 4px;
  padding: 14px 16px;
  font-family: "Caveat"; font-size: 19px; line-height: 1.25; font-weight: 600;
  color: var(--sticky-ink);
  box-shadow: 0 6px 18px -8px rgba(120, 95, 40, 0.35);
  transform: rotate(-3deg);
  animation: bob 11s var(--ease) infinite;
}
.sticky-note::before {
  content: ""; position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 14px; background: rgba(199, 148, 64, 0.28);
  border-radius: 2px;
}

.annot { position: absolute; font-family: "Caveat"; font-size: 21px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.annot svg { display: block; width: 70px; height: 40px; color: var(--gold); }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-7px) rotate(var(--rot, 0deg)); } }

/* hand-drawn wires layer */
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wires path { stroke: rgba(45, 52, 53, 0.3); stroke-width: 1.8; fill: none; stroke-dasharray: 6 7; stroke-linecap: round; }

/* ---------------- sections ---------------- */
section { position: relative; padding: clamp(56px, 7.5vw, 92px) 0; }
.sec-head { max-width: 640px; margin-bottom: 44px; position: relative; }
.sec-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.sec-title { font-size: clamp(28px, 3.8vw, 42px); letter-spacing: -0.04em; }
.sec-sub { font-size: clamp(15px, 1.4vw, 17px); color: var(--ink2); font-weight: 450; margin-top: 14px; line-height: 1.65; }
.sec-note { font-family: "Caveat"; font-size: 21px; color: var(--gold); margin-top: 10px; display: inline-block; }

/* canvas-card grid (features) */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.feature {
  position: relative;
  background: var(--card); border: var(--hair); border-radius: var(--r-lg);
  box-shadow: var(--sh-card); padding: 26px;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}
a.feature:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: var(--sh-lift); }
.feature .f-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink2); margin-bottom: 14px;
}
.feature .f-tag::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: currentColor; opacity: 0.8; }
.feature .f-tag.sage { color: var(--tag-sage); }
.feature .f-tag.clay { color: var(--tag-clay); }
.feature .f-tag.slate { color: var(--tag-slate); }
.feature .f-tag.plum { color: var(--tag-plum); }
.feature .f-tag.gold { color: var(--gold); }
.feature h3 { font-size: 18.5px; margin-bottom: 8px; letter-spacing: -0.02em; }
.feature p { font-size: 14px; color: var(--ink2); font-weight: 450; margin: 0; line-height: 1.6; }
.feature .corner-hand { position: absolute; right: 18px; top: 16px; font-family: "Caveat"; font-size: 17px; color: var(--faint); transform: rotate(2deg); }

/* glass pill row (views) */
.pills { display: flex; flex-wrap: wrap; gap: 9px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.75); border: var(--hair);
  box-shadow: var(--sh-card); backdrop-filter: blur(8px);
  font-weight: 600; font-size: 13.5px;
}
.pill svg { width: 15px; height: 15px; color: var(--gold); }

/* detail rows */
.row { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 5vw, 60px); align-items: center; padding: 52px 0; }
.row + .row { border-top: var(--hair); }
.row .copy { grid-column: 1 / span 6; }
.row .aside { grid-column: 8 / span 5; }
.row.flip .copy { grid-column: 7 / span 6; order: 2; }
.row.flip .aside { grid-column: 1 / span 5; order: 1; }
.row h2 { font-size: clamp(23px, 2.9vw, 32px); letter-spacing: -0.035em; margin-bottom: 13px; }
.row p { font-size: 15px; color: var(--ink2); font-weight: 450; line-height: 1.68; margin: 0 0 12px; }
.row p b { color: var(--ink); font-weight: 650; }
.mini { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mini li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 500; }
.mini li svg { width: 17px; height: 17px; flex: none; color: var(--tag-sage); margin-top: 1px; }

/* a mini-canvas panel used as the aside visual */
.panel {
  position: relative;
  border: var(--hair); border-radius: var(--r-lg);
  background:
    radial-gradient(rgba(45, 52, 53, 0.12) 1.2px, transparent 1.2px),
    var(--card);
  background-size: 20px 20px, auto;
  box-shadow: var(--sh-card);
  min-height: 250px;
  overflow: hidden;
}
.panel .cv-card { position: absolute; animation: none; }
.panel .sticky-note { position: absolute; animation: none; }

/* CTA band — a big sticky-note slab */
.cta-band {
  position: relative;
  border-radius: var(--r-lg); padding: clamp(40px, 6vw, 64px);
  background: var(--black); color: #f5f4f1;
  text-align: center; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(17, 17, 17, 0.6);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(27px, 3.8vw, 42px); letter-spacing: -0.04em; }
.cta-band .hand-line { font-family: "Caveat"; font-size: clamp(20px, 2.4vw, 26px); color: var(--gold); margin: 12px 0 26px; }
.cta-band .hero-ctas { justify-content: center; }
.cta-band .btn-line { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.2); box-shadow: none; }

/* ---------------- subpage hero ---------------- */
.page-hero { padding: 150px 0 28px; position: relative; }
.back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--faint); margin-bottom: 22px; transition: color 0.2s; }
.back svg { width: 14px; height: 14px; }
.back:hover { color: var(--gold); }
.page-hero h1 { font-size: clamp(34px, 4.8vw, 56px); letter-spacing: -0.045em; max-width: 19ch; }
.page-hero .lede { font-size: clamp(15.5px, 1.5vw, 18px); color: var(--ink2); font-weight: 450; max-width: 58ch; margin-top: 16px; line-height: 1.65; }

/* ---------------- footer ---------------- */
footer { padding: 44px 0 56px; border-top: var(--hair); margin-top: 36px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot .brand { font-size: 15px; margin: 0; }
.foot-links { display: flex; gap: 20px; }
.foot-links a { font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.foot-links a:hover { color: var(--gold); }
.foot-note { font-family: "Caveat"; font-size: 19px; color: var(--faint); }

/* ---------------- reveal ---------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s var(--ease), transform 0.55s var(--spring); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .scatter { display: none; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .row .copy, .row.flip .copy, .row .aside, .row.flip .aside { grid-column: 1 / span 12; order: initial; }
}
@media (max-width: 640px) {
  .navlink { display: none; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .hero { padding-top: 130px; }
}
