:root {
  color-scheme: dark light;
  --bg: #070912;
  --bg-soft: #0e1423;
  --surface: rgba(255, 255, 255, 0.07);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f6f8ff;
  --muted: #aeb9d4;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #7f7cff;
  --accent-2: #22d3c5;
  --accent-3: #78db7d;
  --ink: #111827;
  --header: rgba(7, 9, 18, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --font: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8ff;
  --bg-soft: #ffffff;
  --surface: rgba(17, 24, 39, 0.06);
  --surface-strong: rgba(17, 24, 39, 0.09);
  --text: #111827;
  --muted: #536072;
  --line: rgba(17, 24, 39, 0.14);
  --accent: #5b5bd6;
  --accent-2: #008a8a;
  --accent-3: #2f8f4e;
  --header: rgba(247, 248, 255, 0.82);
  --shadow: 0 24px 70px rgba(24, 36, 72, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(127, 124, 255, 0.22), transparent 30rem),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

body::selection {
  background: var(--accent-2);
  color: #041015;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem clamp(1rem, 4vw, 4.5rem);
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.header-actions,
.main-nav,
.hero-actions,
.inline-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  color: white;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 0.1rem;
}

.brand-copy strong,
.footer-brand {
  font-size: 1rem;
  font-weight: 700;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.3rem);
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a,
.footer-links a {
  transition: color 180ms ease;
}

.main-nav a:hover,
.footer-links a:hover,
.inline-actions a:hover {
  color: var(--accent-2);
}

.header-actions {
  justify-content: end;
  gap: 0.7rem;
}

.theme-toggle {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.header-cta,
.button {
  border-radius: 999px;
  font-weight: 700;
}

.header-cta {
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
}

.hero {
  position: relative;
  min-height: clamp(560px, 82svh, 760px);
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 5rem clamp(1rem, 6vw, 6rem);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("/assets/images/sonnetdb-dashboard.png");
  background-position: center right;
  background-size: cover;
  transform: scale(1.02);
  animation: imageDrift 16s ease-in-out infinite alternate;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 8, 16, 0.96) 0%, rgba(5, 8, 16, 0.82) 35%, rgba(5, 8, 16, 0.22) 72%),
    linear-gradient(180deg, rgba(5, 8, 16, 0.1), var(--bg));
}

:root[data-theme="light"] .hero-shade {
  background:
    linear-gradient(90deg, rgba(247, 248, 255, 0.98) 0%, rgba(247, 248, 255, 0.84) 38%, rgba(247, 248, 255, 0.24) 78%),
    linear-gradient(180deg, rgba(247, 248, 255, 0.1), var(--bg));
}

.hero-content {
  position: relative;
  max-width: 760px;
}

.eyebrow,
.section-kicker,
.product-label {
  margin: 0 0 1rem;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(4.4rem, 13vw, 9.6rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  line-height: 1.75;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.25rem;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.intro-band,
.product-band,
.solution-band,
.closing-band,
.page-hero,
.detail-list,
.contact-grid {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 6vw, 6rem);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.8fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.intro-grid h2,
.section-head h2,
.closing-band h2,
.page-hero h1 {
  max-width: 56rem;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro-grid p,
.closing-band p,
.page-hero p,
.detail-list p,
.contact-grid p,
.solution-rows p {
  color: var(--muted);
  line-height: 1.8;
}

.section-head {
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.product-feature {
  display: grid;
  grid-template-columns: minmax(20rem, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--line);
}

.product-feature + .product-feature {
  border-bottom: 1px solid var(--line);
}

.product-copy h3 {
  margin-bottom: 1rem;
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  line-height: 0.95;
}

.product-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.feature-list {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0 1.75rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--muted);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-2);
}

.inline-actions {
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--text);
  font-weight: 700;
}

.product-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-visual img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
}

.iotsharp-feature {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.85fr);
}

.network-visual {
  position: relative;
  min-height: 22rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(127, 124, 255, 0.16), transparent),
    repeating-linear-gradient(90deg, transparent, transparent 39px, var(--surface) 40px),
    var(--surface);
}

.network-visual span {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 32px var(--accent-3);
  animation: pulse 2.6s ease-in-out infinite;
}

.network-visual span:nth-child(1) { left: 14%; top: 68%; }
.network-visual span:nth-child(2) { left: 32%; top: 46%; animation-delay: 0.2s; }
.network-visual span:nth-child(3) { left: 52%; top: 62%; animation-delay: 0.45s; }
.network-visual span:nth-child(4) { left: 68%; top: 34%; animation-delay: 0.65s; }
.network-visual span:nth-child(5) { left: 91%; top: 28%; animation-delay: 0.9s; }

.network-visual svg {
  position: absolute;
  inset: 9%;
  width: 82%;
  height: 82%;
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0.9;
}

.network-visual path:first-child {
  stroke: var(--accent);
  stroke-width: 2;
}

.solution-rows,
.detail-list,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
}

.solution-rows article,
.detail-list article,
.contact-grid article {
  min-height: 18rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.solution-rows span,
.detail-list span,
.contact-grid span {
  color: var(--accent-2);
  font-weight: 800;
}

.solution-rows h3,
.detail-list h2,
.contact-grid h2 {
  margin: 1.2rem 0 0.9rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.closing-band {
  text-align: center;
  background:
    linear-gradient(135deg, rgba(127, 124, 255, 0.2), rgba(34, 211, 197, 0.1)),
    var(--surface);
}

.closing-band h2,
.closing-band p {
  margin-left: auto;
  margin-right: auto;
}

.page-hero.compact {
  min-height: 36rem;
  display: grid;
  align-content: end;
  background:
    linear-gradient(135deg, rgba(127, 124, 255, 0.22), rgba(34, 211, 197, 0.1)),
    var(--surface);
  border-bottom: 1px solid var(--line);
}

.detail-list,
.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.detail-list a,
.contact-grid a {
  color: var(--accent-2);
  font-weight: 800;
}

.site-footer {
  padding: 2rem clamp(1rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-inner p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
}

.reveal {
  animation: riseIn 700ms ease both;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .hero {
    padding-top: 4rem;
  }

  .intro-grid,
  .product-feature,
  .iotsharp-feature,
  .solution-rows,
  .detail-list,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .product-feature {
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 66px;
    padding: 0.7rem 1rem;
  }

  .brand-copy span,
  .header-cta {
    display: none;
  }

  h1 {
    font-size: clamp(4rem, 21vw, 5.6rem);
  }

  .hero {
    min-height: 72svh;
    padding: 4rem 1rem;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 8, 16, 0.98), rgba(5, 8, 16, 0.62)),
      linear-gradient(180deg, rgba(5, 8, 16, 0.1), var(--bg));
  }

  :root[data-theme="light"] .hero-shade {
    background:
      linear-gradient(90deg, rgba(247, 248, 255, 0.98), rgba(247, 248, 255, 0.72)),
      linear-gradient(180deg, rgba(247, 248, 255, 0.1), var(--bg));
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes imageDrift {
  from {
    transform: scale(1.02) translateX(0);
  }
  to {
    transform: scale(1.05) translateX(-1.5rem);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.8);
    opacity: 1;
  }
}
