:root {
  color-scheme: dark;
  --night: #0a1122;
  --ice: #f6f8fc;
  --cyan: #3fdbfe;
  --blue: #3f6afe;
  --muted: #b9c7db;
  --line: #2a3c5b;
  --gutter: clamp(27px, 6.4vw, 105px);
  font-family: "Avenir Next", Arial, sans-serif;
  color: var(--ice);
  background: var(--night);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
section[id] { scroll-margin-top: 24px; }
.wrap { width: min(1280px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip { position: fixed; z-index: 4; top: 12px; left: 12px; padding: 12px; background: var(--ice); color: var(--night); clip-path: inset(50%); }
.skip:focus { clip-path: none; }

#flow-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.masthead, footer { position: relative; z-index: 3; background: var(--night); }
.masthead { border-bottom: 1px solid #2c3a55b0; }
.header-inner, .footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; min-height: 78px; align-items: center; }
.brand { display: inline-flex; justify-self: start; padding: 8px 0; }
.brand img { width: 166px; height: auto; }
.header-inner nav, .footer-inner nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 clamp(15px, 2.5vw, 36px); }
nav a, .text-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 600; }
nav a:hover, .text-link:hover { color: var(--cyan); }
.header-action, .footer-inner > .text-link { justify-self: end; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 6px; white-space: nowrap; font-size: 14px; font-weight: 650; }
.button.outline { border-color: #526986; }
.button.outline:hover { color: var(--cyan); border-color: var(--cyan); }
.button.primary { min-height: 51px; padding-inline: 20px; background: var(--cyan); color: #061526; font-weight: 750; }
.button.primary:hover { background: #a5edff; }
.text-link { gap: 9px; }
.text-link span { color: var(--cyan); }

.hero { position: relative; overflow: hidden; background: #0a1122; border-bottom: 1px solid var(--line); }
.hero-optics {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg,#0a1122,transparent 21%,transparent 83%,#0a1122af),
              linear-gradient(90deg,#0a1122 3%,#0a1122e8 32%,#0a11223a 61%,transparent),
              url("assets/optica.webp") right 50% / cover no-repeat;
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); align-items: center; gap: clamp(24px, 4.5vw, 65px); min-height: clamp(560px, 51vw, 730px); padding-block: 72px 105px; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { max-width: 710px; font-size: clamp(47px, 5.08vw, 77px); font-weight: 700; line-height: 1.02; letter-spacing: -.055em; text-wrap: pretty; }
.hero h1 span { display: block; color: var(--cyan); }
.hero-copy p { max-width: 465px; margin-top: 24px; color: var(--muted); font-size: clamp(17px, 1.48vw, 21px); line-height: 1.53; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 27px; }
.actions .text-link { border-bottom: 1px solid #405b79; }
.hero-stage { position: relative; padding: 89px 10px 24px 9px; }
.core {
  position: absolute; top: 0; left: 27%; width: 74px; height: 74px;
  display: grid; place-items: center; padding: 8px; border: 1px solid #72cff47d; border-radius: 20px;
  background: linear-gradient(150deg,#112b4a,#0a172c); box-shadow: 0 0 37px #3fdbfe40, inset 0 0 15px #3fdbfe21;
}
.core img { width: 57px; height: auto; }
.demo {
  position: relative; z-index: 3; border: 1px solid #76a6d785; border-radius: 12px;
  background: linear-gradient(135deg,#162942f5,#0b1529fa 62%);
  box-shadow: 0 22px 70px #020714d9, 0 0 35px #3f6afe29, inset 0 1px #b8ecff42;
  transform: perspective(1500px) rotateY(-8deg) rotateX(4deg);
}
.port { position: absolute; width: 8px; height: 8px; border: 1px solid #99e5ff; border-radius: 50%; background: #122743; box-shadow: 0 0 10px #3fdbfe97; }
.port-in { left: -5px; top: 70px; }
.port-out { right: -5px; bottom: 29px; }
.demo-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 19px; border-bottom: 1px solid #34496a; }
.demo-header strong { font-size: 14px; font-weight: 650; }
.demo-header > span { border: 1px solid #3a5b7b; border-radius: 4px; padding: 3px 7px; color: #b5cde8; font-size: 10px; }
.demo-body { padding: clamp(15px, 2.1vw, 27px); }
.demo-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.demo-caption h2 { margin: 0; font-size: clamp(18px, 1.85vw, 26px); line-height: 1.13; letter-spacing: -.035em; }
.demo-caption p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.demo-mark { padding: 7px 8px; border: 1px solid #4787ac; border-radius: 5px; color: var(--cyan); font: 10px Menlo, monospace; }
.demo-flow, .method-steps, .scenario-flow { list-style: none; padding: 0; }
.demo-flow { display: grid; gap: 6px; }
.demo-flow li { display: grid; grid-template-columns: 24px 1fr 8px; gap: 8px; align-items: center; padding: 10px 11px; min-height: 41px; border: 1px solid #263c5b; border-radius: 5px; background: #0e1d33; color: var(--muted); transition: background .35s, border-color .35s, color .35s; }
.demo-flow li span { color: #a6b9d5; font: 10px Menlo, monospace; }
.demo-flow li strong { font-size: 12px; font-weight: 650; }
.demo-flow li i, .demo-status i { width: 7px; height: 7px; border-radius: 50%; background: #506585; }
.demo-flow li.active { background: #11344c; border-color: #3e8aab; color: var(--ice); }
.demo-flow li.done i, .demo-flow li.active i, .demo-status i { background: var(--cyan); box-shadow: 0 0 10px #3fdbfe77; }
.demo-status { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: #bcecff; font-size: 11px; }

.section { position: relative; padding-block: clamp(64px, 7.4vw, 106px); }
.rail-content { position: relative; z-index: 2; }
.section-heading h2, .contact h2 { max-width: 820px; font-size: clamp(35px, 4.05vw, 59px); line-height: 1.07; letter-spacing: -.048em; text-wrap: pretty; }
.section-heading p { max-width: 545px; margin-top: 12px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.section-heading h2::before { content: ""; display: block; width: 25px; height: 3px; margin-bottom: 13px; background: var(--blue); transform: skewX(-35deg); }
h3 { font-size: 23px; font-weight: 700; line-height: 1.25; letter-spacing: -.023em; }
.services { background: #0a1122; }
.service-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin-top: 35px; border-block: 1px solid var(--line); }
.service-list article { padding: 24px clamp(14px, 2.5vw, 34px) 26px; }
.service-list article:first-child { padding-left: 0; }
.service-list article:last-child { padding-right: 0; }
.service-list article + article { border-left: 1px solid var(--line); }
.service-icon { display: block; color: var(--cyan); font-size: 30px; line-height: 1; margin-bottom: 12px; }
.service-list p, .method-steps p { margin-top: 9px; color: var(--muted); font-size: 15px; line-height: 1.56; }

.applications { color-scheme: light; color: #0a1122; background: var(--ice); }
.applications .section-heading p { color: #3b526d; }
.applications :focus-visible { outline-color: #214ccb; }
.application-panel { margin-top: 31px; border: 1px solid #bdcce1; border-radius: 9px; background: #ffffff; box-shadow: 0 10px 32px #253d6410; }
.scenario-buttons { display: flex; flex-wrap: wrap; gap: 1px; overflow: hidden; border-radius: 8px 8px 0 0; border-bottom: 1px solid #bfcee2; background: #cfdaeb; }
.scenario-buttons button { flex: 1 1 18%; min-height: 51px; border: 0; padding: 10px 12px; background: #fff; color: #233b57; cursor: pointer; font-size: 14px; font-weight: 700; }
.scenario-buttons button[aria-pressed="true"] { background: #e6effd; color: #163fa5; box-shadow: inset 0 -2px #3f6afe; }
.scenario-buttons button:hover { background: #eff5ff; }
.scenario-buttons button:focus-visible { position: relative; z-index: 1; outline-offset: -4px; }
.scenario-content { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); align-items: center; gap: 24px; padding: clamp(22px, 3.2vw, 45px); }
.scenario-content h3 { font-size: clamp(21px, 2.05vw, 29px); }
.scenario-content p { max-width: 380px; margin-top: 7px; color: #354d6b; font-size: 15px; line-height: 1.57; }
.scenario-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; align-items: center; }
.scenario-flow li { position: relative; display: grid; place-items: center; min-height: 67px; padding: 8px; border: 1px solid #b1c8ed; border-radius: 5px; background: #f1f6ff; color: #173d8f; font-size: 12px; font-weight: 700; text-align: center; }
.scenario-flow li + li::before { content: "→"; position: absolute; right: 100%; width: 18px; color: #2a53bb; }

.method { background: #0a1122; border-bottom: 1px solid var(--line); }
.method-grid { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(0,.96fr); gap: clamp(25px, 5vw, 72px); align-items: center; margin-top: 19px; }
.process-art { position: relative; aspect-ratio: 1.5; background: radial-gradient(ellipse at center,#172941,transparent 70%); }
.process-art img, .process-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.process-art img { object-fit: contain; }
.process-art canvas { visibility: hidden; }
.process-art.is-rendering img { visibility: hidden; }
.process-art.is-rendering canvas { visibility: visible; }
.method-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding-block: 15px; border-top: 1px solid var(--line); }
.method-steps li:last-child { border-bottom: 1px solid var(--line); }
.method-steps li > span { padding-top: 5px; color: var(--cyan); font: 13px Menlo, monospace; }
.method-steps p { margin-top: 5px; }

.faq { background: #0d1729; }
.split { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); align-items: start; gap: clamp(24px, 5.2vw, 72px); }
.questions { border-top: 1px solid #3c5272; }
.questions details { border-bottom: 1px solid #3c5272; }
.questions summary { display: flex; justify-content: space-between; align-items: center; gap: 13px; min-height: 48px; padding: 13px 0; list-style: none; cursor: pointer; font-size: 16px; font-weight: 650; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; color: var(--cyan); }
.questions details[open] summary::after { content: "−"; }
.questions p { max-width: 560px; padding: 0 25px 14px 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.contact { background: linear-gradient(110deg,#173e9a,#254eca 75%); }
.contact-inner { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); align-items: center; gap: clamp(28px, 5.5vw, 76px); }
.contact .section-heading h2::before { background: var(--cyan); }
.contact .section-heading p { color: #e3ecff; }
.whatsapp-link.button { margin-top: 22px; min-height: 48px; border-color: #aac3ff; background: #11275b; }
.whatsapp-link svg { flex: none; color: #6ee8a4; }
.request-form {
  display: grid; gap: 16px; padding: clamp(19px, 3vw, 32px); border: 1px solid #7c9be0; border-radius: 12px;
  background: #0c1831; box-shadow: 0 18px 46px #0a112235;
}
.request-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.request-form label { display: grid; gap: 7px; min-width: 0; font-size: 14px; font-weight: 650; }
.request-form label small { color: var(--muted); font-size: inherit; font-weight: 400; }
.request-form input:not([type="hidden"]), .request-form textarea {
  width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #6881a8; border-radius: 6px;
  background: #142541; color: var(--ice); font: inherit; font-size: 16px; font-weight: 400;
}
.request-form textarea { resize: vertical; }
.request-form .button { justify-self: start; white-space: normal; text-align: left; cursor: pointer; }
.request-form p { color: var(--muted); font-size: 13px; line-height: 1.4; }
footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 92px; padding-block: 12px; }

.motion .enter { opacity: .53; transform: translateY(20px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.65,.3,1); }
.motion .enter.shown, .motion .enter:focus-within { opacity: 1; transform: none; }

@media (max-width: 940px) {
  .hero-inner { gap: 25px; }
  .header-inner { gap: 12px; }
  .header-inner nav { gap: 0 13px; }
  .header-inner nav a, .header-action { font-size: 13px; }
  .header-action { padding-inline: 10px; }
  .demo-header { padding-inline: 13px; }
  .scenario-flow { gap: 12px; }
  .scenario-flow li + li::before { width: 12px; }
}
@media (max-width: 740px) {
  .header-inner, .footer-inner { grid-template-columns: 1fr auto; gap: 0 10px; padding-block: 5px; min-height: 0; }
  .header-inner nav, .footer-inner nav { grid-area: 2 / 1 / auto / -1; border-top: 1px solid var(--line); }
  .brand img { width: 164px; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; gap: 24px; padding-block: 49px 55px; }
  .hero h1 { font-size: clamp(39px, 8.4vw, 62px); }
  .hero-copy p { margin-top: 17px; font-size: 16px; }
  .actions { margin-top: 20px; }
  .hero-stage { padding-top: 70px; padding-inline: 0; padding-bottom: 9px; }
  .core { left: 24%; width: 54px; height: 54px; padding: 5px; border-radius: 14px; }
  .demo { transform: none; }
  .hero-optics { background-position: center,center,74% bottom; }
  .service-list, .scenario-content, .method-grid, .split, .contact-inner { grid-template-columns: 1fr; }
  .service-list article, .service-list article:first-child, .service-list article:last-child { padding: 21px 0; }
  .service-list article + article { border-left: 0; border-top: 1px solid var(--line); }
  .scenario-buttons button { flex-basis: 30%; font-size: 12px; padding: 8px 6px; }
  .scenario-flow li { padding-inline: 5px; }
  .method-grid { gap: 11px; }
  .process-art { aspect-ratio: 1.67; }
  .request-fields { grid-template-columns: 1fr; }
}
@media (max-width: 375px) {
  :root { --gutter: 20px; }
  .brand img { width: 157px; }
  .header-action { font-size: 11px; gap: 5px; padding-inline: 7px; }
  .hero h1 { font-size: 35px; }
  .hero h1 span { display: inline; }
  .demo-header strong { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #flow-canvas { display: none; }
  .motion .enter { opacity: 1; transform: none; transition: none; }
  .demo-flow li { transition: none; }
  .process-art.is-rendering img { visibility: visible; }
  .process-art.is-rendering canvas { visibility: hidden; }
}
