@property --c1 { syntax: "<color>"; inherits: true; initial-value: #ff5a3c; }
@property --c2 { syntax: "<color>"; inherits: true; initial-value: #c845b4; }
@property --c3 { syntax: "<color>"; inherits: true; initial-value: #1ea7e6; }

:root {
  --bg: #fffaf3;
  --ink: #2b1a12;
  --muted: #4f3b30;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(43, 26, 18, 0.1);
  --coral: #ff6a3d;
  --amber: #ffb23f;
  --rose: #e8487f;
  --plum: #7b3fa0;
  --grad: linear-gradient(120deg, var(--c1), var(--c2) 55%, var(--c3));
  --shift: 3.5s;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:root { transition: --c1 var(--shift) ease, --c2 var(--shift) ease, --c3 var(--shift) ease; }

/* Watercolor paper grain */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .18; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .45 0 0 0 0 .4 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; position: relative; }

/* Background watercolor blobs (colors set by colors.js) */
.blobs { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.blob {
  position: absolute; width: var(--s, 460px); aspect-ratio: 1;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  background: var(--c, #ffc53d);
  filter: blur(48px); opacity: .7; mix-blend-mode: multiply;
  transition: background-color 5s ease, top 9s ease-in-out, left 9s ease-in-out, width 9s ease-in-out;
  animation: morph 16s ease-in-out infinite alternate;
}
@keyframes morph {
  50% { border-radius: 58% 42% 37% 63% / 60% 55% 45% 40%; transform: rotate(40deg) scale(1.08); }
  100% { border-radius: 45% 55% 50% 50% / 38% 62% 38% 62%; transform: rotate(-20deg) scale(.95); }
}

/* Nav */
.nav { z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 0; }
.brand { padding: .35rem .8rem .35rem .4rem; border-radius: 999px; background: rgba(255,250,243,.7); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { color: var(--muted); font-size: 0.85em; }
.nav-link {
  text-decoration: none; font-size: 0.92rem; color: var(--muted);
  padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); backdrop-filter: blur(8px);
  transition: color .2s, border-color .2s;
}
.nav-link:hover { color: var(--ink); border-color: var(--c2); }

/* Hero */
.hero::before {
  content: ""; position: absolute; inset: -12% -18% -10% -14%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 40% 50%, rgba(255, 250, 243, .82) 0%, rgba(255, 250, 243, .55) 45%, rgba(255, 250, 243, 0) 72%);
}
h1 em, .brand b { filter: drop-shadow(0 1px 10px rgba(255, 255, 255, .9)); }
.hero { padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3rem, 8vw, 5rem); max-width: 860px; margin-left: max(1.5rem, calc((100% - 1120px) / 2)); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.6rem;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 0 0 rgba(255,106,61,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,106,61,0); } 100% { box-shadow: 0 0 0 0 rgba(255,106,61,0); } }
h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 1.04; letter-spacing: -0.025em;
}
h1 em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .1em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 580px; margin-top: 1.6rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.4rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 0.9rem 1.5rem; border-radius: 999px; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; text-shadow: 0 1px 3px rgba(43, 26, 18, .45); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--c2) 70%, transparent); }
.btn-primary:hover { box-shadow: 0 16px 36px -10px color-mix(in srgb, var(--c2) 80%, transparent); }
.btn-ghost { border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(8px); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; padding-bottom: 5rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 2rem; backdrop-filter: blur(12px);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(43, 26, 18, .35); }
.icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1.3rem; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i1 { background: linear-gradient(135deg, var(--c1), var(--c2)); }
.i2 { background: linear-gradient(135deg, var(--c2), var(--c3)); }
.i3 { background: linear-gradient(135deg, var(--c3), var(--c1)); }
.card h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin-bottom: 0.4rem; }
.card p { color: var(--muted); }

/* Lab */
.lab { padding-bottom: 6rem; }
.lab-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.lab-head h2 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; letter-spacing: -0.02em; }
.lab-head p { color: var(--muted); max-width: 420px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.tile {
  position: relative; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden;
  border: 1px dashed rgba(43, 26, 18, .22);
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,.35) 0 12px, rgba(255,255,255,.12) 12px 24px),
    var(--card);
  display: flex; flex-direction: column; justify-content: space-between; padding: 1.4rem;
}
.tag {
  align-self: flex-start; font-size: 0.78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .35rem .8rem; border-radius: 999px; background: #fff; color: color-mix(in srgb, var(--c1) 70%, #2b1a12); transition: color var(--shift);
}
.num { font-family: var(--serif); font-size: 4rem; line-height: 1; align-self: flex-end; color: rgba(43, 26, 18, .12); }

/* Footer */
.footer {
  background: rgba(255,250,243,.6); backdrop-filter: blur(10px); border-radius: 20px 20px 0 0; padding-inline: 1.5rem !important;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem;
  padding: 2rem 0 2.5rem; border-top: 1px solid var(--line);
  font-size: .9rem; color: var(--muted);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--c2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
