:root {
  --bg: #0f1720;
  --bg-2: #15202b;
  --surface: #1a2733;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #1d2b3a;
  --teal: #2bb5a3;
  --mint: #5ed0b8;
  --text: #e9eef3;
  --muted: #9aabba;
  --radius: 14px;
  --wrap: 1160px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint); margin-bottom: 1.1em; }
.lead { font-size: 1.15rem; color: #c3cfda; max-width: 38em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--teal); color: #08221e; font-weight: 600; text-decoration: none;
  padding: 14px 24px; border-radius: 999px; border: 0; font-size: 1rem; cursor: pointer;
  transition: transform .2s, background .2s;
}
.btn:hover { background: var(--mint); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-small { padding: 9px 18px; font-size: .92rem; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; transition: background .3s, padding .3s, box-shadow .3s;
}
.nav.solid { background: rgba(15, 23, 32, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 10px 28px; box-shadow: 0 1px 0 var(--line); }
.brand img { height: 42px; width: auto; }
.nav nav { display: flex; align-items: center; gap: 28px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .5s, transform .5s, visibility .5s; }
.nav.solid nav { opacity: 1; visibility: visible; transform: none; }
.nav nav a:not(.btn) { text-decoration: none; color: #c9d5df; font-size: .95rem; font-weight: 500; }
.nav nav a:not(.btn):hover { color: #fff; }

/* Flythrough */
.fly { height: 420vh; position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(15,23,32,.85) 0%, rgba(15,23,32,.35) 45%, rgba(15,23,32,0) 70%); }
.step { position: absolute; left: max(28px, calc((100vw - var(--wrap)) / 2 + 24px)); max-width: 620px; will-change: opacity, transform; }
.step.hero { top: 50%; translate: 0 -46%; }
.step.hero h1 { max-width: 13em; }
.step.card {
  bottom: 12vh; max-width: 460px; padding: 26px 28px; border-radius: var(--radius);
  background: rgba(21, 32, 43, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); visibility: hidden; opacity: 0;
}
.step.card h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.step.card p:last-child { margin: 0; color: #c3cfda; }
.step.card-center { left: 50%; bottom: auto; top: 50%; translate: -50% -50%; text-align: center; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.step.card-center h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin: 0; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-hint span { width: 22px; height: 36px; border: 1.5px solid rgba(255,255,255,.35); border-radius: 12px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--mint); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* No 3D (old browser) or reduced motion: a plain hero, no flythrough */
.no-gl .fly, .no-gl .stage { height: auto; position: static; }
.no-gl #gl, .no-gl .scroll-hint, .no-gl .step.card { display: none; }
.no-gl .step.hero { position: static; translate: none; padding: 160px 24px 80px; margin: 0 auto; max-width: var(--wrap); }
@media (prefers-reduced-motion: reduce) {
  .fly { height: 100vh; }
  .step.card, .scroll-hint { display: none; }
  .step.hero { opacity: 1 !important; visibility: visible !important; transform: none !important; }
}

/* Sections */
.section { padding: 120px 0; position: relative; }
.head { margin-bottom: 56px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: border-color .3s, transform .3s; }
.tile:hover { border-color: rgba(94, 208, 184, .45); transform: translateY(-3px); }
.tile svg { width: 34px; height: 34px; fill: none; stroke: var(--mint); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.tile p { color: var(--muted); font-size: .97rem; margin: 0; }
.grid4 .tile:nth-child(2) { transition-delay: .08s; }
.grid4 .tile:nth-child(3) { transition-delay: .16s; }
.grid4 .tile:nth-child(4) { transition-delay: .24s; }

/* Work */
.tag { font-size: .8rem; font-weight: 600; color: var(--mint); letter-spacing: .04em; margin-bottom: .6em; }
.feature {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center;
  background: linear-gradient(135deg, #172431, #13202b); border: 1px solid var(--line); border-radius: 20px;
  padding: 48px 56px 0; margin-bottom: 24px; overflow: hidden;
}
.feature-text { padding-bottom: 48px; }
.feature-text h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.feature-text p:not(.tag) { color: #c3cfda; }
.link { color: var(--mint); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid rgba(94,208,184,.4); padding-bottom: 2px; }
.link:hover { border-color: var(--mint); }
.phones { position: relative; height: 520px; }
.phone { position: absolute; width: 250px; height: auto; border-radius: 26px; border: 6px solid #0b1118; box-shadow: 0 30px 60px rgba(0,0,0,.45); transition: transform 1s cubic-bezier(.2,.7,.2,1) .15s; }
.phone.p1 { left: 8%; top: 40px; transform: translateY(80px) rotate(-6deg); }
.phone.p2 { left: 48%; top: 0; transform: translateY(140px) rotate(5deg); }
.feature.in .phone.p1 { transform: translateY(0) rotate(-2deg); }
.feature.in .phone.p2 { transform: translateY(0) rotate(2deg); }
.grid3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.work { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 22px; }
.work h3, .work p { padding: 0 8px; }
.work p:last-child { color: var(--muted); font-size: .96rem; margin: 0; }
.shot { display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; margin-bottom: 18px; background: var(--bg-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
a.shot:hover img { transform: scale(1.04); }
.grid3 .work:nth-child(2) { transition-delay: .1s; }
.grid3 .work:nth-child(3) { transition-delay: .2s; }
.grid3 .work:nth-child(4) { transition-delay: .3s; }

/* About */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: start; }
.about p:not(.eyebrow):not(.lead) { color: #c3cfda; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; position: relative; color: var(--muted); }
.steps li b { color: var(--text); display: block; font-weight: 600; margin-bottom: 2px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: #c9d5df; }
label span { color: var(--muted); font-weight: 400; }
input, textarea {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; padding: 12px 14px; transition: border-color .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--mint); }
textarea { resize: vertical; }
form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-msg { min-height: 1.5em; color: var(--mint); margin: 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 48px 0; color: var(--muted); font-size: .92rem; }
.foot .wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.foot img { height: 40px; width: auto; }
.foot p { margin: 0; }
.foot .small { margin-left: auto; }

/* Slide up on the way in */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .phone { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Smaller screens */
@media (max-width: 960px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: 1fr; max-width: 560px; }
  .feature { grid-template-columns: 1fr; padding: 36px 28px 0; }
  .feature-text { padding-bottom: 0; }
  .about, .contact { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .nav { padding: 12px 16px; }
  .nav.solid { padding: 8px 16px; }
  .nav nav a:not(.btn) { display: none; }
  .brand img { height: 34px; }
  .wrap { padding: 0 16px; }
  .section { padding: 84px 0; }
  .grid4 { grid-template-columns: 1fr; }
  .shade { background: linear-gradient(0deg, rgba(15,23,32,.9) 0%, rgba(15,23,32,.4) 55%, rgba(15,23,32,.2) 100%); }
  .step { left: 16px; right: 16px; }
  .step.hero { top: auto; bottom: 110px; translate: none; }
  .step.card { bottom: 84px; left: 16px; right: 16px; max-width: none; padding: 14px 16px; border-radius: 12px; font-size: .9rem; line-height: 1.5; }
  .step.card .eyebrow { font-size: .68rem; margin-bottom: .6em; }
  .step.card h2 { font-size: 1.2rem; margin-bottom: .35em; }
  .step.card-center { left: 16px; right: 16px; translate: 0 -50%; }
  .phones { height: 380px; }
  .phone { width: 170px; }
  .phone.p1 { left: 2%; }
  .phone.p2 { left: auto; right: 2%; }
  .foot .small { margin-left: 0; }
}
