:root {
  --accent: #0071e3;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --muted-2: #86868b;
  --tint: #f5f5f7;
  --line: #d2d2d7;
  --error: #b3261e;
  --success: #1d7a3f;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

section[id] { scroll-margin-top: 52px; }

input, select, textarea, button {
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
}
::placeholder { color: var(--muted-2); }

h1, h2, h3, p { margin: 0; }

.wrap {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Header ---------- */

#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

#site-header.scrolled,
#site-header.menu-open {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

#site-header.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}
.logo:hover { text-decoration: none; opacity: 0.75; }

.logo-text {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

#menu-toggle {
  background: none;
  border: 0;
  padding: 8px;
  margin: -8px;
  cursor: pointer;
  color: var(--ink);
  display: block;
}
#menu-toggle span {
  display: block;
  width: 17px;
  height: 1px;
  background: currentColor;
}
#menu-toggle span + span { margin-top: 5px; }

#site-nav {
  display: none;
  flex-direction: column;
  order: 3;
  flex-basis: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 0 -22px;
  padding: 8px 22px 28px;
  width: calc(100% + 44px);
}
#site-nav.open { display: flex; }

#site-nav a {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  text-decoration: none;
}
#site-nav a:not(.nav-cta):last-of-type { border-bottom: none; }

#site-nav .nav-cta {
  margin-top: 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  padding: 14px;
  border-radius: 980px;
  text-align: center;
  border-bottom: none;
  transition: background 0.2s ease;
}
#site-nav .nav-cta:hover { background: #0077ed; text-decoration: none; }

@media (min-width: 900px) {
  #menu-toggle { display: none; }

  #site-nav {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    order: 2;
    flex-basis: auto;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    border-top: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    gap: 28px;
  }

  #site-nav a {
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    border-bottom: none;
    color: var(--ink-soft);
  }
  #site-nav a:hover { color: var(--accent); text-decoration: none; }

  #site-nav .nav-cta {
    margin-top: 0;
    padding: 9px 20px;
    font-size: 14px;
  }
  #site-nav .nav-cta:hover { color: #fff; }
}

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

.btn {
  display: inline-block;
  font-size: 17px;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: 980px;
  text-decoration: none;
  transition: background 0.2s ease;
  text-align: center;
  cursor: pointer;
  border: 0;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #0077ed; }

.btn-secondary {
  color: var(--accent);
  border: 1px solid var(--accent);
  background: transparent;
  padding: 12px 25px;
}
.btn-secondary:hover { background: rgba(0, 113, 227, 0.06); }

.btn-block { width: 100%; }

.chev { font-weight: 400; }

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

.hero {
  background: #fff;
  padding: clamp(84px, 10vw, 132px) 0 clamp(56px, 6vw, 88px);
  text-align: center;
}

.hero .wrap {
  max-width: 900px;
}

.hero h1 {
  margin: 0 auto;
  max-width: 820px;
  font-size: clamp(40px, 6.4vw, 80px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero .lead {
  margin: 22px auto 0;
  max-width: 640px;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

@media (max-width: 899px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

.hero-diagram {
  margin: clamp(48px, 6vw, 76px) auto 0;
  max-width: 1100px;
  padding: 0 22px;
}
.hero-diagram svg { height: auto; display: block; overflow: visible; }

.tagline {
  margin: clamp(40px, 4vw, 56px) auto 0;
  max-width: 900px;
  padding: 0 22px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* hero SVG animation */
@keyframes demyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes demyFloatB { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes demyTrace { 0% { stroke-dashoffset: 1000; } 45% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1000; } }
@keyframes demyBar { 0%, 100% { transform: scaleX(0.35); } 50% { transform: scaleX(1); } }
@keyframes demyRing { 0% { transform: scale(0.6); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes demySpin { to { transform: rotate(360deg); } }
@keyframes demyBlink { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0.15; } }

.float-a { animation: demyFloat 10s ease-in-out infinite; }
.float-b { animation: demyFloatB 12s ease-in-out infinite; }
.trace { animation: demyTrace 4.4s cubic-bezier(.4, 0, .2, 1) infinite; }
.trace-slow { animation-duration: 6s; }
.bar { animation: demyBar 5s ease-in-out infinite; }
.bar-slow { animation-duration: 6s; }
.bar-slower { animation-duration: 7s; }
.ring { animation: demyRing 3s ease-out infinite; }
.spin { animation: demySpin 9s linear infinite; }
.blink { animation: demyBlink 1.1s steps(1) infinite; }

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

.section {
  background: #fff;
  padding: clamp(72px, 8vw, 116px) 0;
}
.section-tint { background: var(--tint); }
.section-dark { background: #000; color: var(--tint); }

.section h2 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-lead {
  margin: 18px 0 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.text-body {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
}
.text-muted {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.card-grid {
  display: grid;
  gap: 16px;
}
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; margin-top: clamp(32px, 3.5vw, 48px); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-top: clamp(32px, 3.5vw, 48px); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: clamp(28px, 3vw, 44px); margin-top: clamp(32px, 3.5vw, 48px); }

.card {
  border-radius: 18px;
  padding: 32px;
}
.card-plain {
  background: #fff;
  border-radius: 18px;
  padding: 30px;
}
.card-plain h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card-plain p { font-size: 15px; line-height: 1.6; color: var(--muted); }

.card-service {
  background: var(--tint);
  transition: transform 0.3s ease, background 0.3s ease;
}
.card-service:hover { transform: translateY(-3px); background: #eeeef1; }
.card-service .icon { width: 30px; height: 30px; margin-bottom: 20px; }
.card-service h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 8px; }
.card-service p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* About */

.about-grid {
  margin-top: clamp(28px, 3vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(24px, 3vw, 48px);
}

.pull-quote {
  margin: clamp(40px, 4vw, 60px) 0 0;
  max-width: 820px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Technologies */

.tech-card {
  background: #fff;
  padding: clamp(26px, 2.6vw, 34px);
  display: flex;
  flex-direction: column;
}
.tech-index {
  margin: 0 0 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}
.tech-card h3 { margin: 0 0 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.tech-card .text-muted { margin: 0 0 22px; font-size: 15.5px; }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tech-more {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid #ededf0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted-2);
}

/* Why */

.why-item {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.why-item h3 { margin: 0 0 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.why-item p { font-size: 16px; line-height: 1.6; color: var(--muted); }

/* Process */

.process-item {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.process-num {
  margin: 0 0 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--muted-2);
}
.process-item h3 { margin: 0 0 10px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.process-item p { font-size: 15.5px; line-height: 1.6; color: #a1a1a6; }

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(36px, 4vw, 64px);
  align-items: start;
}

.contact-info h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; }
.contact-info .section-lead { max-width: 460px; }

.contact-links {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-email { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.contact-links a:not(.contact-email) { font-size: 17px; }

.contact-note {
  margin: 28px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-2);
}

#contact-form {
  background: var(--tint);
  border-radius: 18px;
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.botcheck {
  display: none;
}

#contact-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#contact-form label > span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

#contact-form input,
#contact-form select,
#contact-form textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 16px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}
#contact-form input.invalid,
#contact-form textarea.invalid {
  border-color: #e0736c;
}
#contact-form textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.form-message {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}
.form-error { color: var(--error); }
.form-success { color: var(--success); }

/* Footer */

footer {
  background: var(--tint);
  padding: 56px 0 56px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}
.footer-logo span {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.footer-tagline {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-email {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.footer-email:hover { color: var(--accent); text-decoration: none; }

.footer-nav-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin-bottom: 4px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
footer nav a {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
}
footer nav a:hover { color: var(--accent); text-decoration: none; }

.copyright {
  margin: 36px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted-2);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float-a, .float-b, .trace, .bar, .ring, .spin, .blink {
    animation: none;
  }
}
