/* NordOst - light product-studio theme, single locked mode.
   Radius: pill for buttons/tags, 20px for cards, 14px for images. One accent: azure. */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/onest-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/onest-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2212;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jbmono-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jbmono-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2212;
}

:root {
  --paper: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #0d1a2b;
  --muted: #55647a;
  --line: rgba(13, 26, 43, 0.10);
  --accent: #1550d0;
  --accent-hover: #1140ab;
  --accent-soft: rgba(21, 80, 208, 0.08);
  --on-accent: #ffffff;
  --font-sans: "Onest", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --nav-h: 72px;
  --r-card: 20px;
  --r-img: 14px;
  --shadow-sm: 0 1px 2px rgba(13, 26, 43, 0.04), 0 8px 24px rgba(13, 26, 43, 0.05);
  --shadow-md: 0 2px 6px rgba(13, 26, 43, 0.06), 0 18px 48px rgba(13, 26, 43, 0.10);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.section-contact :focus-visible { outline-color: #ffffff; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 60;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-weight: 600;
}
.skip-link:focus-visible { left: 16px; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.14; }

.top-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(244, 246, 249, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
}
.brand-mark { width: 25px; height: 25px; color: var(--accent); flex: none; }
.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.burger svg { width: 20px; height: 20px; }
.burger .icon-close { display: none; }
body.menu-open .burger .icon-open { display: none; }
body.menu-open .burger .icon-close { display: block; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--paper);
  display: none;
  padding: calc(var(--nav-h) + 28px) 24px 32px;
  overflow-y: auto;
}
body.menu-open .mobile-menu { display: block; }
body.menu-open { overflow: hidden; }
.mobile-menu nav { display: grid; gap: 4px; }
.mobile-menu nav a {
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 700;
  padding: 11px 0;
}
.mobile-menu nav .btn { margin-top: 18px; justify-self: start; font-size: 1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-arrow { width: 16px; height: 16px; flex: none; }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 18px rgba(21, 80, 208, 0.22);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.btn-ghost:hover { border-color: rgba(13, 26, 43, 0.24); }
.btn-lg { padding: 16px 32px; font-size: 1.04rem; }
.nav-cta { padding: 11px 22px; font-size: 0.93rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 72%);
}
#wind {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: var(--nav-h);
}
.hero h1 { display: grid; gap: 6px; }
.wordmark {
  font-size: clamp(3rem, 8.2vw, 7rem);
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
}
.wordmark-accent { color: var(--accent); }
.claim {
  font-size: clamp(1.5rem, 3.1vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-sub {
  margin-top: 20px;
  max-width: 48ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.3vw, 1.16rem);
}
.hero-cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.br-lg { display: none; }
@media (min-width: 1024px) { .br-lg { display: inline; } }
@media (max-height: 430px) and (min-width: 480px) {
  .hero-inner { padding-top: calc(var(--nav-h) + 8px); padding-bottom: 16px; }
  .wordmark { font-size: clamp(2.4rem, 6vw, 3.4rem); }
  .claim { font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
  .hero-sub { margin-top: 12px; }
  .hero-cta { margin-top: 18px; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.section-alt { background: var(--surface-2); }

.section-head { margin-bottom: clamp(2rem, 3.6vw, 3rem); max-width: 62ch; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}
.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 58ch;
}

/* ---------- Cases ---------- */

.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.case:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.case-shot {
  border-radius: var(--r-img);
  overflow: hidden;
  background: var(--surface-2);
}
.case-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s var(--ease);
}
.case:hover .case-shot img { transform: scale(1.03); }
.case-body { padding: 20px 14px 10px; }
.case-body h3 { font-size: 1.3rem; }
.case-lede {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.98rem;
}
.case-link { margin-top: 12px; font-size: 0.94rem; font-weight: 600; }
.case-link a { border-bottom: 1px solid rgba(21, 80, 208, 0.3); }

.case-lead {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.case-lead .case-body { padding: 20px 26px 20px 20px; }
.case-lead h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.case-lead .case-lede { font-size: 1.02rem; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.case-grid .case:nth-child(1) { grid-column: span 2; }
.case-grid .case:nth-child(1) .case-shot img { aspect-ratio: 16 / 8.4; }
.case-grid .case { display: flex; flex-direction: column; }
.case-grid .case-shot { flex: 1 1 auto; }
.case-grid .case-shot img { height: 100%; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}
.tags li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--paper);
}

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.service {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.service-icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
  margin-bottom: 16px;
}
.service h3 { font-size: 1.24rem; }
.service p { margin-top: 9px; color: var(--muted); font-size: 0.98rem; }
.service-list { margin-top: 18px; display: grid; gap: 9px; }
.service-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 0.95rem;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--accent);
}

/* ---------- Approach ---------- */

.approach { display: grid; gap: 0; }
.approach li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.approach li:last-child { border-bottom: 1px solid var(--line); }
.approach-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}
.approach h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
.approach p { margin-top: 10px; color: var(--muted); max-width: 62ch; }

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--accent);
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  top: -13px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { font-size: 1.1rem; }
.step p { margin-top: 8px; color: var(--muted); font-size: 0.94rem; }

/* ---------- Stack ---------- */

.stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.stack-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.stack-col h3 { font-size: 1.06rem; }
.stack-col ul { margin-top: 16px; display: grid; gap: 11px; }
.stack-col li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--muted);
}
.stack-col img { width: 20px; height: 20px; filter: grayscale(1) opacity(0.72); }

/* ---------- Contact ---------- */

.section-contact {
  background: var(--ink);
  color: #eef2f7;
}
.contact-inner { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.section-contact h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  color: #ffffff;
}
.contact-sub {
  margin-top: 14px;
  color: #a9b7c9;
  max-width: 46ch;
  font-size: 1.05rem;
}
.contact-main .btn { margin-top: 30px; }
.section-contact .btn-primary {
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}
.section-contact .btn-primary:hover { background: #dfe7f3; }
.contact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 32px;
}
.contact-list li { display: grid; gap: 4px; justify-items: start; }
.contact-list svg { width: 22px; height: 22px; color: #7fa8f0; margin-bottom: 8px; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #93a3b8;
}
.contact-list a {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.02rem;
  transition: color 0.2s;
}
.contact-list a:hover { color: #9dc0ff; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 28px 0; background: var(--paper); }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer .brand { font-size: 1rem; }
.footer .brand-mark { width: 21px; height: 21px; }
.footer-copy { color: var(--muted); font-size: 0.9rem; margin-left: auto; }
.footer-links { display: flex; gap: 18px; }
.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--ink); }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .case, .service, .case-shot img { transition: none; }
  .case:hover, .service:hover { transform: none; }
  .case:hover .case-shot img { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: inline-flex; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid .case:nth-child(1) { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 26px 20px; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  .container, .nav-inner { padding: 0 16px; }
  .hero-inner { padding-top: calc(var(--nav-h) + 8px); }
  .case-lead { grid-template-columns: 1fr; }
  .case-lead .case-body { padding: 20px 12px 8px; }
  .case-grid { grid-template-columns: 1fr; gap: 16px; }
  .case-grid .case:nth-child(1) { grid-column: 1 / -1; }
  .case-grid .case:nth-child(1) .case-shot img { aspect-ratio: 16 / 10; }
  .services { grid-template-columns: 1fr; gap: 16px; }
  .approach li { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .stack { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { justify-content: space-between; }
  .footer-copy { margin-left: 0; order: 3; width: 100%; }
}
