@font-face {
  font-family: Barlow Condensed;
  src: url("assets/barlow-condensed-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Rethink Sans;
  src: url("assets/rethink-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #111418;
  --paper: #fff;
  --surface: #f3f5f7;
  --red: #fb563f;
  --red-dark: #be311f;
  --mute-dark: #b9c0ca;
  --mute-light: #454e59;
  --rule: #d7dce2;
  --control-border: #7d858e;
  --dark-rule: #343b45;
  --dark-rule-strong: #687382;
  --sans: "Rethink Sans", system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --gutter: clamp(20px, 5.5vw, 100px);
  --header-clearance: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-clearance); }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 1rem/1.5 var(--sans); }
p, h1, h2, h3 { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { color: inherit; font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }
.paper :focus-visible { outline-color: var(--red-dark); }
:is(a, button, summary, input, select, textarea) { scroll-margin-block: 9px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), 1500px); margin-inline: auto; }
.caption { font-size: .75rem; font-weight: 720; letter-spacing: .14em; text-transform: uppercase; }
.skip-link { position: absolute; z-index: 6; top: 10px; left: var(--gutter); padding: 10px 16px; transform: translateY(-200%); color: var(--ink); background: var(--paper); }
.skip-link:focus { transform: translateY(0); }

.header { position: sticky; z-index: 5; top: 0; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--rule); }
.header :focus-visible { outline-color: var(--red-dark); }
.header-inner { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { flex: none; }
.brand img { width: 132px; height: auto; }
.header nav { display: flex; align-items: center; gap: clamp(13px, 3.1vw, 50px); flex-wrap: wrap; }
.header nav a { display: flex; align-items: center; min-height: 44px; font-size: .94rem; font-weight: 600; text-decoration: none; }
.header nav a:hover { color: var(--red-dark); }
.footer a:hover { color: var(--red); }
.header .nav-project { border: 1px solid var(--ink); padding-inline: 15px; background: var(--ink); color: var(--paper); }
.header .nav-project:hover { color: var(--ink); background: var(--red); border-color: var(--red); }
.menu-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 7px 12px; border: 1px solid var(--control-border); background: var(--paper); color: var(--ink); font-size: .87rem; font-weight: 720; cursor: pointer; }
.menu-toggle span { position: relative; width: 13px; height: 13px; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; inset: 6px 0 auto; height: 1.5px; background: currentColor; transform: translateY(-3px); }
.menu-toggle span::after { transform: translateY(3px); }
.menu-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); }

.hero { position: relative; overflow: clip; }
.hero-inner {
  min-height: clamp(570px, 46vw, 785px);
  display: grid;
  align-items: center;
  position: relative;
  padding-block: 46px 58px;
}
.hero-copy { position: relative; z-index: 1; width: min(55%, 690px); }
.hero-specialties { margin-bottom: 17px; color: var(--mute-dark); font-size: .78rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
h1 {
  font-family: var(--display);
  font-size: clamp(3.5rem, 7.1vw, 8.2rem);
  line-height: .87;
  letter-spacing: -.026em;
  font-weight: 700;
}
h1 span { display: block; animation: arrive .72s ease both; }
h1 span:nth-child(2) { animation-delay: .08s; color: var(--red); }
@keyframes arrive {
  from { opacity: .58; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-lead { max-width: 43ch; margin-top: clamp(18px, 2.25vw, 32px); color: var(--mute-dark); font-size: clamp(1rem, 1.32vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px 17px; margin-top: 23px; }
.hero-primary, .hero-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 720;
}
.hero-primary { padding-inline: 14px; background: var(--red); color: var(--ink); }
.hero-primary:hover { background: var(--paper); }
.hero-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-primary span, .hero-link span { font-size: 1.17rem; }

.motion-stage { position: absolute; inset: -10px calc(-1 * var(--gutter)) 0 37%; }
.motion-stage canvas { display: block; width: 100%; height: 100%; }
.motion-stage canvas:not([data-motion-ready="true"]) { visibility: hidden; }
.hero-poster { position: absolute; top: 54%; left: 56%; width: 82%; max-height: 80%; object-fit: contain; transform: translate(-50%, -50%); }
.motion-stage canvas[data-motion-ready="true"] + .hero-poster { display: none; }
.motion-caption { position: absolute; top: 7%; right: var(--gutter); color: var(--mute-dark); font-size: .67rem; font-weight: 660; letter-spacing: .07em; text-transform: uppercase; }
.motion-tools {
  position: absolute;
  z-index: 2;
  bottom: 19px;
  right: var(--gutter);
  display: flex;
  gap: 16px;
  align-items: center;
}
.motion-button, .motion-accent {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 7px 10px;
  min-height: 44px;
  border: none;
  background: var(--ink);
  font-size: .8rem;
  color: var(--mute-dark);
  cursor: pointer;
}
.motion-button:hover { color: var(--paper); }
.motion-accent { padding-inline: 13px; background: var(--paper); color: var(--ink); font-weight: 740; }
.motion-accent:hover { background: var(--red); }
.motion-icon { display: block; width: 9px; height: 11px; border-inline: 2px solid currentColor; }
[data-motion-toggle][data-paused="true"] .motion-icon { width: 0; height: 0; border: solid transparent; border-width: 5px 0 5px 8px; border-left-color: currentColor; }
.motion-signal { width: 16px; height: 11px; background: currentColor; clip-path: polygon(0 43%, 23% 43%, 36% 0, 46% 0, 61% 69%, 70% 43%, 100% 43%, 100% 57%, 77% 57%, 65% 100%, 55% 100%, 40% 31%, 31% 57%, 0 57%); }

.paper { background: var(--paper); color: var(--ink); }
.services { padding-block: clamp(58px, 8vw, 120px); border-top: 1px solid var(--rule); }
.service-intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: clamp(24px, 3.5vw, 48px); }
.service-intro .caption { color: var(--red-dark); margin-bottom: 9px; }
h2 { font-family: var(--display); font-weight: 700; line-height: .9; font-size: clamp(3.5rem, 6.9vw, 7.4rem); letter-spacing: -.015em; }
.services-motion {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--mute-light);
  font-size: .84rem;
  cursor: pointer;
}
.services-motion:hover { border-color: var(--ink); color: var(--ink); }
.service-index { display: flex; flex-wrap: wrap; gap: 2px 22px; margin-bottom: 8px; border-block: 1px solid var(--rule); }
.service-index a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--mute-light); font-size: .88rem; font-weight: 660; text-decoration: none; }
.service-index a span { color: var(--red-dark); }
.service-index a:hover { color: var(--red-dark); }
.service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding-block: clamp(28px, 5.8vw, 86px); }
.service + .service { border-top: 1px solid var(--rule); }
.service:nth-child(even) .service-visual { order: 1; }
.service h3 { font: 700 clamp(2.25rem, 4vw, 4.5rem)/.98 var(--display); letter-spacing: -.012em; text-wrap: balance; }
.service-lead { max-width: 57ch; margin-block: 12px 20px; color: var(--mute-light); font-size: clamp(1rem, 1.2vw, 1.15rem); }
.service-data { margin: 0; border-top: 1px solid var(--rule); }
.service-data > div { display: grid; grid-template-columns: minmax(0, .61fr) minmax(0, 1fr); gap: 4px 13px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.service-data dt { font-weight: 740; }
.service-data dd { margin: 0; color: var(--mute-light); }
.service-output { margin-block: 18px; padding: 5px 0 5px 12px; border-left: 2px solid var(--red); color: var(--mute-light); font-size: .91rem; line-height: 1.5; }
.service-output strong { display: block; margin-bottom: 3px; color: var(--ink); }
.service-detail { margin-top: 12px; }
.service-detail summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 9px 13px; border: 1px solid var(--rule); font-weight: 690; cursor: pointer; list-style: none; }
.service-detail summary::-webkit-details-marker { display: none; }
.service-detail summary::after { content: "+"; flex: none; color: var(--red-dark); font-size: 1.3rem; font-weight: 400; line-height: 1; }
.service-detail[open] summary::after { content: "−"; }
.service-detail summary:hover { border-color: var(--ink); }
.service-detail p { padding: 13px; background: var(--surface); color: var(--mute-light); }
.service-brief { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; margin: 4px 0 0; color: var(--red-dark); font-size: .89rem; font-weight: 690; text-underline-offset: 4px; }
.service-brief:hover { color: var(--ink); }
.service-detail[open] p { animation: panel-in .24s ease both; }
.scene-credit { margin-top: 23px; color: var(--mute-light); font-size: .81rem; }

.service-visual { margin: 0; position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 16 / 11; background: var(--ink); }
.service-visual img { width: 100%; height: 100%; object-fit: cover; object-position: var(--scene-focus, 50% 50%); }
.scene-camera, .service-visual::after { position: absolute; pointer-events: none; animation-play-state: paused; }
.scene-camera { inset: 0; animation-name: var(--scene-move); animation-duration: var(--scene-time); animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; }
.service-visual::after {
  content: "";
  inset: -15% -55%;
  mix-blend-mode: screen;
  background: linear-gradient(117deg, transparent 29%, var(--scene-light) 49%, transparent 66%);
  animation: light-pass var(--scene-time) ease-in-out infinite alternate paused;
}
:root[data-motion-paused="false"] .service-visual[data-in-view="true"] .scene-camera,
:root[data-motion-paused="false"] .service-visual[data-in-view="true"]::after { animation-play-state: running; }
.scene-board { --scene-move: board-dolly; --scene-time: 5.4s; --scene-light: #fa8b5529; }
.scene-app { --scene-move: app-slide; --scene-time: 6.3s; --scene-light: #e0ecff20; }
.scene-iot { --scene-move: gateway-rise; --scene-time: 5.8s; --scene-light: #ffa96f27; }
.scene-ai { --scene-move: tower-push; --scene-time: 6.8s; --scene-light: #fb563f34; }
@keyframes board-dolly { from { transform: scale(1.05) translate(-1%, 0); } to { transform: scale(1.32) translate(8%, -4%) rotate(-2.5deg); } }
@keyframes app-slide { from { transform: scale(1.13) translate(4%, 2%); } to { transform: scale(1.23) translate(-7%, -4%) rotate(2deg); } }
@keyframes gateway-rise { from { transform: scale(1.12) translate(1%, 4%); } to { transform: scale(1.27) translate(-5%, -8%) rotate(-2deg); } }
@keyframes tower-push { from { transform: scale(1.06) translate(0, 1%); } to { transform: scale(1.30) translate(5%, -6%) rotate(1.7deg); } }
@keyframes light-pass { 0% { transform: translateX(-44%); opacity: .1; } 57% { opacity: .75; } 100% { transform: translateX(45%); opacity: .25; } }

@keyframes panel-in {
  from { opacity: .55; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.workflow { padding-block: clamp(55px, 7.8vw, 114px) clamp(46px, 5vw, 76px); }
.workflow .caption { color: var(--red); margin-bottom: 10px; }
.workflow-steps { list-style: none; margin: clamp(35px, 4.4vw, 65px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.workflow-steps li { position: relative; border-top: 1px solid var(--dark-rule-strong); padding-top: 17px; }
.workflow-steps li::before { content: ""; position: absolute; top: -2px; left: 0; width: 36px; height: 3px; background: var(--red); }
.workflow-index { color: var(--red); font-size: .82rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.workflow h3 { margin: 9px 0 10px; font: 700 clamp(1.75rem, 2.85vw, 3.45rem)/1 var(--display); }
.workflow-steps p { color: var(--mute-dark); max-width: 47ch; }
.workflow-steps .workflow-output { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--dark-rule); color: var(--paper); font-size: .9rem; }
.about { padding-bottom: clamp(55px, 7.7vw, 114px); }
.about-inner { display: grid; grid-template-columns: minmax(115px, .33fr) minmax(0, 1fr); gap: 22px 40px; }
.about-inner { padding-top: clamp(35px, 4.7vw, 69px); border-top: 1px solid var(--dark-rule); }
.about .caption { color: var(--red); padding-top: 6px; }
.about h2 { font-size: clamp(3.25rem, 6.6vw, 7rem); }
.about p:not(.caption) { max-width: 48ch; margin-top: 22px; color: var(--mute-dark); font-size: clamp(1.03rem, 1.4vw, 1.22rem); }

.faq { padding-block: clamp(56px, 7.8vw, 114px); }
.faq-layout { display: grid; grid-template-columns: minmax(0, .73fr) minmax(0, 1.27fr); gap: 29px clamp(28px, 6vw, 88px); }
.faq-list { border-top: 1px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 55px; padding-block: 11px; font-weight: 690; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; color: var(--red-dark); font-size: 1.35rem; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list summary:hover { color: var(--red-dark); }
.faq-list details p { max-width: 66ch; padding: 0 20px 17px 0; color: var(--mute-light); }
.faq-list p a { color: var(--red-dark); font-weight: 660; }
.project-brief { border-top: 1px solid var(--rule); }

.footer-inner { display: flex; justify-content: space-between; align-items: center; min-height: 76px; border-top: 1px solid var(--dark-rule); font-size: .91rem; }
.footer-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 20px; }
.footer-brand img { width: 124px; height: auto; }
.footer a { display: inline-flex; gap: 11px; min-height: 44px; align-items: center; text-decoration: none; }
.footer a span { color: var(--red); }

@media (max-width: 970px) and (min-width: 761px) {
  .hero-lead { max-width: 37ch; }
  .motion-stage { left: 33%; }
}

@media (max-width: 760px) {
  :root { --header-clearance: 66px; }
  .header-inner { min-height: 65px; }
  .brand img { width: 110px; }
  .header nav { gap: 5px 16px; }
  .header nav a { font-size: .82rem; }
  .hero-inner { min-height: 0; padding-block: 32px 0; align-items: start; }
  .hero-copy { width: 100%; }
  h1 { font-size: clamp(2.75rem, 11.8vw, 6.4rem); }
  .hero-lead { margin-top: 19px; }
  .hero-actions { margin-top: 14px; }
  .motion-stage { position: relative; inset: auto; margin: 12px calc(-1 * var(--gutter)) 0; min-width: 0; }
  .motion-stage canvas { width: 100%; height: min(72vw, 390px); }
  .hero-poster { left: 50%; width: 88%; }
  .motion-caption { top: 0; font-size: .59rem; }
  .motion-tools { bottom: 6px; gap: 8px; }
  .service, .about-inner, .faq-layout, .workflow-steps { grid-template-columns: 1fr; }
  .service:nth-child(even) .service-visual { order: 0; }
  .service-intro { flex-wrap: wrap; }
  .footer-inner { flex-wrap: wrap; padding-block: 13px; }
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 0 12px; }
  .header .brand, .header .menu-toggle { align-self: center; }
  .header nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 5px 10px; border-top: 1px solid var(--rule); padding-block: 8px; }
  .header nav a { padding-inline: 9px; }
}

@media (max-width: 430px) {
  .service-data > div { grid-template-columns: 1fr; }
  .hero-specialties { font-size: .7rem; }
  .hero-actions { column-gap: 11px; }
  .hero-primary, .hero-link { gap: 8px; font-size: .85rem; }
  .hero-primary { padding-inline: 12px; }
  .motion-button, .motion-accent { font-size: .73rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1 span, .service-detail[open] p { animation: none; }
}
