: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; }
/* Headings in Fraunces (a warm serif); everything else stays Inter */
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-optical-sizing: auto; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.005em; }
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; 
}
/* The bar's background is a separate layer that fades in, so nothing moves or re-lays out when it appears */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(15, 23, 32, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.nav.solid::before { opacity: 1; }
.brand img { height: 34px; width: auto; }
.nav nav { display: flex; align-items: center; gap: 28px; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s; }
.nav.solid nav { opacity: 1; visibility: visible; }
.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: 460vh; 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(180deg, rgba(15,23,32,.9) 0%, rgba(15,23,32,.45) 30%, rgba(15,23,32,0) 55%); }
.step { position: absolute; left: max(28px, calc((100vw - var(--wrap)) / 2 + 24px)); max-width: 620px; will-change: opacity, transform; }
.step.hero { top: 11vh; left: 50%; right: auto; translate: -50% 0; width: min(620px, calc(100vw - 48px)); max-width: none; text-align: center; }
.hero-logo { width: clamp(300px, 34vw, 460px); height: auto; margin: 0 auto 26px; }
.step.hero .lead { margin: 0 auto; }
/* The small corner logo waits until you scroll, so there aren't two logos at once */
.fly-on .nav .brand { opacity: 0; transition: opacity .4s ease; }
.fly-on .nav.solid .brand { opacity: 1; }
.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; }
@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; }
/* What I do: four cards with line icons */
.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); }
.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); }

/* About */
.about-intro { max-width: 760px; }

/* 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: 32px; 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); }
  .feature { grid-template-columns: 1fr; padding: 36px 28px 0; }
  .feature-text { padding-bottom: 0; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 700px) {
  .fly-on .fly { height: 540vh; } /* a longer scroll on phones, so the approach to the screen isn't rushed */
  body { font-size: 16px; }
  .nav { padding: 12px 16px; }
  .nav nav a:not(.btn) { display: none; }
  .brand img { height: 26px; }
  .wrap { padding: 0 16px; }
  .section { padding: 84px 0; }
  .grid4 { grid-template-columns: 1fr; }
  .step { left: 16px; right: 16px; }
  .step.hero { top: 76px; left: 50%; right: auto; translate: -50% 0; width: calc(100vw - 32px); }
  .hero-logo { width: min(300px, 82vw); margin-bottom: 18px; }
  .step.hero .lead { font-size: 1rem; }
  .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; }
}

/* Arriving in the screen: the real section fades in over the snapshot */
.fly-on #work, .fly-on #gl { transition: opacity .35s ease; }


/* The factory model card: text on the left, the render on the right */
.feature-model { padding-bottom: 48px; }
.model-shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(0,0,0,.35); }
@media (max-width: 960px) { .feature-model { padding-bottom: 28px; } .model-shot { margin-top: 4px; } }

/* Websites: a tall section whose inner screen sticks while the track slides sideways */
.hscroll { height: 460vh; position: relative; margin-top: 40px; }
.hs-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hs-head { position: absolute; top: 96px; left: 0; right: 0; }
.hs-title { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.hs-track { display: flex; will-change: transform; transform: translate3d(100vw, 0, 0); }
.hs-slot { flex: 0 0 100vw; display: flex; justify-content: center; padding: 0 24px; }
.slide { width: min(1220px, 100%); display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 44px 22px 22px; }
.slide-shot { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-2); }
.slide-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; will-change: transform; }
.slide-text h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.slide-text p:not(.tag) { color: #c3cfda; }
.hs-bar { position: absolute; left: 50%; bottom: 56px; width: min(320px, 60vw); height: 2px; translate: -50% 0; background: var(--line); border-radius: 2px; overflow: hidden; }
.hs-bar span { display: block; height: 100%; width: 100%; background: var(--mint); transform-origin: left; transform: scaleX(0); }
@media (max-width: 760px) {
  .hs-head { top: 76px; }
  .hs-slot { padding: 0 16px; }
  .slide { grid-template-columns: 1fr; gap: 18px; padding: 14px 14px 22px; }
  .slide-text { padding: 0 6px; }
  .hs-bar { bottom: 40px; }
}
/* Reduced motion: no pinning or sliding, just the two cards one after the other */
@media (prefers-reduced-motion: reduce) {
  .hscroll { height: auto; }
  .hs-stick { position: static; height: auto; overflow: visible; padding: 40px 0 0; }
  .hs-head { position: static; margin-bottom: 20px; }
  .hs-track { flex-direction: column; gap: 24px; transform: none !important; }
  .hs-slot { flex-basis: auto; }
  .hs-bar { display: none; }
}

/* Card effects, only when the sliding is running (not for reduced motion) */
.hs-on .slide { will-change: transform, opacity; transform-origin: center; }
.hs-on .slide-text > * { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.hs-on .slide.on .slide-text > * { opacity: 1; transform: none; }
.hs-on .slide.on .slide-text > :nth-child(2) { transition-delay: .08s; }
.hs-on .slide.on .slide-text > :nth-child(3) { transition-delay: .16s; }
.hs-on .slide.on .slide-text > :nth-child(4) { transition-delay: .24s; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
