:root {
  --slate: #3c485e;
  --teal: #7db7b9;
  --blue: #385dff;
  --gray: #dddddd;
  --green: #3ab795;
  --paper: color-mix(in srgb, var(--gray) 22%, #fff);
  --slate-deep: color-mix(in srgb, var(--slate) 85%, #1a2233);
  --edge: linear-gradient(135deg, var(--green), var(--teal) 45%, var(--blue));
  --head: "Forum", Georgia, serif;
  --body: "Manrope", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--body); color: var(--slate); background: var(--paper); }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; padding: .6em 1em; background: #fff; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Hero */
/* The track is taller than the screen; the hero sticks while scrolling through it drives the video. */
.hero-track { height: 160svh; }
.hero { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; overflow: hidden; color: #fff; isolation: isolate; background: var(--slate); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; will-change: transform; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--edge); }
.hero-inner { max-width: 56rem; padding: 7rem 1.5rem 5rem; text-align: center; }
.logo { width: min(200px, 50vw); margin-bottom: 1.5rem; filter: drop-shadow(0 2px 12px rgb(60 72 94 / .5)); }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); margin-bottom: .7em; text-shadow: 0 1px 3px rgb(60 72 94 / .8), 0 2px 18px rgb(60 72 94 / .7); }
.section-lede { font-size: 1.2rem; max-width: 44rem; margin: -.2em 0 0; }
.actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.nav { position: absolute; z-index: 2; top: 0; right: 0; display: flex; gap: 1.6rem; align-items: center; padding: 1.4rem 1.8rem; font-weight: 600; }
.nav a { color: #fff; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.toggle { position: absolute; z-index: 2; right: 1rem; bottom: 1.2rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; color: #fff; border-radius: 50%; cursor: pointer;
  border: 1px solid transparent; background: linear-gradient(rgb(60 72 94 / .6), rgb(60 72 94 / .6)) padding-box, var(--edge) border-box; }
.toggle svg { width: 14px; height: 14px; fill: currentColor; }
.toggle .i-play, .toggle.is-paused .i-pause { display: none; }
.toggle.is-paused .i-play { display: block; }

/* Falling leaves in the services section: the back layer passes behind the cards, the front layer over them. */
.leaf-section { position: relative; isolation: isolate; overflow: hidden; }
.leaves { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.leaves img { position: absolute; left: 0; top: 0; height: auto; will-change: transform; }
.leaves-back { z-index: -1; opacity: .85; }
.leaves-front { z-index: 1; }
.leaves-front img { filter: drop-shadow(0 8px 6px rgb(60 72 94 / .3)); }
.leaves-back img { filter: drop-shadow(0 4px 4px rgb(60 72 94 / .2)); }

/* Buttons: gradient border, palette fill */
.btn { display: inline-block; font: 700 1rem var(--body); padding: .85em 1.6em; border-radius: 999px; text-decoration: none; cursor: pointer; color: #fff;
  border: 2px solid transparent; background: linear-gradient(var(--blue), var(--blue)) padding-box, var(--edge) border-box; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgb(56 93 255 / .35); }
.btn-ghost, .nav-cta { background: linear-gradient(rgb(60 72 94 / .45), rgb(60 72 94 / .45)) padding-box, var(--edge) border-box; }
.nav-cta { padding: .45em 1.1em; border-radius: 999px; border: 2px solid transparent; }

/* Sections */
.section { padding: clamp(4rem, 9vw, 7rem) 1.5rem; }
.wrap { max-width: 72rem; margin: 0 auto; }
.section-tint { background: color-mix(in srgb, var(--teal) 14%, #fff); }
.section-dark { background: linear-gradient(160deg, var(--slate), var(--slate-deep)); color: var(--gray); }
.section-dark h2, .section-dark h3 { color: #fff; }

/* Cards: gradient border via padding-box/border-box backgrounds */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); margin-top: 2rem; }
.card { padding: 1.8rem; border-radius: 18px; border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--edge) border-box; box-shadow: 0 10px 30px -18px rgb(60 72 94 / .45); }
.card h3 { color: var(--slate); }
.card p:last-child { margin: 0; }
/* Service cards once JS takes over the border: the content rises in as the border closes (--show),
   and on hover the card lifts and tilts (transform set in JS), with a spotlight following the cursor. */
.cards .card.draw { position: relative; background: #fff; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.cards .card.draw > h3, .cards .card.draw > p { position: relative; opacity: var(--show, 1);
  transform: translateY(calc((1 - var(--show, 1)) * 28px)); filter: blur(calc((1 - var(--show, 1)) * 5px)); }
.cards .card.draw::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgb(125 183 185 / .25), transparent 70%); }
.cards .card.draw:hover { box-shadow: 0 26px 40px -24px rgb(56 93 255 / .5); }
.cards .card.draw:hover::before { opacity: 1; }
.cards .card.draw .draw-border rect { transition: stroke-width .35s; }
.cards .card.draw:hover .draw-border { filter: drop-shadow(0 0 5px rgb(56 93 255 / .55)); }
.cards .card.draw:hover .draw-border rect { stroke-width: 3; }
.more { margin-top: 2.5rem; font-size: 1.1rem; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
/* Scroll builds the steps one at a time: the line draws (--line), then the content rises in (--show).
   Both default to 1, so the steps are complete without JS or with reduced motion. */
.steps li { counter-increment: s; position: relative; padding-top: 1rem; --line: 1; --show: 1; }
.steps li::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--edge);
  transform: scaleX(var(--line)); transform-origin: left; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font: 700 .85rem var(--body); letter-spacing: .1em; color: var(--blue); }
.steps li::before, .steps li > * { opacity: var(--show); transform: translateY(calc((1 - var(--show)) * 48px)) scale(calc(.94 + var(--show) * .06));
  filter: blur(calc((1 - var(--show)) * 6px)); transform-origin: left top; }
.steps li::after { height: 4px; }
.steps h3 { margin-top: .3rem; }

.about { display: grid; gap: 3rem; grid-template-columns: 3fr 2fr; align-items: start; }
.name-note { padding: 1.8rem; border-radius: 18px; border: 4px solid transparent;
  background: linear-gradient(var(--slate), var(--slate)) padding-box, var(--edge) border-box; }
.name-note p:last-child { margin: 0; }
/* Scroll-drawn border: JS swaps the static gradient border for an SVG outline that traces itself in. */
.name-note.draw { position: relative; background: var(--slate); }
/* Why Pando: a 4px border grows around the box with a glowing tip; when the loop closes (.joined),
   the box pulses once and "one living organism" gets a gradient underline sweeping across it. */
.name-note .draw-border { inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); }
.name-note .tip { transition: opacity .3s; }
.name-note.joined { animation: joined 1.4s cubic-bezier(.2, .8, .2, 1); }
@keyframes joined {
  0% { box-shadow: 0 0 0 0 rgb(58 183 149 / .55), 0 0 0 0 rgb(56 93 255 / .35); }
  100% { box-shadow: 0 0 0 26px rgb(58 183 149 / 0), 0 0 60px 10px rgb(56 93 255 / 0); }
}
.as-one { background: var(--edge) no-repeat left bottom / 100% 3px; padding-bottom: 2px; }
.name-note.draw .as-one { background-size: 0 3px; transition: background-size 1.1s cubic-bezier(.6, 0, .2, 1) .35s, color .6s .35s; }
.name-note.joined .as-one { background-size: 100% 3px; color: #fff; }
.draw-border { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); pointer-events: none; overflow: visible; }

/* Contact */
.contact { display: grid; gap: 3rem; grid-template-columns: 2fr 3fr; align-items: start; }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; color: var(--slate); padding: .7em .85em; border-radius: 10px;
  border: 1.5px solid color-mix(in srgb, var(--teal) 70%, var(--slate)); background: #fff; }
/* Custom chevron so the arrow sits 1rem in from the edge instead of against it. */
.form select { appearance: none; padding-right: 3rem; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%233c485e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1.1rem center; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgb(56 93 255 / .2); }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; }
.form-status:empty { display: none; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: color-mix(in srgb, var(--green) 70%, var(--slate)); }
.form-status.err { color: #b3261e; }

.footer { display: flex; gap: .8rem; align-items: center; justify-content: center; padding: 2rem 1rem; color: var(--gray); background: var(--slate-deep); border-top: 4px solid; border-image: var(--edge) 1; }
.footer p { margin: 0; }

@media (max-width: 800px) {
  .about, .contact { grid-template-columns: 1fr; }
  .nav { gap: 1rem; padding: 1rem; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-track { height: auto; }
  .hero { position: relative; }
  .leaves, .toggle { display: none; }
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
