:root {
  --paper: #f5f2ea;
  --paper-2: #ece7da;
  --ink: #14201a;
  --ink-2: #3d4a43;
  --muted: #66736b;
  --vine: #1f4d3a;
  --vine-2: #2f6b4f;
  --vine-3: #8fb59d;
  --trove: #c08a2e;
  --trove-2: #e3b862;
  --line: rgba(20, 32, 26, 0.12);
  --dark: #12201a;
  --dark-2: #1b2e25;
  --graphite: #121417;
  --brand-teal: #4f98af;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;

  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 40px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 em, h2 em { font-style: italic; color: var(--vine-2); font-weight: 300; }

p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1200px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--trove); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vine-2);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--trove);
  transform: rotate(45deg);
  flex: none;
}

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--vine);
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.btn:hover { background: var(--ink); }
.btn:active { transform: scale(0.97); }
.btn--small { padding: 10px 18px; font-size: 15px; }
.btn--block { width: 100%; }

.link-arrow {
  font-weight: 500;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.link-arrow::after { content: "→"; transition: transform 0.25s var(--ease); }
.link-arrow:hover::after, .case--next:hover .link-arrow::after { transform: translateX(4px); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 242, 234, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.nav__links { display: flex; gap: 32px; font-size: 15px; }
.nav__links a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }

/* Logo: cube mark + Montserrat wordmark, from the Trovine logo system in Figma */
.logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--graphite); }
.logo svg { height: 32px; width: auto; flex: none; }
.mark__sides { fill: var(--graphite); }
.mark__top { fill: var(--brand-teal); }
.wordmark {
  font-family: "Montserrat", var(--sans);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}
.logo--small svg { height: 26px; }
.logo--small .wordmark { font-size: 14px; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 6vw, 72px); position: relative; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 40px;
}
.hero h1 { font-size: clamp(44px, 7vw, 92px); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; margin-top: 28px; }
.hero__actions { display: flex; align-items: center; gap: 28px; margin-top: 40px; flex-wrap: wrap; }

.hero__art { position: relative; }
.hero__art::before {
  content: "";
  position: absolute; inset: 15% 10%;
  background: radial-gradient(closest-side, rgba(79, 152, 175, 0.16), transparent);
  filter: blur(24px);
}

/* Isometric line art, same language as the Design Directory illustrations:
   the logo cube at the core, vine links branching out to floating plates. */
.iso { height: auto; position: relative; overflow: visible; }
.hero__art .iso { width: 118%; margin-left: -9%; }
.iso g { transform-box: fill-box; transform-origin: center; }
.iso polygon, .iso line { vector-effect: non-scaling-stroke; stroke-width: 1; stroke-linejoin: round; }
.iso .f-top { fill: #fff; stroke: #8c9196; }
.iso .f-side { fill: #ebe8e0; stroke: #a0a4a8; }
.iso .f-side2 { fill: #dedad1; stroke: #a0a4a8; }
.iso :is(.core, .lead, .peak) .f-top { fill: var(--brand-teal); stroke: #3c7d92; }
.iso :is(.core, .lead) .f-side { fill: #23272c; stroke: var(--graphite); }
.iso :is(.core, .lead) .f-side2 { fill: var(--graphite); stroke: var(--graphite); }
.iso .gem .f-top { fill: #d3e7ee; stroke: var(--brand-teal); }
.iso .link { stroke: #9aa0a5; stroke-dasharray: 3 4; }

/* Grow in tier by tier, then idle: signals run out along the links,
   plates light up in a wave and the trove cubes bob. */
.hero__art .iso .box, .hero__art .iso .link { animation: iso-in 0.8s var(--ease) both; animation-delay: calc(var(--g) * 0.3s); }
.hero__art .iso .link {
  stroke: var(--brand-teal); stroke-opacity: 0.75;
  animation: iso-in 0.8s var(--ease) both, iso-flow 1.4s linear infinite;
  animation-delay: calc(var(--g) * 0.3s), calc(var(--i) * -0.3s);
}
.hero__art .iso :is(.plate, .tile) .f-top { animation: iso-fill 4.8s ease-in-out infinite; animation-delay: calc(1.2s + var(--g) * 0.5s); }
.hero__art .iso .plate, .hero__art .iso .gem {
  animation: iso-in 0.8s var(--ease) both, iso-bob 4s ease-in-out infinite;
  animation-delay: calc(var(--g) * 0.3s), calc(var(--i) * 0.35s);
}
.hero__art .iso .gem .f-top { animation: iso-lit 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 0.4s); }

@keyframes iso-in { from { opacity: 0; } }
@keyframes iso-flow { to { stroke-dashoffset: -14; } }
@keyframes iso-bob { 50% { transform: translateY(-5px); } }
@keyframes iso-lit { 40%, 60% { stroke: var(--graphite); fill: var(--brand-teal); } }
@keyframes iso-fill { 40%, 60% { stroke: var(--brand-teal); fill: #e3f0f4; } }

.hero__meta {
  display: flex; gap: 12px 40px; flex-wrap: wrap;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.hero__meta strong { color: var(--ink); font-weight: 600; }

/* Sections */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--tint { background: var(--paper-2); }
.section--dark { background: var(--dark); color: #e8ece6; }
.section--dark .eyebrow { color: var(--vine-3); }
.section--dark .section__intro { color: #a9b5ad; }

.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.section__head--row .section__intro { max-width: 380px; margin: 0; }
.section h2 { font-size: clamp(34px, 4.6vw, 56px); }
.section__intro { color: var(--ink-2); font-size: 18px; margin-top: 20px; max-width: 40em; }
.section__intro em { font-family: var(--serif); font-size: 1.1em; color: var(--vine); }

.ticks { margin-top: 24px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: 16px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.6em;
  width: 7px; height: 7px; background: var(--trove); transform: rotate(45deg);
}

/* Why Trovine cards */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.why-card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(18, 20, 23, 0.25); }
.why-card__art {
  height: 230px;
  display: grid; place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 60%, rgba(79, 152, 175, 0.12), transparent 60%),
    radial-gradient(rgba(18, 20, 23, 0.08) 1px, transparent 1px) 0 0 / 14px 14px,
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.why-card__art .iso { width: auto; max-width: 100%; height: 100%; max-height: 170px; transition: transform 0.6s var(--ease); }
.why-card:hover .why-card__art .iso { transform: scale(1.04); }
.why-card__body { padding: 28px 30px 32px; }
.why-card__label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-teal); margin-bottom: 12px; }
.why-card h3 { font-size: 28px; margin-bottom: 12px; }
.why-card__body > p:last-child { color: var(--ink-2); font-size: 16px; }

/* Card micro-animations run once the card has scrolled into view */
.iso .stroke { stroke: var(--brand-teal); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.why-card.is-visible .iso .link { stroke: var(--brand-teal); stroke-opacity: 0.75; animation: iso-flow 1.4s linear infinite; animation-delay: calc(var(--i) * -0.3s); }
.why-card.is-visible .iso--team .member { animation: iso-bob 3s ease-in-out infinite; animation-delay: calc(var(--i) * 0.35s); }
.why-card.is-visible .iso--team .member:not(.lead) .f-top { animation: iso-fill 3s ease-in-out infinite; animation-delay: calc(var(--i) * 0.35s); }
.why-card.is-visible .iso--agents .agent .f-top { animation: iso-fill 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * 0.3s); }
.why-card.is-visible .iso--agents .agent { animation: iso-bob 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * 0.3s); }
.why-card.is-visible .iso--needle .bar { transform-origin: center bottom; animation: iso-grow 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 0.2s); }
.why-card.is-visible .iso--needle .stroke { animation: iso-draw 4s ease-in-out infinite; animation-delay: calc(var(--i) * 0.2s); }
@keyframes iso-grow { 0%, 100% { transform: scaleY(0.82); } 50% { transform: none; } }
@keyframes iso-draw { 0% { stroke-dashoffset: 1; } 35%, 75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.service {
  padding: 40px 40px 44px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 8px;
  align-content: start;
}
.service:nth-child(even) { padding: 40px 0 44px 40px; border-left: 1px solid var(--line); }
.service > *:not(.service__num) { grid-column: 2; }
.service__num { font-family: var(--serif); color: var(--trove); font-size: 18px; padding-top: 6px; grid-row: span 3; }
.service h3 { font-size: 28px; margin-bottom: 12px; }
.service p { color: var(--ink-2); }
.service .service__tags { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Work */
.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.case:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(20, 32, 26, 0.25); }
.case--wide { grid-column: span 2; flex-direction: row; }
.case--wide .case__visual { flex: 1.3; min-height: 380px; }
.case--wide .case__body { flex: 1; justify-content: center; }
.case__visual {
  min-height: 300px;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.case__visual--taskring { background: radial-gradient(circle at 30% 20%, #2f6b4f, #12201a 70%); }
.case__visual--gratitude { background: radial-gradient(circle at 70% 20%, #f6dfae, #e3b862 60%, #c08a2e); }
.case__visual--health { background: radial-gradient(circle at 20% 80%, #d6e5da, #8fb59d 70%); }

.case__body { padding: 32px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.case__meta { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.case h3 { font-size: 34px; }
.case__body > p:not(.case__meta) { color: var(--ink-2); }
.case__soon {
  margin-top: auto; padding-top: 14px; align-self: flex-start;
  font-size: 13px; font-weight: 500; color: var(--vine-2);
}

.case--next {
  text-decoration: none;
  background: transparent;
  border: 1.5px dashed rgba(20, 32, 26, 0.25);
  padding: 40px;
  justify-content: center;
  gap: 12px;
  min-height: 300px;
}

.case--link { text-decoration: none; }
.case__open { margin-top: auto; padding-top: 14px; color: var(--vine); font-size: 15px; }
.case--link:hover .case__open::after { transform: translateX(4px); }
.case--next p { color: var(--ink-2); }
.case--next .link-arrow { margin-top: 12px; color: var(--vine); }
.case__plus {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 24px; color: var(--trove); margin-bottom: 8px;
}

/* Mockups */
.phone {
  width: 170px; height: 340px;
  border-radius: 34px;
  background: #0b120e;
  padding: 8px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
  transform: rotate(-6deg) translateY(30px);
  transition: transform 0.6s var(--ease);
}
.case:hover .phone { transform: rotate(-3deg) translateY(20px); }
.phone__screen {
  height: 100%; border-radius: 27px; background: #f7f5ef;
  padding: 36px 18px; display: flex; flex-direction: column; gap: 18px;
}
.ring { position: relative; width: 104px; margin: 0 auto; }
.ring svg { width: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring__track { stroke: #e3e8e3; }
.ring__fill { stroke: var(--vine-2); stroke-linecap: round; stroke-dasharray: 72 100; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; }
.rows { display: grid; gap: 10px; }
.rows i { display: block; height: 28px; border-radius: 8px; background: #e8ebe6; }
.rows i:first-child { background: rgba(47, 107, 79, 0.18); }
.rows--soft i { height: 10px; background: #eee9dc; }
.rows--soft i:last-child { width: 60%; }

.case__visual--gratitude .phone { transform: rotate(5deg) translateY(30px); }
.case:hover .case__visual--gratitude .phone { transform: rotate(2deg) translateY(20px); }
.journal__date { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--trove); font-weight: 600; }
.journal__line { font-family: var(--serif); font-size: 20px; line-height: 1.25; font-style: italic; }

.dash {
  width: 78%; background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 30px 60px -24px rgba(20, 32, 26, 0.4);
  transform: translateY(24px);
  transition: transform 0.6s var(--ease);
}
.case:hover .dash { transform: translateY(14px); }
.dash__bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.dash__bars i { flex: 1; height: var(--h); background: var(--vine-3); border-radius: 6px 6px 2px 2px; }
.dash__bars i:nth-child(6) { background: var(--vine-2); }
.dash__stats { display: flex; gap: 10px; margin-top: 18px; }
.dash__stats span { flex: 1; height: 36px; border-radius: 8px; background: #eef2ee; }

.case__visual--directory { background: radial-gradient(circle at 80% 10%, #2f6b4f, #14201a 75%); }
.lexicon {
  width: 80%;
  color: #e8ece6;
  transform: translateY(8px);
  transition: transform 0.6s var(--ease);
}
.case:hover .lexicon { transform: none; }
.lexicon__word { font-family: var(--serif); font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; }
.lexicon__word span { font-family: var(--sans); font-size: 14px; color: var(--vine-3); letter-spacing: 0; margin-left: 6px; }
.lexicon__def { margin-top: 10px; font-size: 15px; color: #a9b5ad; padding-bottom: 20px; border-bottom: 1px solid rgba(143, 181, 157, 0.25); }
.lexicon__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.lexicon__chips span { font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(143, 181, 157, 0.35); color: #cfd8d1; }
.lexicon__chips span:first-child { background: var(--trove-2); border-color: var(--trove-2); color: var(--ink); }

/* Process */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; position: relative; }
.process::before {
  content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px;
  background: linear-gradient(90deg, var(--vine-3), rgba(143, 181, 157, 0.1));
}
.step { position: relative; padding-top: 64px; }
.step__num {
  position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--dark-2); border: 1px solid rgba(143, 181, 157, 0.4);
  font-family: var(--serif); font-size: 16px; color: var(--trove-2);
}
.step h3 { font-size: 28px; margin-bottom: 12px; color: #fff; }
.step p { color: #a9b5ad; font-size: 16px; }
.step__time { display: inline-block; margin-top: 18px; font-size: 13px; color: var(--vine-3); border: 1px solid rgba(143, 181, 157, 0.3); padding: 4px 12px; border-radius: 999px; }

/* Contact */
.contact__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.contact h2 { font-size: clamp(40px, 5.5vw, 68px); }
.contact__card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px);
}
.contact__email {
  font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px);
  text-decoration: none; color: var(--vine);
  border-bottom: 1px solid var(--vine-3);
  word-break: break-word;
}
.contact__email:hover { border-bottom-color: var(--vine); }
.contact__hint { margin-top: 28px; color: var(--muted); font-size: 15px; }
.contact__card .ticks { margin: 12px 0 32px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.footer .logo { color: var(--ink); }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.is-visible:is(.case, .why-card):hover { transform: translateY(-4px); transition-delay: 0s !important; }

/* Responsive */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { max-width: 460px; width: 100%; margin: 0 auto; order: -1; }
  .hero__art .iso { width: 100%; margin-left: 0; }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .process::before { display: none; }
  .contact__inner { grid-template-columns: 1fr; }
  .why { grid-template-columns: 1fr; max-width: 560px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .services, .work { grid-template-columns: 1fr; }
  .service, .service:nth-child(even) { padding: 32px 0; border-left: 0; grid-template-columns: 44px 1fr; }
  .case--wide { grid-column: auto; flex-direction: column; }
  .case--wide .case__visual { min-height: 300px; }
  .process { grid-template-columns: 1fr; }
  .hero__meta { flex-direction: column; }
}

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