:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-elevated: #111c31;
  --panel: #172033;
  --panel-soft: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-text: #082f49;
  --warning: #facc15;
  --shadow: 0 18px 55px rgb(2 6 23 / 0.28);
  --container: 1180px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-elevated: #eef2f7;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --border: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-text: #ffffff;
  --warning: #92400e;
  --shadow: 0 18px 55px rgb(15 23 42 / 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button { font: inherit; }
a { color: inherit; }
svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}
.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand strong { font-size: 0.98rem; }
.brand-mark-image {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  border-radius: 14px;
  background: #d9d9d9;
}
.brand-mark-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.switch-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.switch-button {
  min-width: 46px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}
.switch-button.is-active {
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  color: var(--accent);
}
.icon-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.icon-button:hover { border-color: var(--accent); }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: block; }
.theme-label { font-size: 0.84rem; font-weight: 650; }
.hero-minimal {
  position: relative;
  overflow: hidden;
  padding: 76px 0 58px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 78% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-elevated));
}
.hero-minimal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 40%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 40%, transparent) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.hero-minimal-inner { position: relative; }
h1, h2, p { margin-top: 0; }
h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.4rem, 5.3vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}
.tools-section { padding: 32px 0 84px; }
.tool-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--border);
  box-shadow: var(--shadow);
}
.constructor-card {
  min-width: 0;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--panel);
  transition: background 150ms ease;
}
.constructor-card:hover {
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
}
.constructor-card.featured {
  background: color-mix(in srgb, var(--warning) 4%, var(--panel));
}
.card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: var(--accent);
}
.card-icon svg { width: 27px; height: 27px; }
.status {
  align-self: flex-start;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
}
.status-development {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.status-planned {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 8%, transparent);
}
.constructor-card h2 {
  margin: 18px 0 9px;
  font-size: 1.28rem;
}
.constructor-card p {
  flex-grow: 1;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 750;
}
.button-disabled {
  width: 100%;
  border-color: var(--border);
  background: var(--panel-soft);
  color: var(--muted);
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 3px;
}
@media (max-width: 900px) {
  .tool-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .header-inner { min-height: 64px; }
  .theme-label { display: none; }
  .switch-button { min-width: 40px; min-height: 32px; padding-inline: 8px; }
  .hero-minimal { padding: 58px 0 48px; }
  h1 { font-size: clamp(2.35rem, 13vw, 3.6rem); }
  .tools-section { padding: 22px 0 58px; }
  .tool-wall { grid-template-columns: 1fr; }
  .constructor-card { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
