/* smallwebhost — shared styles */
:root {
  /* Theme: Fresh Green (default) */
  --bg: oklch(0.985 0.008 130);
  --bg-alt: oklch(0.96 0.02 145);
  --ink: oklch(0.22 0.03 155);
  --ink-soft: oklch(0.42 0.02 155);
  --ink-mute: oklch(0.58 0.015 155);
  --line: oklch(0.9 0.02 145);
  --accent: oklch(0.68 0.16 155);
  --accent-deep: oklch(0.42 0.13 155);
  --accent-soft: oklch(0.94 0.06 150);
  --card: oklch(1 0 0);
  --shadow: 0 1px 2px oklch(0.3 0.05 155 / 0.06), 0 8px 24px oklch(0.3 0.05 155 / 0.05);

  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;

  --nav-h: 68px;
  --maxw: 1200px;
}

/* Theme: Midnight Terminal */
:root[data-theme="midnight"] {
  --bg: oklch(0.16 0.02 155);
  --bg-alt: oklch(0.21 0.025 155);
  --ink: oklch(0.96 0.02 130);
  --ink-soft: oklch(0.78 0.02 145);
  --ink-mute: oklch(0.6 0.02 145);
  --line: oklch(0.3 0.03 155);
  --accent: oklch(0.82 0.19 145);
  --accent-deep: oklch(0.72 0.2 145);
  --accent-soft: oklch(0.26 0.06 150);
  --card: oklch(0.2 0.025 155);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.4), 0 12px 32px oklch(0 0 0 / 0.35);
}

/* Theme: Cream & Ink */
:root[data-theme="cream"] {
  --bg: oklch(0.97 0.02 85);
  --bg-alt: oklch(0.93 0.035 85);
  --ink: oklch(0.2 0.02 60);
  --ink-soft: oklch(0.4 0.02 60);
  --ink-mute: oklch(0.55 0.02 60);
  --line: oklch(0.85 0.03 80);
  --accent: oklch(0.55 0.15 155);
  --accent-deep: oklch(0.38 0.13 155);
  --accent-soft: oklch(0.9 0.06 140);
  --card: oklch(0.99 0.01 85);
  --shadow: 0 1px 2px oklch(0.3 0.05 80 / 0.08), 0 10px 28px oklch(0.3 0.05 80 / 0.07);
}

/* Font swap */
:root[data-font="nunito"] { --font-display: 'Nunito', system-ui, sans-serif; --font-body: 'Nunito', system-ui, sans-serif; }
:root[data-font="fraunces"] { --font-display: 'Fraunces', Georgia, serif; --font-body: 'DM Sans', system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.25; }
p { margin: 0; text-wrap: pretty; color: var(--ink-soft); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-deep), var(--accent));
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px; border-radius: 4px;
  background: var(--bg);
}
.brand-logo { height: 36px; width: auto; display: block; }
:root[data-theme="midnight"] .brand-logo { background: #fff; border-radius: 6px; padding: 3px 6px; box-sizing: content-box; }

/* ---- Language switch ---- */
.lang-switch {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); margin-right: 4px;
}
.lang-switch button {
  border: 0; background: transparent; color: var(--ink-soft);
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; line-height: 1.4;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.on { background: var(--ink); color: var(--bg); }
.lang-switch.floating { position: fixed; top: 16px; right: 16px; z-index: 100; box-shadow: var(--shadow); }
:lang(zh-Hant), :lang(zh-Hans) { --font-body: 'DM Sans', 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif; --font-display: var(--font-body); }
:lang(zh-Hans) { --font-body: 'DM Sans', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif; }
:lang(zh-Hant) h1, :lang(zh-Hans) h1, :lang(zh-Hant) h2, :lang(zh-Hans) h2 { letter-spacing: -0.01em; line-height: 1.15; }
:lang(zh-Hant) .eyebrow, :lang(zh-Hans) .eyebrow { letter-spacing: 0.08em; }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; color: var(--ink-soft);
  font-size: 14.5px; font-weight: 500; transition: 0.15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-links a.active { color: var(--ink); background: var(--accent-soft); }
.nav-cta { display: flex; gap: 8px; align-items: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: transform 0.12s, background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent-deep); color: white; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }

/* ---- Sections ---- */
section { padding: 88px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent-deep); font-weight: 500;
}
.eyebrow::before {
  content: ""; width: 20px; height: 1px; background: var(--accent-deep);
}
.sec-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 48px; max-width: 720px; }
.sec-head .zh { color: var(--ink-mute); font-size: 15px; font-weight: 400; letter-spacing: 0.02em; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  background: var(--bg-alt);
  margin-top: 40px;
}
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; margin-bottom: 48px; }
.foot-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-mute); margin-bottom: 16px; font-weight: 600; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { color: var(--ink-soft); font-size: 14.5px; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-mute);
  font-family: var(--font-mono);
}

/* ---- Utilities ---- */
.mono { font-family: var(--font-mono); }
.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}

/* ---- Sub-nav (Hosting: Plans / Features / Compare) ---- */
.subnav {
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
}
.subnav-inner { display: flex; gap: 4px; align-items: center; height: 52px; overflow-x: auto; }
.subnav-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); margin-right: 12px; white-space: nowrap;
}
.subnav a {
  padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--ink-soft); white-space: nowrap; transition: 0.15s;
}
.subnav a:hover { color: var(--ink); background: var(--bg-alt); }
.subnav a.on { background: var(--ink); color: var(--bg); }

/* Abstract shapes */
.shape {
  position: absolute; border-radius: 50%; filter: blur(60px);
  opacity: 0.5; pointer-events: none;
}

@media (max-width: 860px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 64px 0; }
  .nav-links { display: none; }
}

/* Translated CSS-generated labels */
:lang(zh-Hant) .plan.popular::before { content: "最受歡迎"; letter-spacing: 0.1em; }
:lang(zh-Hans) .plan.popular::before { content: "最受欢迎"; letter-spacing: 0.1em; }
