:root {
  --ink: #211c15;
  --paper: #f7f3ea;
  --panel: #fffdfa;
  --muted: #756c5e;
  --soft: #968b7b;
  --line: rgba(33, 28, 21, 0.09);
  --button: #2a241c;
  --button-ink: #fdfbf6;

  /* Flat-shape art palettes, carried over from the original banner and cards */
  --sage: #9fb395;
  --forest: #3b4d33;
  --mist: #a9b5c2;
  --slate: #313b47;
  --sand: #c8c2a9;
  --umber: #494132;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --serif: "Lora", "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: -0.015em;
  overflow-x: hidden;
}

a { color: inherit; }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.03em; }

.wrap { width: min(100% - 48px, 1080px); margin: 0 auto; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1080px) / 2));
  background: rgba(247, 243, 234, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { width: 27px; height: 27px; transition: transform 0.5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }

.nav-links { display: flex; align-items: center; gap: 25px; font-size: 13px; color: var(--muted); }
.nav-links a { text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons (arrow slides in on hover) ---------- */
.button,
.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.nav-cta { min-height: 0; padding: 8px 14px; }

.primary,
.nav-cta { background: var(--button); color: var(--button-ink) !important; }

.primary:hover,
.nav-cta:hover { background: var(--button-ink); color: var(--button) !important; box-shadow: inset 0 0 0 1px var(--button); }

.secondary { background: rgba(255, 255, 255, 0.54); box-shadow: inset 0 0 0 1px var(--line); }
.secondary:hover { background: var(--button); color: var(--button-ink); box-shadow: inset 0 0 0 1px var(--button); }

.button-arrow {
  display: inline-block;
  width: 0;
  opacity: 0;
  transform: translateX(-12px);
  transition: width 0.24s ease, opacity 0.2s ease, transform 0.24s ease;
}

.button-label { display: inline-block; transition: transform 0.24s ease; }

.button:hover .button-arrow,
.nav-cta:hover .button-arrow { width: 16px; opacity: 1; transform: none; }

.button:hover .button-label,
.nav-cta:hover .button-label { transform: translateX(7px); }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 clamp(72px, 10vw, 120px); }

.art-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 1;
  max-height: 52svh;
  width: 100%;
  background: var(--sage);
  animation: panel-in 1.2s var(--ease) both;
}

.art-panel svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero-copy {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: end;
  margin-top: clamp(28px, 4vw, 44px);
}

h1 { margin: 0; font-size: clamp(44px, 6vw, 72px); line-height: 1; }

.lede { margin: 0; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.5; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.hero-side { animation: rise-in 0.9s 0.7s var(--ease) both; }

/* Heading words blur in one after another (split by main.js) */
.js .split .word {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0.25em);
  transition: opacity 0.7s ease, filter 0.7s ease, transform 0.8s var(--ease);
  transition-delay: calc(var(--i) * 70ms + 250ms);
}

.js .split.in .word { opacity: 1; filter: none; transform: none; }

/* ---------- Art shapes ---------- */
.shape { transform-box: fill-box; transform-origin: center; }

.spin { animation: spin 70s linear infinite; }
.spin.reverse { animation-direction: reverse; animation-duration: 90s; }
.flow { animation: flow 10s linear infinite; }
.bob { animation: bob 6s ease-in-out infinite; }
.breathe { animation: breathe 5s ease-in-out infinite; }

/* Pointer + scroll parallax, driven by --mx, --my and --p set in main.js */
.par {
  transform: translate(
    calc(var(--mx, 0) * var(--dx, 0) * 1px),
    calc(var(--my, 0) * var(--dy, 0) * 1px + var(--p, 0) * var(--sy, 0) * 1px)
  ) rotate(calc(var(--p, 0) * var(--sr, 0) * 1deg));
  transition: transform 0.6s var(--ease);
}

.enter-up { animation: enter-up 1.4s 0.15s var(--ease) both; }
.enter-down { animation: enter-down 1.4s 0.3s var(--ease) both; }
.enter-pop { animation: enter-pop 0.9s 0.9s var(--ease) both; }

/* ---------- Statement band ---------- */
.statement {
  padding: clamp(80px, 12vw, 150px) 24px;
  background: var(--forest);
  color: #eef0e6;
  text-align: center;
}

.statement p {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(30px, 4.8vw, 62px);
  line-height: 1.06;
  text-wrap: balance;
}

.statement em { font-style: italic; color: #b9cbab; }

/* ---------- Section headings ---------- */
.section { padding: clamp(80px, 11vw, 130px) 0; }

.section-heading { max-width: 560px; margin-bottom: 32px; }

.section-heading h2 { margin: 0; font-size: clamp(38px, 5.3vw, 62px); line-height: 1; }

.section-heading p { margin: 15px 0 0; max-width: 430px; color: var(--muted); font-size: 16px; line-height: 1.45; }

/* ---------- Model ---------- */
.model {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  text-decoration: none;
}

.model-art { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 20px; background: var(--mist); }
.model-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.model-art .lens-l,
.model-art .lens-r,
.model-art .pupil { transition: transform 0.9s var(--ease); }
.model:hover .lens-l { transform: translateX(-30px); }
.model:hover .lens-r { transform: translateX(30px); }
.model:hover .pupil { transform: scale(1.3); }

.model-label { margin: 0 0 10px; font-size: 12px; color: #847969; }
.model h3 { margin: 0 0 18px; font-size: clamp(48px, 6vw, 76px); line-height: 0.95; }
.model .tagline { margin: 0 0 16px; font-size: clamp(18px, 2vw, 22px); line-height: 1.25; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { padding: 6px 9px; border-radius: 999px; background: #ece5d8; color: var(--muted); font-size: 11px; }

.learn { display: inline-flex; align-items: center; margin-top: 26px; font-size: 13px; font-weight: 600; }
.model:hover .learn .button-arrow { width: 16px; opacity: 1; transform: none; }
.model:hover .learn .button-label { transform: translateX(7px); }

/* ---------- Applications ---------- */
.approach { padding-bottom: 0; }
.app .index { display: block; margin-bottom: 14px; font-size: 14px; color: var(--soft); }

.apps { padding-bottom: clamp(85px, 11vw, 125px); }

.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }

.app { padding: 28px 22px 0 0; transition: transform 0.45s ease; }
.app + .app { padding-left: 22px; border-left: 1px solid var(--line); }
.app:hover { transform: translateY(-6px); }

.glyph {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--sage);
  margin-bottom: 18px;
  overflow: hidden;
}

.glyph svg { display: block; width: 100%; height: 100%; }
.glyph .shape { transition: transform 0.8s var(--ease); }
.app:hover .glyph .shape { transform: rotate(45deg) scale(1.08); }

.app b { font-size: 18px; font-family: var(--serif); font-weight: 500; }
.app p { margin: 10px 0 0; max-width: 250px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px max(22px, calc((100vw - 1080px) / 2));
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 12px;
}

.footer img { width: 20px; height: 20px; opacity: 0.7; vertical-align: middle; margin-right: 10px; }

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

/* ---------- Keyframes ---------- */
@keyframes panel-in {
  from { clip-path: inset(7% 7% 7% 7% round 48px); opacity: 0; transform: translateY(16px); }
  to { clip-path: inset(0 0 0 0 round 28px); opacity: 1; transform: none; }
}

@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes enter-up { from { transform: translateY(260px) rotate(-40deg); } to { transform: none; } }
@keyframes enter-down { from { transform: translateY(-120%); } to { transform: none; } }
@keyframes enter-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { from { transform: translateY(0); } to { transform: translateY(240px); } }
@keyframes bob { 0%, 100% { transform: translateY(-10px); } 50% { transform: translateY(10px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero-copy { grid-template-columns: 1fr; gap: 20px; }
  .model { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr; }
  .app + .app { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; margin-top: 24px; padding-top: 24px; }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .nav { padding: 0 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .art-panel { aspect-ratio: 16 / 10; border-radius: 20px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .js .split .word { opacity: 1; transform: none; filter: none; }
}
