:root {
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --text: #1c1b1a;
  --muted: #646464;
  --accent: #cb281e;
  --accent-dark: #9e1f18;
  --accent-soft: #f8eceb;
  --line: #ececec;
  --white: #ffffff;
  --header-h: 52px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  background: var(--accent);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 999px;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1400px, calc(100% - 80px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 7px;
  background: var(--accent);
  clip-path: polygon(0 0, 72% 0, 100% 100%, 28% 100%);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.lead {
  margin: 18px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: background 250ms var(--ease), color 250ms var(--ease),
    border-color 250ms var(--ease), transform 250ms var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text);
}

.btn-light {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-light:hover {
  background: #f3ddd9;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  transition: box-shadow 400ms var(--ease);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.logo {
  position: relative;
  z-index: 110;
  flex-shrink: 0;
}

.logo img {
  width: 122px;
  height: auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav > a,
.nav-item > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.desktop-nav > a:hover,
.nav-item > button:hover,
.desktop-nav > a.is-current {
  color: var(--accent);
}

.nav-item {
  position: relative;
}

.nav-item svg {
  width: 10px;
  height: 10px;
  transition: transform 250ms var(--ease);
}

.nav-item > button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  padding: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(28, 27, 26, 0.08);
}

.nav-dropdown a {
  display: block;
  padding: 12px 12px;
  border-radius: 8px;
}

.nav-dropdown a:hover,
.nav-dropdown a.is-current {
  background: var(--accent-soft);
}

.nav-dropdown strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.nav-dropdown span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.header-actions {
  position: relative;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-cta {
  display: none;
  min-height: 34px;
  padding: 0 16px;
  font-size: 14px;
}

.burger {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transition: transform 400ms var(--ease), opacity 400ms var(--ease);
}

.burger[aria-expanded="true"] span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

.burger[aria-expanded="true"] span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--white);
  padding: calc(var(--header-h) + 28px) 0 48px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease), visibility 400ms;
  overflow-y: auto;
}

.site-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-menu-nav a {
  color: var(--text);
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.site-menu-nav a:hover,
.site-menu-nav a.is-current {
  color: var(--accent);
}

.site-menu-sub {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 12px 4px;
}

.site-menu-sub a {
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
}

.menu-meta {
  margin-top: 40px;
  color: var(--muted);
  font-size: 14px;
}

.menu-meta a {
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  padding: 56px 0 88px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  max-width: 14ch;
}

.hero-copy {
  margin-top: 20px;
  max-width: 42ch;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-meta dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.hero-meta dd {
  margin: 0;
  font-weight: 600;
}

.hero-scene {
  position: relative;
  width: min(100%, 380px);
  height: 420px;
  justify-self: end;
  perspective: 900px;
}

.hero-io {
  position: absolute;
  left: 18px;
  top: 118px;
  display: grid;
  gap: 10px;
}

.hero-io span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  animation: heroIo 7.2s var(--ease) infinite;
}

.hero-io span:nth-child(2) {
  animation-delay: 0.18s;
}

.hero-io span:nth-child(3) {
  animation-delay: 0.36s;
}

.hero-io span:nth-child(4) {
  animation-delay: 0.54s;
}

.hero-reader {
  position: absolute;
  left: 48px;
  top: 132px;
  width: 36px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.hero-reader-led {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--line);
  animation: heroLed 7.2s var(--ease) infinite;
}

.hero-reader-ring {
  position: absolute;
  left: 50%;
  top: 38px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0.35;
  animation: heroRing 7.2s var(--ease) infinite;
}

.hero-card {
  position: absolute;
  left: -22px;
  top: 34px;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  animation: heroCard 7.2s var(--ease) infinite;
}

.hero-frame {
  position: absolute;
  right: 28px;
  top: 36px;
  width: 210px;
  height: 340px;
  border: 1.5px solid #d8d8d8;
  border-radius: 4px 4px 0 0;
  background: #f7f7f7;
  transform-style: preserve-3d;
}

.hero-door {
  position: absolute;
  inset: 8px 8px 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  animation: heroDoor 7.2s var(--ease) infinite;
}

.hero-door-panel {
  display: block;
  height: 100%;
  background: var(--white);
  border: 1px solid #e4e4e4;
  border-bottom: 0;
  box-shadow: 8px 0 24px rgba(28, 27, 26, 0);
  animation: heroDoorShadow 7.2s var(--ease) infinite;
}

.hero-door-handle {
  position: absolute;
  right: 16px;
  top: 52%;
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
}

@keyframes heroCard {
  0%,
  8% {
    opacity: 0;
    transform: translateX(-12px);
  }
  18%,
  28% {
    opacity: 1;
    transform: translateX(10px);
  }
  36%,
  100% {
    opacity: 0;
    transform: translateX(10px);
  }
}

@keyframes heroLed {
  0%,
  16% {
    background: var(--line);
    box-shadow: none;
  }
  22%,
  70% {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  80%,
  100% {
    background: var(--line);
    box-shadow: none;
  }
}

@keyframes heroRing {
  0%,
  12% {
    transform: scale(1);
    opacity: 0.25;
  }
  20% {
    transform: scale(1.55);
    opacity: 0.55;
  }
  32% {
    transform: scale(1);
    opacity: 0.25;
  }
  100% {
    transform: scale(1);
    opacity: 0.25;
  }
}

@keyframes heroIo {
  0%,
  18% {
    background: var(--line);
  }
  28%,
  62% {
    background: var(--accent);
  }
  74%,
  100% {
    background: var(--line);
  }
}

@keyframes heroDoor {
  0%,
  26% {
    transform: rotateY(0deg);
  }
  40%,
  68% {
    transform: rotateY(-46deg);
  }
  84%,
  100% {
    transform: rotateY(0deg);
  }
}

@keyframes heroDoorShadow {
  0%,
  26%,
  84%,
  100% {
    box-shadow: 8px 0 24px rgba(28, 27, 26, 0);
  }
  40%,
  68% {
    box-shadow: 16px 8px 28px rgba(28, 27, 26, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-io span,
  .hero-reader-led,
  .hero-reader-ring,
  .hero-card,
  .hero-door,
  .hero-door-panel {
    animation: none;
  }

  .hero-door {
    transform: rotateY(-28deg);
  }

  .hero-reader-led {
    background: var(--accent);
  }
}

/* Sections */
.section {
  padding: 88px 0;
}

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  max-width: 16ch;
}

.section-head p {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 17px;
}

.split-cards {
  display: grid;
  gap: 20px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 32px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: transform 350ms var(--ease), box-shadow 350ms var(--ease);
}

.tile-access,
.tile-io {
  background: var(--white);
}

.tile-access p,
.tile-io p {
  color: var(--muted);
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(28, 27, 26, 0.06);
}

.tile h3 {
  font-size: 32px;
}

.tile p {
  margin: 12px 0 0;
  max-width: 36ch;
}

.tile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
}

.tile-list li {
  font-weight: 500;
}

.tile-link {
  margin-top: auto;
  padding-top: 28px;
  font-weight: 600;
}

.tile-access .tile-link,
.tile-io .tile-link {
  color: var(--accent);
}

.product-grid {
  display: grid;
  gap: 18px;
}

.product-card {
  padding: 28px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.product-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  color: var(--accent);
}

.product-card h3 {
  font-size: 24px;
}

.product-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.product-card a {
  display: inline-flex;
  margin-top: 20px;
  font-weight: 600;
  color: var(--accent);
}

.why-grid {
  display: grid;
  gap: 18px;
}

.why-item {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.why-item:last-child {
  border-bottom: 1px solid var(--line);
}

.why-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.why-item h3 {
  font-size: 22px;
}

.why-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.cta-band {
  background: var(--white);
  border-top: 1px solid var(--line);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-hero {
  padding: 56px 0 24px;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
}

.page-hero p {
  margin: 16px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 18px;
}

.detail-list {
  display: grid;
  gap: 16px;
}

.detail {
  display: grid;
  gap: 24px;
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 20px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.office-stack {
  display: grid;
  gap: 18px;
}

.detail h2 {
  font-size: 28px;
}

.detail p {
  margin: 10px 0 0;
  color: var(--muted);
}

.detail ul {
  margin: 16px 0 0;
  padding: 0;
}

.detail li {
  position: relative;
  padding-left: 16px;
  margin-top: 8px;
  color: var(--text);
}

.detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--accent);
  clip-path: polygon(0 0, 72% 0, 100% 100%, 28% 100%);
}

.contact-grid,
.office-grid,
.channel-grid {
  display: grid;
  gap: 18px;
}

.card {
  padding: 28px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.card h3 {
  font-size: 20px;
}

.card p,
.card address {
  margin: 10px 0 0;
  font-style: normal;
  color: var(--muted);
}

.card a {
  color: var(--text);
  font-weight: 500;
}

.card a:hover {
  color: var(--accent);
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
  border-radius: 20px;
}

.form button {
  justify-self: start;
}

/* Footer */
.site-footer {
  background: var(--white);
  color: var(--muted);
  padding: 64px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.site-footer .logo img {
  width: 122px;
}

.site-footer h3 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer a {
  display: block;
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer strong {
  color: var(--text);
  font-weight: 600;
}

.footer-offices {
  display: grid;
  gap: 20px;
}

.site-footer address {
  font-style: normal;
  margin: 0;
  line-height: 1.55;
}

.site-footer address strong {
  display: block;
  margin-bottom: 6px;
}

.contact-form-wrap {
  max-width: 640px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  font-size: 13px;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (min-width: 860px) {
  .header-cta {
    display: inline-flex;
  }

  .split-cards,
  .product-grid,
  .why-grid,
  .office-grid,
  .channel-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid,
  .detail,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .burger {
    display: none;
  }

  .desktop-nav {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr 0.9fr;
    min-height: min(calc(100vh - var(--header-h) - 40px), 760px);
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-item {
    padding: 0 0 0 24px;
    border: 0;
    border-left: 1px solid var(--line);
  }

  .why-item:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .why-item:last-child {
    border-bottom: 0;
  }

  .about-offices {
    grid-template-columns: repeat(2, 1fr);
  }

  .channel-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1099px) {
  .desktop-nav {
    display: none;
  }
}

@media (max-width: 1100px) {
  .container {
    width: calc(100% - 48px);
  }
}

@media (max-width: 768px) {
  .container {
    width: calc(100% - 32px);
    max-width: 100%;
  }

  .hero,
  .section,
  .page-hero {
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .tile,
  .product-card,
  .card,
  .detail {
    padding: 24px;
  }

  .logo img {
    width: 110px;
  }

  .hero-scene {
    justify-self: start;
    width: 300px;
    height: 340px;
    transform: scale(0.86);
    transform-origin: left top;
  }
}
