:root {
  --bg-top: #f2f3ee;
  --bg-bottom: #e9ebe4;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --text: #171717;
  --muted: #616161;
  --line: rgba(23, 23, 23, 0.1);
  --shadow: 0 24px 80px rgba(17, 17, 17, 0.08);
  --button-bg: #ffffff;
  --button-text: #171717;
}

body.dark {
  --bg-top: #111310;
  --bg-bottom: #171916;
  --panel: rgba(33, 35, 31, 0.78);
  --panel-strong: rgba(37, 40, 35, 0.92);
  --text: #f3f3ee;
  --muted: #b3b7ae;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --button-bg: #f3f3ee;
  --button-text: #111310;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  line-height: 1.45;
  transition: background 0.25s ease, color 0.25s ease;
}

a,
button {
  color: inherit;
  font: inherit;
}

.page {
  width: min(1040px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-logo {
  height: 1.4em;
  width: auto;
}

body.dark .brand-logo {
  filter: invert(1);
}

.top-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
}

.mini-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.lang-switch button,
.theme-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-switch button.is-active,
.theme-toggle {
  color: var(--text);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
  display: block;
}

.stack {
  display: grid;
  gap: 16px;
}

.popup {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.popup-inner {
  padding: 24px 24px 22px;
}

.hero {
  min-height: auto;
}

.content-device {
  margin: 0;
  width: min(100%, 260px);
  padding: 0;
}

.content-device img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.16));
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

h1 {
  max-width: 8ch;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.325rem, 6vw, 4.35rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 42rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.pill-list,
.spec-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill-list li,
.spec-list li {
  padding: 0.58rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.9rem;
}

.usecases-title {
  margin-top: 1.4rem;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.for-use-list {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: start;
  gap: 0.7rem;
}

.for-use-list li {
  width: fit-content;
}

.text-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.tiers {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 32px;
}

.tier {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  overflow: hidden;
}

.tier-head,
.tier-body,
.tier-foot {
  padding: 24px 26px;
}

.tier-head {
  display: grid;
  gap: 14px;
  align-items: start;
}

.tier-title-wrap h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.tier-price {
  text-align: left;
  font-family: "Manrope", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: normal;
}

.tier-price small {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0;
}

.tier-body {
  display: grid;
  gap: 0.95rem;
  color: var(--muted);
}

.tier-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.note {
  color: var(--muted);
  font-size: 0.92rem;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.team-role {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.site-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .text-row,
  .tiers,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .content-device {
    width: min(220px, 70%);
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100vw - 20px, 1040px);
    padding-top: 18px;
  }

  .top-controls {
    justify-content: flex-end;
  }

  .mini-control {
    height: 40px;
    padding: 0 12px;
  }

  .lang-switch button,
  .theme-toggle {
    font-size: 0.86rem;
  }

  .theme-toggle svg {
    width: 17px;
    height: 17px;
  }

  .popup {
    border-radius: 28px;
  }

  .popup-inner,
  .tier-head,
  .tier-body,
  .tier-foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .tier-head,
  .tier-foot {
    display: grid;
  }

  .tier-price {
    text-align: left;
  }

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

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

  .button-secondary,
  .button-primary {
    width: 100%;
    justify-content: center;
  }
}

.tiers-footer {
  padding-top: 30px;
}

.inquire-intro {
  margin-bottom: 1.4rem;
}

.inquire-form {
  display: grid;
  gap: 1rem;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field-group {
  display: grid;
  gap: 0.45rem;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.inquire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
  padding: 0.9rem 1rem;
  font: inherit;
}

.form-input:focus,
.selector-option:has(input:focus-visible) {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.selector-group {
  border: 0;
  margin: 0;
  padding: 0;
}

.option-selector {
  display: grid;
  gap: 0.5rem;
}

.option-selector-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.selector-option {
  position: relative;
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  cursor: pointer;
  padding: 0.8rem 0.75rem;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.selector-option:hover {
  border-color: rgba(23, 23, 23, 0.25);
  color: var(--text);
}

.selector-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.selector-option span {
  font-size: 0.92rem;
  font-weight: 600;
}

.selector-option:has(input:checked) {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg-top);
}

body.dark .selector-option:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

body.dark .selector-option:has(input:checked) {
  color: #111310;
}

@media (max-width: 620px) {
  .option-selector-three {
    grid-template-columns: 1fr;
  }
}

.form-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
}

.button-secondary {
  background: transparent;
}

.button-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.button-primary:hover {
  opacity: 0.9;
  background: var(--text);
  color: var(--bg);
}

.button-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* How-it-works block */
.feel-inner {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.more-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55em 1.2em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.more-btn:hover {
  background: var(--panel-strong);
  border-color: var(--text);
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  width: min(580px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.modal-box .popup-inner {
  padding-top: 28px;
}

.modal-scroll {
  max-height: calc(100vh - 88px);
  max-height: calc(100dvh - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: 10px 14px 18px 0;
  padding-right: 6px;
  padding-bottom: 10px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.modal-scroll::-webkit-scrollbar {
  width: 8px;
}

.modal-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.modal-scroll::-webkit-scrollbar-track-piece:start {
  margin-top: 12px;
}

.modal-scroll::-webkit-scrollbar-track-piece:end {
  margin-bottom: 14px;
}

.modal-scroll::-webkit-scrollbar-thumb {
  background-color: var(--line);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--text);
}

.modal-close svg {
  width: 14px;
  height: 14px;
  display: block;
}

.modal-box a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-box a:hover {
  opacity: 0.7;
}

@media (max-width: 620px) {
  .modal-overlay {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: none;
    overscroll-behavior: contain;
  }

  .modal-box {
    width: 100%;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    background: var(--bg-top);
    box-shadow: none;
    backdrop-filter: none;
  }

  .modal-box .popup-inner {
    padding: 22px 18px 24px;
  }

  .modal-scroll {
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 48px 0 calc(18px + env(safe-area-inset-bottom));
    scrollbar-gutter: auto;
    touch-action: pan-y;
  }

  .modal-close {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: 14px;
    z-index: 2;
    background: var(--panel-strong);
  }

  .inquire-intro {
    margin-bottom: 1rem;
  }

  .inquire-form {
    gap: 0.8rem;
  }

  .selector-option {
    min-height: 48px;
  }
}

/* ── Inline architecture diagram ── */
.arch-diagram {
  margin: 1.4rem 0 0;
  padding: 20px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  font-family: 'Inter', 'Instrument Sans', sans-serif;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

.arch-diagram * { box-sizing: border-box; margin: 0; padding: 0; }

.arch-diagram .tailnet-zone {
  border: 1.5px solid #e8e8e8;
  border-radius: 4px;
  padding: 24px 16px 18px;
  position: relative;
  background: #ffffff;
}
.arch-diagram .tailnet-label {
  position: absolute;
  top: -10px; left: 14px;
  background: #ffffff;
  padding: 0 7px;
  display: flex; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 600;
  color: #999; letter-spacing: 2px; text-transform: uppercase;
}
.arch-diagram .ts-dot {
  width: 5px; height: 5px;
  border-radius: 50%; background: #999;
}
.arch-diagram .slabel {
  font-size: 9px; font-weight: 600;
  color: #999; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 9px;
}
.arch-diagram .devices-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; margin-bottom: 18px;
}
.arch-diagram .device-card {
  border: 1px solid #e8e8e8; border-radius: 4px;
  padding: 10px 6px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-align: center; background: #f4f4f4;
}
.arch-diagram .d-emoji { font-size: 18px; line-height: 1; }
.arch-diagram .d-name { font-size: 10px; font-weight: 600; color: #0f0f0f; }
.arch-diagram .d-sub { font-size: 8px; color: #999; font-weight: 400; }
.arch-diagram .arrow-wrap {
  display: flex; flex-direction: column; align-items: center;
  margin: 0 0 16px;
}
.arch-diagram .arrow-shaft { width: 1px; height: 20px; background: #e8e8e8; }
.arch-diagram .arrow-head {
  width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 6px solid #e8e8e8;
}
.arch-diagram .arrow-txt {
  margin-top: 6px; font-size: 8px; font-weight: 500;
  color: #999; letter-spacing: 0.3px;
}
.arch-diagram .server-box {
  border: 1px solid #e8e8e8; border-radius: 4px;
  overflow: hidden; background: #ffffff;
}
.arch-diagram .hw-bar {
  background: #f4f4f4; border-bottom: 1px solid #e8e8e8;
  padding: 8px 14px;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.arch-diagram .hw-variant { font-size: 9px; font-weight: 500; color: #555; }
.arch-diagram .hw-sep { color: #e8e8e8; font-size: 11px; line-height: 1; }
.arch-diagram .server-body { padding: 14px; }
.arch-diagram .llm-row {
  border: 1px solid #e8e8e8; border-radius: 4px;
  padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; background: #f4f4f4;
}
.arch-diagram .llm-name { font-size: 11px; font-weight: 600; color: #0f0f0f; }
.arch-diagram .llm-sub { font-size: 8px; color: #999; margin-top: 2px; font-weight: 400; }
.arch-diagram .badge {
  font-size: 8px; font-weight: 600;
  border: 1px solid #e8e8e8; border-radius: 3px;
  padding: 2px 8px; color: #555; background: #ffffff;
  white-space: nowrap; letter-spacing: 0.3px;
}
.arch-diagram .containers-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.arch-diagram .con {
  border: 1px solid #e8e8e8; border-radius: 4px;
  padding: 9px 10px; background: #ffffff;
}
.arch-diagram .con.wide { grid-column: 1 / -1; }
.arch-diagram .con-name { font-size: 10px; font-weight: 600; color: #0f0f0f; margin-bottom: 5px; }
.arch-diagram .con-sub { font-size: 8px; color: #999; font-weight: 400; }
.arch-diagram .con-tags { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.arch-diagram .tag {
  font-size: 8px; font-weight: 500;
  border-radius: 3px; padding: 1px 6px;
  border: 1px solid #e8e8e8; color: #999; background: #f4f4f4;
}
.arch-diagram .divider {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 12px;
}
.arch-diagram .div-line { flex: 1; height: 1px; background: #e8e8e8; }
.arch-diagram .div-txt {
  font-size: 8px; font-weight: 600;
  color: #999; letter-spacing: 1.5px; text-transform: uppercase;
}
.arch-diagram .owui-row {
  border: 1px solid #e8e8e8; border-radius: 4px;
  padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: #f4f4f4;
}
.arch-diagram .owui-name { font-size: 11px; font-weight: 600; color: #0f0f0f; }
.arch-diagram .owui-sub { font-size: 8px; color: #999; margin-top: 2px; font-weight: 400; }
.arch-diagram .web-note {
  margin-top: 10px;
  border: 1px dashed #e8e8e8; border-radius: 4px;
  padding: 7px 12px; font-size: 8px; font-weight: 400;
  color: #999; line-height: 1.6;
}
.arch-diagram .web-note strong { color: #555; font-weight: 600; }
