:root {
  --blue: #0a52d6;
  --blue-deep: #01458a;
  --dark: #141414;
  --dark-2: #1d1d1d;
  --white: #ffffff;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 76px;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 0; }
body { font-family: var(--font); font-stretch: 100%; color: var(--white); background: var(--dark); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
address { font-style: normal; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 60; transition: background .35s, height .35s; }
.nav.scrolled { background: rgba(20,20,20,.88); backdrop-filter: blur(12px); height: 64px; }
.nav.menu-open { backdrop-filter: none; background: transparent; }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad); }
.brand img { height: 30px; width: auto; transition: height .35s; }
.nav.scrolled .brand img { height: 24px; }
.nav-links { display: flex; gap: 34px; }
.nav-links a { font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-stretch: 115%; position: relative; padding: 6px 0; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 8px; right: 8px; height: 2px; background: #fff; transition: transform .3s var(--ease); }
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Display type ---------- */
.display { font-weight: 900; font-style: italic; font-stretch: 125%; text-transform: uppercase; line-height: .98; letter-spacing: -.005em; font-size: clamp(36px, 6vw, 88px); }
.display.huge { font-size: clamp(56px, 12vw, 180px); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; min-height: 620px; overflow: hidden; background: var(--blue); }
.hero-media { position: absolute; inset: 0; clip-path: polygon(0 0, 62% 0, 50% 100%, 0 100%); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; transform: scale(1.08); animation: heroZoom 9s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-panel { position: absolute; inset: 0; background: var(--blue); clip-path: polygon(62% 0, 100% 0, 100% 100%, 50% 100%); }
.hero-content { position: absolute; inset: 0; padding: 0 var(--pad); display: flex; flex-direction: column; justify-content: center; }
.hero-title { font-weight: 900; font-style: italic; font-stretch: 125%; text-transform: uppercase; line-height: .95; font-size: clamp(44px, 9vw, 150px); letter-spacing: -.01em; display: flex; flex-direction: column; }
.hero-title .type { display: block; white-space: nowrap; min-height: 1em; }
.hero-title .type:nth-child(2) { padding-left: 1.1em; }
.hero-title .type:not(.started) { visibility: hidden; animation: type-fallback 0s 6s forwards; }
@keyframes type-fallback { to { visibility: visible; } }
.js .hero-title .type.typing::after { content: '_'; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { position: absolute; right: var(--pad); bottom: 120px; max-width: min(400px, 34vw); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.55; color: rgba(255,255,255,.92); }
.js .hero-sub { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease) 2.1s, transform .9s var(--ease) 2.1s; }
.js .loaded .hero-sub, .js body.loaded .hero-sub { opacity: 1; transform: none; }
.scroll-cue { position: absolute; bottom: 32px; right: var(--pad); display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-stretch: 115%; }
.scroll-cue i { width: 1px; height: 46px; background: rgba(255,255,255,.4); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; left: 0; top: -50%; width: 1px; height: 50%; background: #fff; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }

/* ---------- Statement ---------- */
.statement { background: var(--dark); padding: clamp(96px, 16vw, 220px) var(--pad); }
.statement-text { max-width: 980px; margin: 0 auto; font-size: clamp(24px, 3.2vw, 44px); line-height: 1.28; font-weight: 400; font-stretch: 112%; }
.js .reveal-words .w { opacity: .14; transition: opacity .5s; }
.js .reveal-words .w.on { opacity: 1; }

/* ---------- Blocks ---------- */
.block { padding: clamp(80px, 11vw, 160px) 0; position: relative; }
.block-blue { background: var(--blue); }
.block-dark { background: var(--dark); }
.label { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.35); padding-top: 14px; margin-bottom: clamp(40px, 6vw, 80px); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-stretch: 115%; font-weight: 500; }

.about-head, .tech-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; margin-bottom: clamp(64px, 9vw, 130px); }
.tech-head { grid-template-columns: 1fr 1.15fr; }
.slant-img { overflow: hidden; clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); aspect-ratio: 4 / 3; }
.slant-img img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.slant-left { clip-path: polygon(0 0, 88% 0, 100% 100%, 12% 100%); }

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.col h3 { font-weight: 800; font-style: italic; font-stretch: 125%; text-transform: uppercase; font-size: clamp(19px, 1.8vw, 26px); line-height: 1.1; margin-bottom: 14px; }
.col p { font-size: 15px; color: rgba(255,255,255,.85); max-width: 38ch; }
.cols .col:nth-child(2) { margin-top: 48px; }
.cols .col:nth-child(3) { margin-top: 96px; }

.lead { font-size: clamp(16px, 1.3vw, 19px); color: rgba(255,255,255,.82); max-width: 52ch; margin-top: 28px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(255,255,255,.18); margin-bottom: clamp(64px, 9vw, 120px); }
.stat { padding: 40px 28px 40px 0; display: flex; flex-direction: column; gap: 14px; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.18); padding-left: 28px; }
.stat-num { font-weight: 900; font-style: italic; font-stretch: 125%; font-size: clamp(44px, 5.5vw, 84px); line-height: 1; color: #4d8dff; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14px; color: rgba(255,255,255,.7); max-width: 30ch; }
.note { margin-top: clamp(56px, 7vw, 96px); font-size: 13px; color: rgba(255,255,255,.5); max-width: 760px; }

/* ---------- Contact ---------- */
.contact .lead { color: rgba(255,255,255,.9); }
.mail { display: inline-flex; align-items: center; gap: 18px; margin-top: 48px; font-weight: 800; font-style: italic; font-stretch: 120%; font-size: clamp(22px, 3.6vw, 52px); border-bottom: 3px solid #fff; padding-bottom: 6px; word-break: break-all; }
.mail i { font-style: normal; transition: transform .35s var(--ease); }
.mail:hover i { transform: translateX(10px); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 40px; margin-top: clamp(64px, 8vw, 110px); font-size: 16px; }
.mini { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-stretch: 115%; opacity: .7; margin-bottom: 10px; }
.contact-grid a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); padding: 36px 0; font-size: 13px; color: rgba(255,255,255,.6); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer img { height: 22px; width: auto; }
.footer a:hover { color: #fff; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .slant-img.reveal { transform: translateY(60px); clip-path: polygon(12% 100%, 100% 100%, 88% 100%, 0 100%); transition: clip-path 1.2s var(--ease), opacity .6s, transform 1.2s var(--ease); }
.js .slant-img.reveal.in { clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); transform: none; }
.js .slant-left.reveal { clip-path: polygon(0 100%, 88% 100%, 100% 100%, 12% 100%); }
.js .slant-left.reveal.in { clip-path: polygon(0 0, 88% 0, 100% 100%, 12% 100%); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: -1; background: var(--blue); flex-direction: column; justify-content: center; padding: 0 var(--pad); gap: 8px; opacity: 0; pointer-events: none; transition: opacity .35s; }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: clamp(26px, 8.5vw, 40px); font-weight: 900; font-style: italic; font-stretch: 125%; letter-spacing: 0; }
  .nav-links a::after { display: none; }

  .hero-media { clip-path: polygon(0 0, 100% 0, 100% 46%, 0 62%); }
  .hero-panel { clip-path: polygon(0 62%, 100% 46%, 100% 100%, 0 100%); }
  .hero-content { justify-content: flex-end; padding-bottom: 96px; }
  .hero-title { font-size: clamp(30px, 9.6vw, 72px); }
  .hero-title .type:nth-child(2) { padding-left: 0; }
  .hero-sub { position: static; max-width: 420px; margin: 22px 0 0; }

  .about-head, .tech-head { grid-template-columns: 1fr; }
  .tech-head .slant-img { order: 2; }
  .cols, .stats { grid-template-columns: 1fr; }
  .cols .col:nth-child(n) { margin-top: 0; }
  .stat, .stat + .stat { border-left: 0; padding: 28px 0; }
  .stat + .stat { border-top: 1px solid rgba(255,255,255,.18); }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .mail { font-size: clamp(20px, 6.4vw, 30px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero-sub { opacity: 1; transform: none; }
  .js .reveal-words .w { opacity: 1; }
}

/* ---------- Justified body text ---------- */
.hero-sub, .statement-text, .col p, .lead, .stat-label, .note {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 9 4 4;
}
