:root {
  --bg: #f5f5f5;
  --ink: #0a0a0a;
  --muted: #5d5d5d;
  --line: #d9d9d9;
  --soft: #f3f3f3;
  --soft-2: #ededed;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0,0,0,.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.link-page { --bg: #e7efff; }
body.io-page { --bg: #e4f6eb; }
body.force-page { --bg: #ffe7e5; }
body.trim-page { --bg: #fbf1cf; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 26px clamp(22px, 4vw, 56px);
  background: rgba(232,232,232,.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-family: Orbitron, sans-serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  background: transparent;
  box-shadow: none;
}

.logo > span {
  display: block;
}

.accent-red {
  color: inherit;
}

.accent-green {
  color: inherit;
}

.logo.small {
  font-size: 27px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
}

.nav a:not(.nav-button)::after {
  content: "";
  display: block;
  height: 3px;
  width: 0;
  margin-top: 6px;
  background: var(--ink);
  transition: width .2s ease;
}

.nav a:hover::after { width: 100%; }

.nav-button {
  padding: 14px 24px;
  color: #fff;
  background: #000;
  border-radius: 5px;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
}

.menu-button span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 6px 0;
  background: #000;
}

main {
  width: min(1320px, calc(100% - 44px));
  margin: 0 auto;
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
  padding: 70px 0 54px;
}

.eyebrow {
  margin: 0 0 24px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 550px;
  font-family: Orbitron, sans-serif;
  font-size: clamp(41px, 5vw, 74px);
  font-weight: 700;
  letter-spacing: -.04em;
}

.lead {
  max-width: 510px;
  margin: 28px 0 30px;
  color: #222;
  font-size: 19px;
  line-height: 1.75;
}

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

.button, .mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 55px;
  padding: 0 28px;
  border: 2px solid #000;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}

.button.primary,
.mini-button.dark {
  color: #fff;
  background: #000;
  box-shadow: 0 12px 26px rgba(0,0,0,.16);
}

.button.secondary,
.mini-button {
  background: #fff;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 510px;
}

.hero-figure {
  position: relative;
  width: min(100%, 820px);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1);
}

.data-flow {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.flow-line {
  fill: none;
  stroke: #050505;
  stroke-width: 21;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.flow-stream {
  fill: none;
  stroke: #fff;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 34 68;
  vector-effect: non-scaling-stroke;
}

.flow-stream-forward { animation: flowForward 5s linear infinite; }
.flow-stream-backward { animation: flowBackward 5s linear infinite; }

@keyframes flowForward {
  to { stroke-dashoffset: -102; }
}

@keyframes flowBackward {
  to { stroke-dashoffset: 102; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-stream {
    animation: none;
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  padding: 36px 0 28px;
  scroll-margin-top: 120px;
}

#downloads,
#docs,
#support,
#manuals {
  scroll-margin-top: 120px;
}

.product-card {
  --card-accent: #111;
  --card-ink: #050505;
  --card-soft: rgba(255,255,255,.72);
  min-height: 350px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 34px 28px;
  color: var(--card-ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.38)),
    var(--card-accent);
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 9px;
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.product-card > div:first-child {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.product-card:nth-child(1) { --card-accent: #78a7ff; }
.product-card:nth-child(2) { --card-accent: #43c77a; }
.product-card:nth-child(3) { --card-accent: #ff5d57; }
.product-card:nth-child(4) { --card-accent: #f2c84b; }

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,0,0,.28);
  box-shadow: 0 22px 54px rgba(0,0,0,.14);
}

.product-card-disabled {
  cursor: default;
}

.product-card-disabled:hover {
  transform: none;
  border-color: rgba(0,0,0,.14);
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
}

.product-card h2,
.download-section h2,
.split-section h2,
.support-section h2 {
  font-family: Orbitron, sans-serif;
  font-size: 29px;
  letter-spacing: -.03em;
}

.product-card h2::after,
.download-section h2::after,
.split-section h2::after,
.support-section h2::after {
  content: "";
  display: block;
  width: 43px;
  height: 3px;
  margin: 14px 0 26px;
  background: #000;
}

.product-card p {
  max-width: 210px;
  color: rgba(0,0,0,.78);
  line-height: 1.75;
}

.product-card .mini-button {
  margin-top: auto;
}

.card-graphic {
  position: absolute;
  right: -18px;
  bottom: -6px;
  opacity: .96;
}

.force-mini {
  width: 210px;
  height: 135px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,0,0,.88), rgba(0,0,0,.42));
  box-shadow: var(--shadow);
}

.force-mini::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 38px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, #eee, #222 70%);
  border: 8px solid #050505;
}

.board-mini {
  width: 245px;
  height: 160px;
  transform: rotate(-8deg);
  border-radius: 10px;
  background: rgba(0,0,0,.84);
  box-shadow: var(--shadow);
}

.board-mini::before {
  content: "FFair_IO";
  position: absolute;
  left: 65px;
  top: 68px;
  color: #fff;
  font-family: Orbitron, sans-serif;
}

.app-mini {
  width: 130px;
  height: 210px;
  border-radius: 20px;
  background: rgba(0,0,0,.86);
  border: 9px solid rgba(0,0,0,.7);
  box-shadow: var(--shadow);
}

.app-mini::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 56px;
  width: 70px;
  height: 96px;
  background: repeating-linear-gradient(#fff 0 5px, transparent 5px 22px);
  opacity: .8;
}

.trim-mini {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #f6f6f6 0 16%, #111 17% 30%, #d7d7d7 31% 47%, #090909 48% 100%);
  border: 10px solid #222;
  box-shadow: var(--shadow);
}

.trim-mini::before {
  content: "";
  position: absolute;
  left: 82px;
  top: 12px;
  width: 16px;
  height: 72px;
  border-radius: 999px;
  background: #111;
  transform-origin: 50% 82px;
  transform: rotate(42deg);
}

.three-words {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 26px 0 70px;
  text-align: center;
  font-size: 15px;
}

.three-words div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.three-words span {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: #000;
}

.three-words div:nth-child(1) span { width: 22px; height: 4px; }
.three-words div:nth-child(2) span { border-radius: 2px; }
.three-words div:nth-child(3) span { border-radius: 50%; }
.three-words div:nth-child(4) span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 0 28%, #000 31% 100%);
  border: 3px solid #000;
}

.features {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 42px 30px;
  background: linear-gradient(135deg, #fff, var(--soft));
  border-radius: 9px;
  border: 1px solid rgba(0,0,0,.05);
}

.features article {
  padding: 10px 24px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.features article:last-child { border-right: 0; }

.icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto 22px;
  background: #000;
}

.features article:nth-child(1) .icon,
.features article:nth-child(3) .icon { border-radius: 50%; }

.features article:nth-child(2) .icon {
  width: 28px;
  height: 5px;
  margin-top: 7px;
  margin-bottom: 28px;
}

.features article:nth-child(4) .icon {
  transform: rotate(45deg);
}

.features article:nth-child(5) .icon {
  width: 28px;
  height: 12px;
  clip-path: polygon(0 40%, 70% 40%, 70% 0, 100% 50%, 70% 100%, 70% 60%, 0 60%);
}

.features h3 {
  margin-bottom: 14px;
  font-size: 15px;
  text-transform: uppercase;
}

.features p {
  margin: 0;
  color: #333;
  line-height: 1.6;
}

.download-section,
.split-section,
.support-section {
  margin: 54px 0;
  padding: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--soft);
  border-radius: 9px;
}

.download-section p,
.split-section p,
.support-section p {
  max-width: 620px;
  color: #333;
  line-height: 1.7;
}

.doc-list {
  display: grid;
  gap: 12px;
  min-width: 250px;
}

.doc-list a {
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 700;
}

.support-section {
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.support-email {
  font-weight: 700;
  color: #333;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer {
  display: grid;
  grid-template-columns: 1.1fr .7fr .7fr 1fr;
  gap: 34px;
  margin-top: 70px;
  padding: 48px clamp(22px, 4vw, 56px);
  background: #f7f7f7;
  border-top: 1px solid var(--line);
}

.footer div {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer strong {
  margin-bottom: 8px;
  text-transform: uppercase;
}

.footer a {
  color: #333;
  font-size: 14px;
}

.footer p {
  margin: 0;
  color: #333;
  justify-self: end;
}

.product-hero {
  min-height: 440px;
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: center;
  gap: clamp(28px, 6vw, 80px);
  padding: 76px 0 50px;
}

.product-visual {
  position: relative;
  justify-self: center;
  filter: grayscale(1);
}

.product-screenshot {
  width: min(100%, 760px);
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}

.product-visual.product-screenshot {
  filter: none;
}

.link-page .product-hero {
  grid-template-columns: .7fr 1.3fr;
}

.product-hero .force-mini {
  width: 320px;
  height: 205px;
}

.product-hero .board-mini {
  width: 330px;
  height: 215px;
}

.product-hero .app-mini {
  width: 190px;
  height: 305px;
}

.product-hero .trim-mini {
  width: 260px;
  height: 260px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 26px 0 54px;
}

.detail-grid article,
.resource-section {
  padding: 34px;
  background: var(--soft);
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 9px;
}

.detail-grid h2,
.resource-section h2 {
  margin-bottom: 18px;
  font-size: 24px;
  text-transform: uppercase;
}

.detail-grid p {
  margin: 0;
  color: #333;
  line-height: 1.75;
}

.resource-section {
  margin: 34px 0;
}

.system-diagram {
  margin-top: 28px;
}

.diagram-node,
.diagram-column,
.diagram-profile,
.diagram-device-list > div {
  background: #fff;
  border: 2px solid #111;
  border-radius: 6px;
}

.diagram-root {
  width: min(320px, 100%);
  margin: 0 auto;
  padding: 18px 24px;
  text-align: center;
  font-family: Orbitron, sans-serif;
  font-size: 24px;
  font-weight: 800;
}

.diagram-branch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 54px;
}

.diagram-branch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -54px;
  width: 2px;
  height: 28px;
  background: #111;
}

.diagram-branch::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  top: -26px;
  height: 2px;
  background: #111;
}

.diagram-column {
  position: relative;
  padding: 24px;
}

.diagram-column::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  width: 2px;
  height: 28px;
  background: #111;
}

.diagram-column h3 {
  margin-bottom: 20px;
  font-family: Orbitron, sans-serif;
  font-size: 19px;
}

.diagram-profile-list {
  display: grid;
  gap: 18px;
}

.diagram-profile {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.diagram-profile strong {
  font-size: 13px;
  text-transform: uppercase;
}

.diagram-device-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  border-left: 2px solid #111;
}

.diagram-device-list > div {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-width: 1px;
}

.diagram-device-list > div::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 22px;
  width: 18px;
  height: 2px;
  background: #111;
}

.diagram-device-list span {
  font-weight: 700;
}

.diagram-device-list small {
  color: #333;
  line-height: 1.4;
  font-size: 13px;
}

.diagram-device-list > .diagram-device {
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 14px;
}

.diagram-device img {
  display: block;
  width: 82px;
  height: 42px;
  object-fit: contain;
  object-position: center;
  filter: saturate(.9) contrast(1.03);
}

.device-copy {
  display: grid;
  gap: 6px;
}

.explain-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.explain-list article {
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.explain-list h3 {
  margin-bottom: 12px;
  font-size: 16px;
  text-transform: uppercase;
}

.explain-list p {
  margin: 0;
  color: #333;
  line-height: 1.7;
}

.explain-list p + p {
  margin-top: 10px;
}

.explain-list.compact {
  grid-template-columns: repeat(2, 1fr);
}

.resource-action {
  margin-top: 24px;
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.resource-list a,
.resource-list span {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 700;
}

.resource-list span {
  color: #333;
}

@media (max-width: 980px) {
  .menu-button { display: block; }

  .nav {
    display: none;
    position: absolute;
    left: 22px;
    right: 22px;
    top: 92px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 12px;
  }

  body.menu-open .nav {
    display: grid;
    gap: 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 45px;
  }

  .hero-visual {
    min-height: 500px;
  }

  .product-grid,
  .features,
  .product-hero,
  .detail-grid,
  .diagram-branch,
  .resource-list,
  .explain-list.compact {
    grid-template-columns: 1fr;
  }

  .diagram-branch::before,
  .diagram-branch::after,
  .diagram-column::before {
    display: none;
  }

  .features article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .features article:last-child { border-bottom: 0; }

  .three-words {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .download-section,
  .split-section {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .footer p {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 30px, 1180px);
  }

  .site-header {
    padding: 18px 15px;
  }

  .logo {
    min-width: 0;
    height: auto;
    font-size: 27px;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 300px;
  }

  .hero-figure {
    width: 100%;
  }

  .diagram-device-list > .diagram-device {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
  }

  .diagram-device img {
    width: 78px;
    height: 40px;
  }

  .product-card {
    min-height: 330px;
  }

  .download-section,
  .split-section,
  .support-section {
    padding: 28px;
  }
}
