/* Copyright (C) 2026 ValenceGrid. SPDX-License-Identifier: AGPL-3.0-or-later */
@font-face {
  font-family: Inter;
  src: url("/_website/fonts/InterVariable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f7f9fc;
  --white: #fff;
  --ink: #142238;
  --muted: #516176;
  --line: #dce4ef;
  --blue: #265dc6;
  --blue-dark: #194ba9;
  --blue-light: #edf3fe;
  --teal: #0a9c92;
  --teal-dark: #13675f;
  --teal-light: #e8f6f3;
  --code: #101c2e;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 15px/1.65 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; font: inherit; }
img { display: block; max-width: 100%; height: auto; }
code, pre { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
:where(#product, #onboarding, #purpose, #contact) { scroll-margin-top: 26px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.container { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; top: 12px; left: 14px; background: var(--white); padding: 12px; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: clamp(20px, 3.5vw, 54px); min-height: 73px; }
.brand { display: inline-block; flex: none; width: 206px; margin-left: -9px; }
.brand img { width: 100%; }
.site-navigation { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); margin-left: auto; }
.site-navigation a, .header-login { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 14px; min-height: 44px; }
.site-navigation a { color: var(--muted); }
.site-navigation a:hover, .header-login:hover { color: var(--blue); }
.site-navigation .icon { width: 13px; height: 13px; opacity: .8; }
.header-login { min-height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 7px; font-weight: 620; }
.header-login:hover { border-color: #b6c9ec; background: var(--canvas); }
.header-login .icon { width: 16px; height: 16px; }
.menu-toggle { display: none; }

.hero { border-bottom: 1px solid var(--line); }
.hero-content { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(32px, 5vw, 72px); padding-block: clamp(68px, 7vw, 104px); }
.hero-copy { min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: #36577d; }
.hero-copy .eyebrow > span { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; }
h1 { margin-top: 16px; font-size: clamp(43px, 4.1vw, 60px); font-weight: 680; letter-spacing: -.06em; line-height: 1.18; }
.hero-description { max-width: 435px; margin-top: 23px; font-size: 17px; color: var(--muted); line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 49px; gap: 13px; padding: 0 19px; border: 1px solid transparent; border-radius: 7px; font-weight: 650; white-space: nowrap; }
.button .icon { width: 17px; height: 17px; }
.button-primary { color: var(--white); background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: var(--ink); background: var(--white); border-color: #cbd8e9; }
.button-secondary:hover { color: var(--blue); border-color: #a9bee3; }
.hero-note { margin-top: 19px; color: var(--muted); font-size: 13px; display: flex; align-items: baseline; gap: 6px; }
.hero-note .icon { align-self: center; width: 15px; height: 15px; color: var(--teal-dark); }

.flow-card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px #1e3a620a; overflow: hidden; }
.flow-header, .flow-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 22px; }
.flow-header { min-height: 58px; border-bottom: 1px solid var(--line); }
.flow-header strong { font-size: 14px; font-weight: 650; }
.flow-header > span, .sample-heading > span { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; white-space: nowrap; }
.flow-steps { list-style: none; margin: 0; padding: 28px 22px 32px; display: grid; grid-template-columns: 1fr 1.14fr 1fr; gap: 17px; background: #fafcff; }
.flow-step { min-width: 0; position: relative; }
.flow-step + .flow-step::before { content: ""; position: absolute; top: calc(50% + 15px); left: -17px; width: 17px; height: 1px; background: #83abae; }
.flow-step + .flow-step::after { content: ""; position: absolute; top: calc(50% + 13px); left: -6px; width: 5px; height: 5px; border: solid #6c999f; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.flow-label { display: flex; align-items: baseline; gap: 6px; margin-bottom: 9px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.flow-label b { color: var(--teal-dark); font: 650 10px var(--mono); }
.flow-node { height: 138px; padding: 15px 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.flow-node-brand { background: var(--blue-light); border-color: #b9cdeb; }
.node-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--blue); background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.node-icon .icon { width: 19px; height: 19px; }
.flow-node-brand .node-icon { background: var(--white); border-color: #cfdbef; }
.flow-node strong { font-size: 13px; font-weight: 690; line-height: 1.35; }
.flow-node small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.flow-footer { min-height: 62px; border-top: 1px solid var(--line); }
.flow-footer code { font-size: 11px; color: #3a4f6a; white-space: nowrap; }
.flow-footer code span { color: var(--teal-dark); margin-right: 4px; font-weight: 750; }
.flow-footer a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: 13px; font-weight: 630; color: var(--blue); white-space: nowrap; }
.flow-footer a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.flow-footer a .icon { width: 15px; height: 15px; }

.product-section, .catalog-section { background: var(--white); padding-block: 67px 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-eyebrow { margin-bottom: 9px; color: var(--teal-dark); }
h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.23; letter-spacing: -.045em; font-weight: 660; }
h3 { font-size: 20px; line-height: 1.4; font-weight: 650; letter-spacing: -.025em; }
.text-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 14px; font-weight: 625; color: var(--blue); }
.text-link .icon { width: 16px; height: 16px; }

.product-tabs { display: none; }
.is-enhanced .product-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; padding: 5px; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; }
.product-tabs button { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 47px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 635; }
.product-tabs button:hover { background: #eef3fa; }
.product-tabs button[aria-selected="true"] { background: var(--white); border-color: #cfddf3; color: var(--blue-dark); }
.product-tabs button:focus-visible { outline-offset: -3px; }
.product-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); align-items: center; gap: clamp(18px, 3vw, 44px); padding: clamp(20px, 3vw, 38px); border: 1px solid var(--line); border-radius: 13px; background: var(--canvas); }
.product-panel + .product-panel { margin-top: 14px; }
.is-enhanced .product-panel { margin-top: 0; }
.panel-story h3 { font-size: clamp(20px, 2vw, 26px); }
.panel-story p { margin-top: 10px; color: var(--muted); line-height: 1.8; }
.panel-story .panel-note { font-size: 13px; }
.panel-story .text-link { margin-top: 7px; }
.code-workspace, .sample-workspace { min-width: 0; border-radius: 9px; overflow: hidden; }
.code-workspace { color: #e7eef7; background: var(--code); border: 1px solid #28374e; }
.code-toolbar, .sample-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding-inline: 16px; font-size: 13px; font-weight: 650; }
.code-toolbar { border-bottom: 1px solid #304158; }
.code-label { color: #a8b8cb; font-weight: 450; margin-left: 8px; }
.copy-button { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding-inline: 8px; color: #dce7f6; background: transparent; border: 1px solid transparent; border-radius: 6px; font-size: 12px; }
.copy-button:hover { background: #22344d; }
.copy-button:focus-visible { outline-color: #99beff; outline-offset: 0; }
.copy-button .icon { width: 15px; height: 15px; }
pre { max-width: 100%; margin: 0; padding: 17px; overflow: auto; font-size: 13px; line-height: 1.6; scrollbar-color: #5a718a var(--code); }
pre:focus-visible { outline-offset: -3px; outline-color: #99beff; }
.syntax-purple { color: #cbbcf9; }
.syntax-green { color: #98ded3; }
.syntax-orange { color: #ffd1a0; }
.code-note, .copy-status { font-size: 12px; color: #b5c4d7; padding: 9px 16px; border-top: 1px solid #304158; }
.copy-status:empty { padding: 0; border: 0; }
.copy-status { color: #98ded3; }
.sample-workspace { background: var(--white); border: 1px solid var(--line); padding-bottom: 10px; }
.sample-heading { border-bottom: 1px solid var(--line); }
.sample-heading h4 { font-size: 15px; font-weight: 650; }
.sample-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.sample-table :is(th, td) { padding: 10px 14px; }
.sample-table th { color: var(--muted); background: var(--canvas); font-size: 12px; font-weight: 560; }
.sample-table td { border-top: 1px solid #ebf0f6; }
.sample-table td code { display: block; color: var(--muted); font-size: 11px; }
.state { display: inline-block; color: #465774; background: #eef3fa; padding: 2px 7px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.state-on { color: var(--teal-dark); background: var(--teal-light); }
.credit-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 17px 14px; }
.credit-overview dt { font-size: 12px; color: var(--muted); }
.credit-overview dd { font-size: 21px; font-weight: 650; margin-top: 3px; }

.onboarding-section { padding-block: 75px; border-block: 1px solid var(--line); }
.onboarding-layout, .catalog-layout { display: grid; grid-template-columns: .93fr 1.07fr; gap: clamp(38px, 8vw, 110px); }
.section-description { max-width: 420px; margin-top: 15px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.onboarding-layout .button { margin-top: 24px; }
.onboarding-steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.onboarding-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.step-number { width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid #c7dbe4; border-radius: 50%; color: var(--teal-dark); font: 650 12px var(--mono); }
.onboarding-steps h3 { font-size: 16px; }
.onboarding-steps p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.onboarding-steps .text-link { font-size: 13px; }

.catalog-links { border-top: 1px solid var(--line); }
.catalog-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 90px; padding: 10px; border-bottom: 1px solid var(--line); }
.catalog-links a:hover { background: var(--canvas); }
.catalog-links strong { display: block; font-size: 17px; }
.catalog-links small { color: var(--muted); font-size: 14px; }
.catalog-links .icon { color: var(--blue); }

.site-footer { padding-block: 23px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-main, .footer-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-main .brand { width: 178px; }
.footer-main p, .footer-meta { font-size: 12px; }
.footer-main nav { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.site-footer a:hover { color: var(--blue); }
.site-support details { margin-block: 16px; border-block: 1px solid var(--line); font-size: 13px; }
.site-support details summary { padding-block: 10px; cursor: pointer; }
.site-support details p { padding-bottom: 12px; }
.footer-meta a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1050px) {
  .container { width: calc(100% - 64px); }
  .header-inner { gap: 20px; }
  .site-navigation { gap: 17px; }
  .brand { width: 182px; }
  .hero-content { gap: 32px; }
  h1 { font-size: clamp(34px, 4.4vw, 50px); }
}

@media (max-width: 800px) {
  .container { width: calc(100% - 44px); }
  .header-inner { flex-wrap: wrap; min-height: 64px; gap: 0 10px; }
  .header-inner .brand { margin-right: auto; }
  .header-login { margin-left: auto; }
  .is-enhanced .header-login { margin-left: 0; }
  .site-navigation { flex: 0 0 100%; order: 4; flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); }
  .is-enhanced .site-navigation { display: none; }
  .is-enhanced .menu-open .site-navigation { display: flex; }
  .is-enhanced .menu-toggle { width: 44px; height: 44px; display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0; background: transparent; border: 0; }
  .menu-toggle span { width: 19px; height: 1.5px; background: var(--ink); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .hero-content { grid-template-columns: minmax(0, 1fr); padding-block: 49px; gap: 30px; }
  .hero-description { margin-top: 16px; font-size: 16px; }
  .hero-actions { margin-top: 22px; }
  .hero-note { margin-top: 13px; }
  .flow-card { width: min(100%, 590px); }
  .product-panel { grid-template-columns: minmax(0, 1fr); }
  .onboarding-layout, .catalog-layout { gap: 30px; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 36px); }
  .header-inner { gap: 0 4px; }
  .brand { width: 159px; margin-left: -7px; }
  .header-login { min-height: 44px; font-size: 12px; padding-inline: 8px; }
  .header-login .icon { width: 13px; height: 13px; }
  .hero-content { padding-block: 35px 30px; gap: 24px; }
  .hero-copy .eyebrow { font-size: 12px; }
  h1 { margin-top: 12px; font-size: clamp(31px, 9vw, 47px); line-height: 1.22; }
  .hero-description { margin-top: 14px; font-size: 15px; line-height: 1.75; }
  .hero-actions { margin-top: 19px; gap: 9px; }
  .hero-note { font-size: 11px; }
  .button { padding-inline: 13px; min-height: 46px; font-size: 14px; gap: 8px; }
  .flow-card { border-radius: 11px; }
  .flow-header, .flow-footer { padding-inline: 10px; min-height: 46px; gap: 6px; }
  .flow-steps { padding: 13px 10px 16px; gap: 8px; }
  .flow-step + .flow-step::before { left: -8px; width: 8px; }
  .flow-step + .flow-step::after { left: -4px; width: 4px; height: 4px; }
  .flow-label { gap: 3px; font-size: 10px; margin-bottom: 6px; }
  .flow-label b { font-size: 9px; }
  .flow-node { height: 93px; padding: 7px 2px; border-radius: 6px; }
  .node-icon { width: 28px; height: 28px; margin-bottom: 5px; }
  .node-icon .icon, .node-icon img { width: 17px; height: 17px; }
  .flow-node strong { font-size: 10px; }
  .flow-node small { font-size: 10px; margin-top: 3px; }
  .flow-footer code { font-size: clamp(8.5px, 2.5vw, 11px); }
  .flow-footer a { gap: 4px; font-size: 11px; }
  .flow-footer a .icon { width: 13px; height: 13px; }
  .product-section, .onboarding-section, .catalog-section { padding-block: 38px; }
  .section-heading { align-items: start; flex-direction: column; gap: 2px; margin-bottom: 14px; }
  h2 { font-size: clamp(25px, 7vw, 30px); }
  .is-enhanced .product-tabs { gap: 3px; padding: 4px; }
  .product-tabs button { gap: 4px; padding: 4px 2px; font-size: 12px; white-space: nowrap; }
  .product-tabs button .icon { width: 15px; height: 15px; }
  .product-panel { padding: 13px; gap: 13px; }
  .panel-story p { margin-top: 7px; font-size: 14px; }
  pre { padding-inline: 10px; font-size: 12px; }
  .code-toolbar, .sample-heading { padding-inline: 10px; }
  .code-note, .copy-status { padding-inline: 10px; }
  .sample-table :is(th, td) { padding-inline: 7px; }
  .sample-table { font-size: 11px; }
  .sample-table th { font-size: 11px; }
  .credit-overview { padding-inline: 7px; }
  .credit-overview dt { font-size: 11px; }
  .onboarding-layout, .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 21px; }
  .onboarding-layout .button { margin-top: 16px; }
  .onboarding-steps p { font-size: 13px; }
  .catalog-links a { padding-inline: 3px; }
}

@media (prefers-reduced-motion: no-preference) {
  a, button { transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
}

.company-section { padding-block: 65px; border-top: 1px solid var(--line); }
.company-layout { display: grid; grid-template-columns: .93fr 1.07fr; gap: clamp(32px, 8vw, 110px); align-items: start; }
.company-layout h2 { font-size: clamp(24px, 2.5vw, 34px); }
.company-contact { padding: 20px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.company-contact p { margin-top: 7px; color: var(--muted); }
.company-actions { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 5px; }
.site-support { display: flex; justify-content: space-between; gap: 0 22px; flex-wrap: wrap; margin-block: 16px; border-block: 1px solid var(--line); font-size: 13px; }
.site-support details { flex: 1 1 240px; margin: 0; border: 0; }
.site-support details > :is(h2, ul, p, a) { max-width: 66ch; }
.site-support details h2 { font-size: 19px; }
.site-support details ul { padding-inline-start: 20px; }
.site-support details > a { display: inline-flex; min-height: 44px; align-items: center; }
.site-support a { color: var(--blue); }
.site-support nav { display: flex; gap: 15px; align-items: start; }
.site-support nav a { display: inline-flex; min-height: 44px; align-items: center; }
@media (max-width: 560px) {
  .company-section { padding-block: 38px; }
  .company-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .company-contact { padding: 16px; }
}
