:root {
  color-scheme: dark;
  --bg: #0A0A0C;
  --panel: #121216;
  --panel-strong: #18181d;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f6f7fb;
  --muted: #a7a9b7;
  --soft: #737684;
  --blue: #007AFF;
  --violet: #8B5CF6;
  --success: #47d18c;
  --max: 1180px;
  --header: 76px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(0, 122, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 20% 0%, rgba(139, 92, 246, 0.13), transparent 26rem),
    linear-gradient(180deg, #0A0A0C 0%, #0b0b0e 52%, #0A0A0C 100%);
  color: var(--text);
  font-family: Inter, Roboto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 74%);
  animation: gridDrift 28s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.08), rgba(10, 10, 12, 0.72));
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 12, 0.78);
  backdrop-filter: blur(22px) saturate(150%);
  animation: headerEnter 700ms var(--ease) both;
}

.nav-shell {
  width: min(100% - 32px, var(--max));
  min-height: var(--header);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.logo-img {
  display: block;
  width: auto;
  height: 34px;
  max-width: min(210px, 54vw);
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(0, 122, 255, 0.22));
  animation: logoPulse 4.6s var(--ease) infinite;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav-trigger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--panel);
}

.nav-trigger span,
.nav-trigger span::before,
.nav-trigger span::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-trigger span {
  position: relative;
}

.nav-trigger span::before,
.nav-trigger span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-trigger span::before {
  top: -6px;
}

.nav-trigger span::after {
  top: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a:not(.nav-cta) {
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:not(.nav-cta):hover,
.nav-links a:not(.nav-cta):focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.button,
.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(0, 122, 255, 0.52);
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.1);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 48px rgba(0, 122, 255, 0.16);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button::after,
.nav-cta::after {
  content: "";
  position: absolute;
  inset: -45% -35%;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28), transparent 65%);
  transform: translateX(-120%) rotate(8deg);
  pointer-events: none;
  transition: transform 620ms var(--ease);
}

.button:hover::after,
.button:focus-visible::after,
.nav-cta:hover::after,
.nav-cta:focus-visible::after {
  transform: translateX(120%) rotate(8deg);
}

.button:hover,
.button:focus-visible,
.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, 0.8);
  background: rgba(139, 92, 246, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 24px 60px rgba(139, 92, 246, 0.2);
  outline: none;
}

main {
  overflow: hidden;
}

.section {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  scroll-margin-top: var(--header);
}

.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: calc(100svh - var(--header));
  display: grid;
  grid-template-columns: minmax(0, var(--max));
  align-items: center;
  justify-content: center;
  padding: clamp(44px, 6vh, 72px) max(16px, calc((100vw - var(--max)) / 2)) clamp(34px, 4.5vh, 50px);
  background: #121316;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 10, 12, 0.94) 0%, rgba(10, 10, 12, 0.86) 34%, rgba(10, 10, 12, 0.5) 58%, rgba(10, 10, 12, 0.12) 100%),
    linear-gradient(180deg, rgba(10, 10, 12, 0.1) 0%, rgba(10, 10, 12, 0.55) 100%);
}

.hero > .reveal {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 790px;
}

.hero-animation-layer {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

.hero-overlay-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  will-change: transform;
}

.ecosystem-stream {
  fill: none;
  stroke: #007AFF;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.82;
  filter: drop-shadow(0 0 6px rgba(0, 122, 255, 0.58));
}

.ecosystem-stream.secondary {
  stroke-width: 1.8;
  opacity: 0.46;
}

.core-glow-ring {
  transform-box: fill-box;
  transform-origin: center center;
  mix-blend-mode: screen;
}

.ai-node {
  fill: #FFB020;
  opacity: 0.78;
  transform-box: fill-box;
  transform-origin: center center;
  filter: drop-shadow(0 0 7px rgba(255, 176, 32, 0.62));
}

.panel-sweep {
  opacity: 0;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: #dfe8ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 24px rgba(71, 209, 140, 0.62);
}

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

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 4.45vw, 3.95rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  background: linear-gradient(92deg, #ffffff 0%, #dbe8ff 40%, #f6f7fb 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 780px;
  margin-bottom: clamp(22px, 3vh, 34px);
  color: var(--muted);
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  line-height: 1.75;
}

.hero-copy p {
  margin-bottom: 14px;
}

.hero-copy p:last-child {
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-actions .button {
  width: 250px;
  height: 52px;
  min-height: 52px;
}

.button.primary {
  min-height: 50px;
  padding-inline: 22px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.92), rgba(139, 92, 246, 0.86));
  border-color: rgba(255, 255, 255, 0.18);
}

.button.ghost {
  background: rgba(18, 18, 22, 0.88);
  border-color: var(--line-strong);
}

.product {
  min-height: calc(100svh - var(--header));
  display: grid;
  align-items: center;
  padding: 34px 0 78px;
}

.showcase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 42px;
  align-items: stretch;
  padding: 46px;
  border: 1px solid rgba(0, 122, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 122, 255, 0.18), transparent 31%),
    linear-gradient(315deg, rgba(139, 92, 246, 0.15), transparent 36%),
    var(--panel);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.showcase:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.42);
  box-shadow: 0 42px 110px rgba(0, 0, 0, 0.46), 0 0 70px rgba(0, 122, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent 74%);
  animation: showcaseGrid 20s linear infinite;
}

.showcase-content {
  position: relative;
  z-index: 1;
}

.section-label {
  margin-bottom: 18px;
  color: #84bdff;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 22px;
  font-size: 2.65rem;
  line-height: 1.06;
  font-weight: 880;
  letter-spacing: 0;
}

.showcase p,
.section-intro,
.service-card p,
.footer p,
.footer address,
.footer a {
  color: var(--muted);
}

.showcase p {
  max-width: 720px;
  margin-bottom: 32px;
  font-size: 1.03rem;
  line-height: 1.8;
}

.engine-visual {
  position: relative;
  min-height: 380px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 122, 255, 0.26), transparent 20rem),
    linear-gradient(180deg, rgba(10, 10, 12, 0.32), rgba(10, 10, 12, 0.82));
  overflow: hidden;
}

.engine-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, transparent 44%, rgba(255, 255, 255, 0.12) 50%, transparent 56%, transparent 100%);
  transform: translateX(-120%);
  animation: visualSweep 5.6s var(--ease) infinite;
}

.frame-stack {
  position: absolute;
  inset: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  transform: perspective(1000px) rotateX(6deg) rotateY(-10deg);
  animation: frameDrift 8s var(--ease) infinite;
}

.frame {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(145deg, rgba(0, 122, 255, 0.28), rgba(139, 92, 246, 0.18)),
    #0f1015;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  animation: frameGlow 4.8s var(--ease) infinite;
}

.frame:nth-child(2) {
  transform: translateY(34px);
  animation-delay: 450ms;
}

.frame:nth-child(3) {
  transform: translateY(68px);
  animation-delay: 900ms;
}

.timeline {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 30px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(18, 18, 22, 0.86);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr 0.9fr;
  gap: 8px;
  padding: 12px;
}

.timeline span {
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(0, 122, 255, 0.8), rgba(139, 92, 246, 0.72));
  transform-origin: left center;
  animation: timelinePulse 3.4s var(--ease) infinite;
}

.timeline span:nth-child(2) {
  animation-delay: 260ms;
}

.timeline span:nth-child(3) {
  animation-delay: 520ms;
}

.timeline span:nth-child(4) {
  animation-delay: 780ms;
}

.services {
  min-height: calc(100svh - var(--header));
  display: grid;
  align-content: center;
  padding: 54px 0 72px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  max-width: 670px;
  margin-bottom: 0;
}

.section-intro {
  max-width: 440px;
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.75;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transition: transform 240ms ease, border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.13), transparent 42%, rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 240ms ease;
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 122, 255, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent), var(--panel-strong);
  box-shadow: 0 34px 84px rgba(0, 0, 0, 0.34);
}

.service-card:hover::before {
  opacity: 1;
}

.service-index {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 34px;
  border: 1px solid rgba(0, 122, 255, 0.36);
  border-radius: 8px;
  color: #9fcbff;
  background: rgba(0, 122, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 800;
}

.service-card h3 {
  margin-bottom: 14px;
  font-size: 1.22rem;
  line-height: 1.22;
}

.service-card p {
  margin-bottom: 0;
  font-size: 0.96rem;
  line-height: 1.75;
}

.contact-section {
  width: min(100% - 32px, var(--max));
  min-height: calc(100svh - var(--header));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  align-items: center;
  align-content: center;
  gap: 22px;
  padding: 54px 0 72px;
  scroll-margin-top: var(--header);
}

.contact-panel,
.contact-form {
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.contact-panel {
  position: relative;
  min-height: 100%;
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(0, 122, 255, 0.18), transparent 46%),
    linear-gradient(315deg, rgba(139, 92, 246, 0.11), transparent 42%),
    var(--panel);
  overflow: hidden;
}

.contact-panel::after {
  content: "";
  position: absolute;
  inset: auto 34px 34px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 122, 255, 0.78), rgba(139, 92, 246, 0.58), transparent);
  box-shadow: 0 0 34px rgba(0, 122, 255, 0.3);
}

.contact-panel h2 {
  margin-bottom: 16px;
  font-size: 2.05rem;
}

.contact-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.contact-item {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(10, 10, 12, 0.42);
}

.contact-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-item a,
.contact-item span {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-item a:hover,
.contact-item a:focus-visible {
  color: var(--text);
  outline: none;
}

.contact-form {
  position: relative;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 30%),
    var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease;
}

.contact-form:hover,
.contact-form:focus-within {
  border-color: rgba(0, 122, 255, 0.34);
  box-shadow: 0 34px 88px rgba(0, 0, 0, 0.34), 0 0 70px rgba(0, 122, 255, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #dfe8ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(10, 10, 12, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 54px;
  background-image:
    linear-gradient(45deg, transparent 50%, #f6f7fb 50%),
    linear-gradient(135deg, #f6f7fb 50%, transparent 50%);
  background-position:
    calc(100% - 24px) 50%,
    calc(100% - 15px) 50%;
  background-size: 9px 9px, 9px 9px;
  background-repeat: no-repeat;
}

.field input,
.field select {
  min-height: 48px;
  padding: 0 14px;
}

.field select {
  padding-right: 54px;
}

.field textarea {
  min-height: 142px;
  padding: 13px 14px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #696c78;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(0, 122, 255, 0.72);
  background-color: rgba(10, 10, 12, 0.9);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.13);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.form-note {
  margin: 0;
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #08080a;
}

.footer-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 48px 0 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 34px;
  margin-bottom: 42px;
}

.footer h2,
.footer h3 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.footer p,
.footer address,
.footer a {
  margin-bottom: 8px;
  font-size: 0.92rem;
  line-height: 1.7;
}

.footer a {
  display: block;
  transition: color 180ms ease;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--text);
  outline: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 720ms var(--ease), transform 720ms var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 90ms;
  animation-delay: 90ms;
}

.delay-2 {
  transition-delay: 180ms;
  animation-delay: 180ms;
}

.delay-3 {
  transition-delay: 270ms;
  animation-delay: 270ms;
}

@keyframes headerEnter {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 72px 72px, 72px 72px;
  }
}

@keyframes logoPulse {
  0%, 100% {
    filter: drop-shadow(0 0 18px rgba(0, 122, 255, 0.18));
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(139, 92, 246, 0.28));
  }
}

@keyframes showcaseGrid {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 54px 0;
  }
}

@keyframes visualSweep {
  0%, 36% {
    transform: translateX(-120%);
  }
  72%, 100% {
    transform: translateX(120%);
  }
}

@keyframes frameDrift {
  0%, 100% {
    transform: perspective(1000px) rotateX(6deg) rotateY(-10deg) translateY(0);
  }
  50% {
    transform: perspective(1000px) rotateX(7deg) rotateY(-7deg) translateY(-8px);
  }
}

@keyframes frameGlow {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.14);
    filter: brightness(1);
  }
  50% {
    border-color: rgba(0, 122, 255, 0.34);
    filter: brightness(1.08);
  }
}

@keyframes timelinePulse {
  0%, 100% {
    transform: scaleX(0.72);
    opacity: 0.72;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

.copyright {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--soft);
  font-size: 0.86rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1024px) {
  h1 {
    font-size: 3.2rem;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: center;
    padding-top: 72px;
  }

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

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    margin-bottom: 16px;
  }

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

@media (min-width: 1025px) and (max-height: 820px) {
  .hero {
    min-height: calc(100svh - var(--header));
    padding-top: 42px;
    padding-bottom: 44px;
    gap: 44px;
  }

  h1 {
    max-width: 720px;
    margin-bottom: 18px;
    font-size: clamp(2.85rem, 3.75vw, 3.45rem);
    line-height: 1;
  }

  .eyebrow {
    margin-bottom: 16px;
  }

  .hero-copy {
    max-width: 720px;
    margin-bottom: 24px;
    font-size: 1rem;
    line-height: 1.65;
  }

  .button.primary,
  .button.ghost {
    min-height: 46px;
  }

  .hero-actions .button {
    height: 46px;
    min-height: 46px;
  }

}

/* Collapsed navigation: the menu has 6+ items, so it collapses earlier than the layout */
@media (max-width: 1080px) {
  .nav-trigger {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--header) + 10px);
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(18, 18, 22, 0.97);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .nav-links a:not(.nav-cta),
  .nav-cta {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-toggle:checked ~ .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle:checked + .nav-trigger span {
    background: transparent;
  }

  .nav-toggle:checked + .nav-trigger span::before {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle:checked + .nav-trigger span::after {
    transform: translateY(-6px) rotate(-45deg);
  }
}

@media (max-width: 760px) {
  :root {
    --header: 68px;
  }

  .nav-shell,
  .section,
  .contact-section,
  .footer-shell {
    width: min(100% - 24px, var(--max));
  }

  .hero {
    min-height: calc(100svh - var(--header));
    padding: 58px 12px 42px;
  }

  .product,
  .services,
  .contact-section {
    min-height: calc(100svh - var(--header));
  }

  .product {
    padding: 28px 0 46px;
  }

  .services,
  .contact-section {
    padding: 42px 0 52px;
  }

  h1 {
    font-size: 2.4rem;
    line-height: 1.02;
  }

  h2 {
    font-size: 2.05rem;
  }

  .hero-copy,
  .showcase p {
    font-size: 1rem;
  }

  .showcase {
    padding: 28px;
  }

  .engine-visual {
    min-height: 320px;
  }

  .contact-section {
    grid-template-columns: 1fr;
    gap: 16px;
    align-content: center;
  }

  .contact-panel,
  .contact-form {
    padding: 24px;
  }

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

  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-form .button {
    width: 100%;
  }

  .copyright {
    display: block;
  }
}

@media (max-width: 430px) {
  .logo-img {
    height: 30px;
    max-width: min(180px, 58vw);
  }

  h1 {
    font-size: 2.05rem;
  }

  h2 {
    font-size: 1.78rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .showcase,
  .service-card {
    padding: 22px;
  }

  .frame-stack {
    inset: 24px;
    gap: 8px;
  }

  .timeline {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }
}

/* Language switcher */
.nav-links a.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.nav-lang svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

@media (max-width: 1080px) {
  .nav-links a.nav-lang {
    justify-content: flex-start;
  }
}

.footer address {
  margin-top: 0;
  font-style: normal;
}

/* Legal pages */
.legal {
  width: min(100% - 32px, 780px);
  margin: 0 auto;
  padding: 64px 0 96px;
}

.legal-back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.legal-back:hover,
.legal-back:focus-visible {
  color: var(--text);
}

.legal h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.legal-updated {
  margin: 0 0 36px;
  color: var(--soft);
  font-size: 0.9rem;
}

.legal-lead {
  font-size: 1.08rem;
  color: var(--text);
}

.legal h2 {
  margin: 44px 0 12px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.legal p,
.legal li {
  color: var(--muted);
  line-height: 1.75;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal li {
  margin-bottom: 6px;
}

.legal strong {
  color: var(--text);
  font-weight: 650;
}

.legal p a,
.legal li a {
  color: #4da3ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Products (home) ---------- */
.product {
  min-height: auto;
  padding: 96px 0 72px;
}

.product-card {
  align-items: center;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid rgba(71, 209, 140, 0.4);
  border-radius: 999px;
  background: rgba(71, 209, 140, 0.08);
  color: #8ee6b6;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px var(--success);
}

.product-name {
  margin: 0 0 8px;
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1;
  font-weight: 900;
}

.showcase .product-tagline,
.product-tagline {
  margin: 0 0 22px;
  color: #b9c2ff;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.5;
}

.product-card .hero-actions {
  margin-top: 4px;
}

.product-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(71, 209, 140, 0.14), transparent 18rem),
    linear-gradient(180deg, rgba(10, 10, 12, 0.3), rgba(10, 10, 12, 0.8));
  text-align: center;
}

/* Placeholder marker for content still to be added */
.ph {
  display: inline-block;
  padding: 6px 10px;
  border: 1px dashed rgba(255, 196, 87, 0.55);
  border-radius: 6px;
  background: rgba(255, 196, 87, 0.07);
  color: #ffd58a;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.55;
}

/* ---------- About (home) ---------- */
.about {
  padding: 40px 0 96px;
  scroll-margin-top: var(--header);
}

.about-card {
  min-height: 0;
}

.about .service-grid,
.services .service-grid {
  margin-top: 8px;
}

/* ---------- Product page ---------- */
.pp-hero {
  padding: 40px 0 72px;
}

.crumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 36px;
  color: var(--soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover,
.crumbs a:focus-visible {
  color: var(--text);
}

.pp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 48px;
  align-items: center;
}

.pp-hero h1 {
  margin: 0 0 12px;
}

.pp-lead {
  margin: 0 0 30px;
}

.pp-hero-visual {
  min-height: 380px;
}

.pp-section {
  padding: 56px 0;
  scroll-margin-top: var(--header);
}

.pp-text {
  max-width: 760px;
  margin: 0;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.shot {
  margin: 0;
}

.shot-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 9 / 16;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--panel);
  text-align: center;
}

.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-align: center;
}

.pricing-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: center;
  padding: 40px;
  border: 1px solid rgba(0, 122, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 122, 255, 0.14), transparent 40%),
    var(--panel);
}

.pricing-price {
  display: grid;
  gap: 10px;
}

.pricing-price span {
  color: var(--muted);
  font-weight: 600;
}

.pricing-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.pricing-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.pricing-card .pricing-note {
  margin: 0;
  color: var(--soft);
  font-size: 0.9rem;
}

.contact-item span + span {
  display: block;
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .pp-hero-grid,
  .pricing-card {
    grid-template-columns: 1fr;
  }

  .shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .product {
    padding: 64px 0 48px;
  }

  .product-visual,
  .pp-hero-visual {
    min-height: 240px;
  }

  .pricing-card {
    padding: 24px;
  }
}

/* Cool4Scool brand panel: light, playful surface for the product's own identity */
.product-visual--brand {
  border-color: rgba(255, 255, 255, 0.6);
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 204, 0, 0.16), transparent 9rem),
    radial-gradient(circle at 84% 30%, rgba(255, 102, 0, 0.12), transparent 9rem),
    radial-gradient(circle at 70% 86%, rgba(255, 153, 204, 0.16), transparent 10rem),
    radial-gradient(circle at 22% 80%, rgba(46, 179, 151, 0.14), transparent 10rem),
    #fbfaf7;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.c4s-logo {
  display: block;
  width: min(82%, 440px);
  height: auto;
}

/* Hero readability: keep text crisp over the illustration */
.hero-copy {
  color: #c4c7d4;
}

.hero .eyebrow,
.hero-copy {
  text-shadow: 0 1px 18px rgba(10, 10, 12, 0.9);
}

@media (max-width: 1024px) {
  .hero::after {
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.78) 0%, rgba(10, 10, 12, 0.88) 100%);
  }
}

@media (min-width: 1025px) {
  .hero > .reveal {
    max-width: 920px;
  }

  .hero h1 {
    max-width: 920px;
  }

  .hero-copy {
    max-width: 720px;
  }
}
