:root {
  --bg: #0b0f1a;
  --surface: #151b2b;
  --surface-alt: #0f1422;
  --text: #e8ecf5;
  --muted: #9aa4b8;
  --primary: #5b34eb;
  --primary-hover: #4c26d9;
  --accent: #22d3ee;
  --border: rgba(154, 164, 184, 0.18);
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

h1 { font-size: 44px; letter-spacing: -0.02em; }
h2 { font-size: 32px; letter-spacing: -0.015em; }
h3 { font-size: 20px; }

p {
  margin: 0;
  max-width: 70ch;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 26, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand .gf-site-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.brand-dot { color: var(--accent); }

.brand-tag {
  font-size: 12px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.site-nav a:hover { color: var(--accent); }

/* Buttons */
.btn-primary, .btn-outline, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-primary:focus-visible, .btn-outline:focus-visible, .btn-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--accent);
}

.btn-secondary:hover { border-color: var(--accent); }

.btn-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
}

/* Sections */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.hero-section {
  padding: 36px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero-splitter-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 28px;
  align-items: start;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.hero-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.companion-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.companion-link-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.15s ease;
}

.companion-link-card:hover {
  border-color: var(--accent);
}

.companion-link-card strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
}

.companion-link-card span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
}

.hero-tagline {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.45;
}

.before-after-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 12px;
  align-items: start;
}

.ba-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.ba-card img.ba-before-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  object-fit: cover;
}

.after-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.after-thumb-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.ba-caption {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 8px;
  font-size: 14px;
}

.specs-table th, .specs-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.specs-table th {
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
  width: 30%;
}

.specs-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

/* Tool Grids */
.tool-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: stretch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.dropzone {
  border: 2px dashed rgba(34, 211, 238, 0.35);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  background: var(--surface-alt);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
}

.dropzone-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.dropzone-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.control-group {
  margin-top: 16px;
}

.control-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}

.seg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg-grid-3 { grid-template-columns: repeat(3, 1fr); }
.seg-grid-4 { grid-template-columns: repeat(4, 1fr); }

.seg-btn {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.seg-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
}

.input-field, .select-field {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}

.input-field:focus, .select-field:focus {
  outline: none;
  border-color: var(--accent);
}

.slices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.slices-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.slice-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.slice-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0d121f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slice-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slice-dl {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(11, 15, 26, 0.85);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.slice-dl:hover { border-color: var(--accent); color: var(--accent); }

.slice-foot {
  padding: 8px;
  border-top: 1px solid var(--border);
}

.empty-state {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: var(--muted);
}

/* Prompt Output */
.prompt-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.prompt-box + .prompt-box {
  margin-top: 16px;
}

.prompt-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.prompt-lang {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.prompt-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

/* 3D Showcase */
.model-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-btn {
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.model-btn.active {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
}

.model-btn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
}

.model-size {
  font-size: 12px;
  color: var(--accent);
}

.model-cat {
  font-size: 12px;
  color: var(--primary);
  margin-top: 4px;
  font-weight: 600;
}

.model-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.viewer-frame {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.viewer-canvas {
  flex: 1;
  min-height: 380px;
}

.viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* Workflow & Article Body */
.workflow-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.workflow-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.guide-prose {
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.guide-prose h3 {
  margin-top: 16px;
  margin-bottom: 8px;
}

.guide-prose p {
  color: var(--muted);
  margin-bottom: 12px;
}

.guide-prose ul {
  color: var(--muted);
  padding-left: 20px;
  margin: 0 0 12px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* Legal & Generic Inner Page */
.prose-page {
  padding: 48px 0 64px;
}

.prose-page h1 {
  margin-bottom: 16px;
}

.prose-page h2 {
  font-size: 22px;
  margin-top: 28px;
  margin-bottom: 10px;
}

.prose-page p {
  color: var(--muted);
  margin-bottom: 12px;
}

/* Footer */
.site-footer {
  padding: 32px 0;
  background: #080b13;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-title {
  font-weight: 600;
  font-size: 14px;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links a:hover { color: var(--accent); }

@media (max-width: 640px) {
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  .site-nav { display: none; }
  .tool-grid, .two-col, .showcase-grid, .slices-grid, .slices-grid.cols-2, .hero-splitter-grid, .companion-links, .before-after-grid {
    grid-template-columns: 1fr;
  }
  .workflow-item {
    grid-template-columns: 1fr;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
  }
}
