/* AmneziaWG Web UI — the product page on the shared M3 contract (m3.css).
   Seed: orange (plus lime and pink as the tertiary accents the panel itself
   uses). Signature: the browser frame and the radial hero glow; it is the only
   page that leans on the larger end of the shape scale.

   IBM Plex Sans is self-hosted under the OFL; no external font requests. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --md-sys-color-primary: #ffb27a;
  --md-sys-color-on-primary: #3d1c00;
  --md-sys-color-tertiary: #c8f77f;
  --md-sys-color-surface: #0e0e11;
  --md-sys-color-surface-container-low: #101012;
  --md-sys-color-surface-container: #17181c;
  --md-sys-color-surface-container-high: #1c1d21;
  --md-sys-color-on-surface: #eaeaec;
  --md-sys-color-on-surface-variant: #a3a7ae;
  --md-sys-color-outline: #7c8087;
  --md-sys-color-outline-variant: #2b2b2b;

  /* Aliases: the rest of this file still speaks the old names. */
  --bg: var(--md-sys-color-surface);
  --bg-2: var(--md-sys-color-surface-container-low);
  --surface: var(--md-sys-color-surface-container);
  --surface-2: var(--md-sys-color-surface-container-high);
  --line: var(--md-sys-color-outline-variant);
  --line-2: var(--md-sys-color-outline);
  --text: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --dim: var(--md-sys-color-on-surface-variant);

  --orange: var(--md-sys-color-primary);
  --peach: var(--md-sys-color-primary);
  --lime: var(--md-sys-color-tertiary);
  --pink: #ff9ecb;

  --max: 1200px;
  --radius: var(--md-sys-shape-lg);
}

:root[data-theme="light"] {
  color-scheme: light;

  --md-sys-color-primary: #a84800;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-tertiary: #456b00;
  --md-sys-color-surface: #f3f3f5;
  --md-sys-color-surface-container-low: #eaeaee;
  --md-sys-color-surface-container: #ffffff;
  --md-sys-color-surface-container-high: #f5f5f7;
  --md-sys-color-on-surface: #111114;
  --md-sys-color-on-surface-variant: #52555c;
  --md-sys-color-outline: #7a7d85;
  --md-sys-color-outline-variant: #d8d8de;

  --pink: #a3005a;
}
:root[data-theme="light"] .browser { box-shadow: 0 40px 100px rgba(20, 20, 40, 0.18); }
:root[data-theme="light"] .hero::before { opacity: 0.55; }
:root[data-theme="light"] .hero::after { opacity: 0.45; }
:root[data-theme="light"] .site-footer { background: var(--bg-2); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Noto Sans", "Noto Sans TC", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--peach); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
code, pre { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo,
  Consolas, "Liberation Mono", monospace; }

.container {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-text { white-space: nowrap; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand img {
  width: 34px;
  height: 34px;
  border-radius: var(--md-sys-shape-md);
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}
.nav a { color: var(--muted); font-size: 0.94rem; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .nav-cta {
  padding: 9px 16px;
  border-radius: var(--md-sys-shape-full);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-weight: 600;
  transition: background-color var(--md-sys-motion-short) var(--md-sys-easing-standard);
}
.nav .nav-cta:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 92%,
    var(--md-sys-color-on-primary));
}
/* The language switch is the shared .nav .lang control in m3.css. */
@media (max-width: 900px) {
  .nav .hide-sm { display: none; }
  .site-header .container { min-height: 64px; }
}

@media (max-width: 480px) {
  .site-header .container { gap: 12px; }
  .brand { font-size: 0.96rem; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .brand-sub { display: none; }
  .nav { gap: 10px; }
  .nav-cta { display: none; }
  .theme-toggle { padding: 5px 9px; font-size: 0.68rem; }
  .lang { padding: 4px 9px; }
}
@media (max-width: 380px) {
  .brand-text { display: none; }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 0;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -520px;
  width: 1080px;
  height: 1080px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(174, 241, 81, 0.28), transparent 34%),
    radial-gradient(circle at 68% 28%, rgba(237, 112, 10, 0.4), transparent 38%),
    radial-gradient(circle at 54% 74%, rgba(207, 0, 112, 0.28), transparent 40%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 69px,
      rgba(234, 234, 236, 0.07) 70px 71px),
    var(--bg-2);
  mask-image: radial-gradient(circle, #000 42%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 42%, transparent 70%);
  opacity: 0.9;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 42% at 50% 8%, rgba(237, 112, 10, 0.16), transparent 70%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--md-sys-shape-full);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(174, 241, 81, 0.8);
}
h1 {
  margin: 24px auto 20px;
  max-width: 900px;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h1 .grad {
  background: linear-gradient(95deg, var(--peach), var(--lime) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 0 auto 30px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.btn { font-weight: 600; }

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 52px;
}
.pill {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--md-sys-shape-full);
  color: var(--muted);
  font-size: 0.78rem;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

/* Dashboard frame */

.browser {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--md-sys-shape-xl);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  text-align: left;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px 12px;
}
.browser-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-2);
}
.browser-bar span:first-child { background: var(--orange); }
.browser-bar span:nth-child(2) { background: var(--peach); }
.browser-bar span:nth-child(3) { background: var(--lime); }
.browser-url {
  flex: 1;
  margin-left: 10px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--md-sys-shape-full);
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser img {
  width: 100%;
  height: auto;
  border-radius: var(--md-sys-shape-md);
  border: 1px solid var(--line);
}

/* Sections */

section { padding: 88px 0; }
section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.section-head {
  max-width: 780px;
  margin: 0 auto 46px;
  text-align: center;
}
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.section-head p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Cards */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--md-sys-motion-short) var(--md-sys-easing-standard),
    background-color var(--md-sys-motion-short) var(--md-sys-easing-standard);
}
.card:hover {
  border-color: var(--line-2);
  background-color: color-mix(in srgb, var(--orange) 6%, var(--surface));
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0, transparent 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.card:nth-child(3n + 1) {
  background:
    radial-gradient(120% 110% at 0% 0%, rgba(237, 112, 10, 0.24), transparent 58%),
    var(--surface);
}
.card:nth-child(3n + 2) {
  background:
    radial-gradient(120% 110% at 0% 0%, rgba(174, 241, 81, 0.14), transparent 58%),
    var(--surface);
}
.card:nth-child(3n) {
  background:
    radial-gradient(120% 110% at 0% 0%, rgba(207, 0, 112, 0.18), transparent 58%),
    var(--surface);
}
.card h3 {
  margin: 18px 0 8px;
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--md-sys-shape-md);
  background: var(--surface-2);
  color: var(--peach);
}
.card:nth-child(3n + 2) .icon { color: var(--lime); }
.card:nth-child(3n) .icon { color: var(--pink); }
.icon svg { width: 21px; height: 21px; }

@media (max-width: 1050px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid { grid-template-columns: 1fr; } }

/* Two-column panel */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.checks { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.checks li {
  min-width: 0;
  overflow-wrap: anywhere;
  padding-left: 18px;
  border-left: 2px solid var(--orange);
  color: var(--muted);
  font-size: 0.93rem;
}
.split > * { min-width: 0; }
.checks strong { color: var(--text); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; padding: 24px; }
}

/* Deploy steps */

.steps { counter-reset: step; display: grid; gap: 16px; }
.step {
  counter-increment: step;
  position: relative;
  min-width: 0;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: var(--md-sys-shape-md);
  background: linear-gradient(135deg, var(--orange), var(--pink));
  color: var(--md-sys-color-on-primary);
  font-size: 0.78rem;
  font-weight: 700;
}
.step h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 600; }
.step p { margin: 0 0 14px; color: var(--muted); font-size: 0.94rem; }

/* Code */

pre {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--md-sys-shape-md);
  background: #0a0a0c;
  color: #d7d8db;
  font-size: 0.84rem;
  line-height: 1.65;
  overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.copy-wrap { position: relative; min-width: 0; padding-top: 34px; }
.copy-wrap pre { padding-right: 18px; max-width: 100%; }
.copy {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--md-sys-shape-full);
  background: var(--surface-2);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}
.copy:hover { border-color: var(--peach); color: var(--peach); }
.copy.ok { border-color: var(--lime); color: var(--lime); }

.note {
  margin: 22px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--orange);
  border-radius: 0 var(--md-sys-shape-md) var(--md-sys-shape-md) 0;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.92rem;
}
.note strong { color: var(--text); }

/* Technical details */

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin: 0;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.specs div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.specs dt { color: var(--muted); font-size: 0.9rem; }
.specs dd { margin: 0; font-size: 0.93rem; overflow-wrap: anywhere; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

/* FAQ */

.faq { display: grid; gap: 10px; max-width: 880px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--md-sys-shape-lg);
  background: var(--surface);
  padding: 18px 22px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-size: 1.02rem;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--peach);
  font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--muted); font-size: 0.94rem; }

/* Inline code */

code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: var(--md-sys-shape-xs);
  background: var(--surface-2);
  color: var(--peach);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: #0a0a0c;
  padding: 44px 0 56px;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 40px;
}
.site-footer .fine { max-width: 640px; line-height: 1.6; }
.site-footer strong { color: var(--text); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--peach); }

@media (max-width: 900px) {
  section { padding: 64px 0; }
  .hero { padding-top: 64px; }
  .hero::before { width: 760px; height: 760px; bottom: -380px; }
  .browser { padding: 7px; }
  .browser-bar { padding: 2px 4px 9px; }
  .specs { grid-template-columns: 1fr; padding: 22px; }
  .specs div { grid-template-columns: 120px 1fr; }
  .site-footer .container { display: block; }
  .site-footer nav { margin-top: 18px; }
}

