/* ============================================
   RAMTECH – Design Tokens & Theme Engine
   ============================================ */

:root {
  /* === Official RAMTECH Theme (Default Dark) === */
  --rt-bg-primary: #09090b;
  --rt-bg-secondary: #101012;
  --rt-bg-elevated: #18181b;
  --rt-bg-card: #1c1c1f;

  --rt-text-primary: #f4f4f5;
  --rt-text-secondary: #a1a1aa;
  --rt-text-muted: #92929b;

  --rt-accent: #c4b8a8;
  --rt-accent-hover: #e0d8cc;
  --rt-metallic: #c4b8a8;
  --rt-border: rgba(255, 255, 255, 0.08);
  --rt-border-strong: rgba(255, 255, 255, 0.14);

  --rt-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --rt-glow: 0 0 40px rgba(192, 192, 200, 0.08);

  --rt-font-display: "Inter", system-ui, -apple-system, sans-serif;
  --rt-font-body: "Inter", system-ui, -apple-system, sans-serif;

  --rt-radius-sm: 6px;
  --rt-radius-md: 12px;
  --rt-radius-lg: 20px;

  --rt-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --rt-bg-primary: #f8f8f9;
  --rt-bg-secondary: #ffffff;
  --rt-bg-elevated: #f1f1f3;
  --rt-bg-card: #ffffff;

  --rt-text-primary: #18181b;
  --rt-text-secondary: #52525b;
  --rt-text-muted: #62626b;

  --rt-accent: #52525b;
  --rt-accent-hover: #18181b;
  --rt-metallic: #52525b;
  --rt-border: rgba(0, 0, 0, 0.08);
  --rt-border-strong: rgba(0, 0, 0, 0.14);

  --rt-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
  --rt-glow: 0 0 40px rgba(0, 0, 0, 0.04);
}

[data-theme="titanium"] {
  --rt-bg-primary: #0c0c0e;
  --rt-bg-secondary: #141416;
  --rt-bg-elevated: #1a1a1d;
  --rt-bg-card: #1e1e22;
  --rt-accent: #b8ad9f;
  --rt-accent-hover: #ddd4c7;
  --rt-metallic: #a99f93;
  --rt-text-muted: #92929b;
}

[data-theme="obsidian"] {
  --rt-bg-primary: #050505;
  --rt-bg-secondary: #0d0d0d;
  --rt-bg-elevated: #151515;
  --rt-bg-card: #1a1a1a;
  --rt-accent: #d4d4d8;
  --rt-accent-hover: #fafafa;
  --rt-metallic: #a1a1aa;
  --rt-text-muted: #92929b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; font-size: 16px; }
body {
  font-family: var(--rt-font-body);
  background: var(--rt-bg-primary);
  color: var(--rt-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--rt-transition), color var(--rt-transition);
}

#canvas-container { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 850ms cubic-bezier(0.22, 1, 0.36, 1);
}
#canvas-container canvas.is-ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  #canvas-container canvas { transition: none; }
}

#ui-layer { position: relative; z-index: 10; pointer-events: none; }
#ui-layer > * { pointer-events: auto; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(to bottom, rgba(10,10,11,0.85), transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background var(--rt-transition);
}
[data-theme="light"] .nav {
  background: linear-gradient(to bottom, rgba(248,248,249,0.9), transparent);
}
.nav-logo {
  font-size: 1.15rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--rt-text-primary);
  text-decoration: none; display: flex; align-items: center; gap: 0.6rem;
}
.nav-logo-mark {
  width: 28px; height: 28px; border: 1.5px solid var(--rt-accent);
  border-radius: 4px; display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; color: var(--rt-accent);
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--rt-text-secondary); text-decoration: none;
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.04em;
  transition: color var(--rt-transition);
}
.nav-links a:hover { color: var(--rt-text-primary); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }

.theme-switcher {
  display: flex; gap: 0.4rem; background: var(--rt-bg-elevated);
  padding: 0.3rem; border-radius: 999px; border: 1px solid var(--rt-border);
}
.theme-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--rt-text-muted);
  display: grid; place-items: center; transition: all var(--rt-transition); font-size: 0.85rem;
}
.theme-btn:hover, .theme-btn.active {
  background: var(--rt-bg-card); color: var(--rt-text-primary); box-shadow: var(--rt-shadow);
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.35rem; background: var(--rt-text-primary); color: var(--rt-bg-primary);
  border: none; border-radius: 999px; font-size: 0.875rem; font-weight: 560;
  cursor: pointer; transition: all var(--rt-transition); text-decoration: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--rt-glow); }

.scroll-content { position: relative; z-index: 5; }
.section {
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: 6rem 2.5rem; position: relative;
}
.section-inner {
  max-width: 1280px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.section-content { max-width: 520px; }
.section-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--rt-metallic); margin-bottom: 1.25rem;
}
.section-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 600;
  line-height: 1.15; letter-spacing: -0.03em;
  color: var(--rt-text-primary); margin-bottom: 1.5rem;
}
.section-desc {
  font-size: 1.05rem; color: var(--rt-text-secondary);
  line-height: 1.7; margin-bottom: 2rem;
}

.hero {
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 0 2rem;
}
.hero-content { max-width: 780px; }
.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--rt-text-primary) 0%, var(--rt-metallic) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle {
  font-size: 1.2rem; color: var(--rt-text-secondary);
  margin-bottom: 2.5rem; max-width: 480px; margin-left: auto; margin-right: auto;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-outline {
  display: inline-flex; align-items: center; padding: 0.65rem 1.35rem;
  background: transparent; color: var(--rt-text-primary);
  border: 1px solid var(--rt-border-strong); border-radius: 999px;
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: all var(--rt-transition); text-decoration: none;
}
.btn-outline:hover { background: var(--rt-bg-elevated); border-color: var(--rt-accent); }

.service-list { display: flex; flex-direction: column; gap: 1rem; }
.service-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--rt-bg-card);
  border: 1px solid var(--rt-border); border-radius: var(--rt-radius-md);
  transition: all var(--rt-transition);
}
.service-item:hover { border-color: var(--rt-border-strong); transform: translateX(6px); }
.service-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--rt-bg-elevated);
  display: grid; place-items: center; font-size: 1.1rem; color: var(--rt-accent);
}
.service-info h4 { font-size: 0.95rem; font-weight: 560; margin-bottom: 0.15rem; }
.service-info p { font-size: 0.8rem; color: var(--rt-text-muted); }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--rt-accent); width: 0%; z-index: 200; transition: width 0.1s linear;
}

.theme-panel {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 150;
  background: var(--rt-bg-card); border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-lg); padding: 1rem 1.25rem; box-shadow: var(--rt-shadow);
  max-width: 280px;
}
.theme-panel h4 {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--rt-text-muted); margin-bottom: 0.75rem;
}
.theme-options { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.theme-option {
  padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--rt-border);
  background: transparent; color: var(--rt-text-secondary); font-size: 0.8rem;
  cursor: pointer; transition: all var(--rt-transition);
}
.theme-option:hover, .theme-option.active {
  background: var(--rt-text-primary); color: var(--rt-bg-primary); border-color: transparent;
}

@media (max-width: 900px) {
  .nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  .section { padding: 4rem 1.25rem; }
  .section-inner { grid-template-columns: 1fr; gap: 2rem; }
  .section-content { max-width: 100%; }
  .hero-title { font-size: clamp(2.4rem, 9vw, 3.8rem); }
  .theme-panel { bottom: 1rem; right: 1rem; left: 1rem; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

#loader {
  position: fixed; inset: 0; z-index: 9999; background: var(--rt-bg-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { font-size: 1.4rem; font-weight: 600; letter-spacing: 0.25em; color: var(--rt-text-primary); }
.loader-bar { width: 120px; height: 2px; background: var(--rt-bg-elevated); border-radius: 2px; overflow: hidden; }
.loader-bar-fill { height: 100%; width: 0%; background: var(--rt-accent); transition: width 0.3s ease; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.product-card {
  background: var(--rt-bg-card);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-md);
  padding: 1rem;
  transition: border-color var(--rt-transition), transform var(--rt-transition);
}
.product-card:hover {
  border-color: var(--rt-border-strong);
  transform: translateY(-2px);
}
.product-card h4 {
  font-size: 0.9rem;
  font-weight: 560;
  margin-bottom: 0.25rem;
}
.product-card p {
  font-size: 0.75rem;
  color: var(--rt-text-muted);
}

.process-steps {
  margin-top: 1.25rem;
  padding-left: 1.25rem;
  color: var(--rt-text-secondary);
  font-size: 0.95rem;
  line-height: 1.9;
}

.demo-form {
  margin-top: 1.5rem;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-row label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rt-text-muted);
}
.form-row input,
.form-row select,
.form-row textarea {
  background: var(--rt-bg-elevated);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--rt-text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--rt-transition);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--rt-accent);
}
.demo-notice {
  font-size: 0.8rem;
  color: var(--rt-text-muted);
  line-height: 1.5;
  padding: 0.75rem 1rem;
  background: var(--rt-bg-elevated);
  border-radius: var(--rt-radius-sm);
  border-left: 3px solid var(--rt-metallic);
}
.contact-placeholder {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--rt-text-secondary);
  line-height: 1.7;
}
.footer-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--rt-text-muted);
}
.loader-note {
  font-size: 0.8rem;
  color: var(--rt-text-muted);
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rt-border);
  color: var(--rt-text-primary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
}
.mobile-nav[hidden] { display: none !important; }
.mobile-nav {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--rt-bg-secondary);
  border-bottom: 1px solid var(--rt-border);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 90;
}
.mobile-nav a {
  color: var(--rt-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.5rem 0;
}
.mobile-nav a:hover { color: var(--rt-text-primary); }

@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links, .nav-actions .btn-primary { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { transition: none; }
}


/* Printer category index – restrained editorial product taxonomy */
.printer-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.5rem;
}
.printer-category {
  position: relative;
  min-height: 112px;
  padding: 1rem 0.9rem 0.85rem;
  overflow: hidden;
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-md);
  background: linear-gradient(145deg, var(--rt-bg-card), var(--rt-bg-elevated));
  transition: border-color var(--rt-transition), transform var(--rt-transition);
}
.printer-category:hover {
  border-color: var(--rt-border-strong);
  transform: translateY(-2px);
}
.printer-category-index {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--rt-text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
.printer-category h4 {
  margin: 0 0 0.3rem;
  color: var(--rt-text-primary);
  font-size: 0.88rem;
  font-weight: 600;
}
.printer-category p {
  margin: 0;
  color: var(--rt-text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .printer-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .printer-category-grid { gap: 0.5rem; }
  .printer-category { min-height: 104px; padding: 0.8rem 0.7rem; }
  .printer-category p { font-size: 0.68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .printer-category { transition: none; }
  .printer-category:hover { transform: none; }
}


/* Visible keyboard focus for navigation, theme controls and inquiry form. */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--rt-accent);
  outline-offset: 3px;
}


/* Mobile browser viewport and touch refinements (Android Chrome + iOS Safari). */
html { min-height: 100%; }
body { min-height: 100%; overscroll-behavior-x: none; }
@supports (height: 100svh) {
  #canvas-container { height: 100svh; }
}
@media (max-width: 900px) {
  .nav {
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }
  .nav-toggle { min-width: 44px; min-height: 44px; }
  .mobile-nav {
    top: calc(60px + env(safe-area-inset-top, 0px));
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    max-height: calc(100svh - 76px - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mobile-nav a { min-height: 44px; display: flex; align-items: center; }
  .theme-panel {
    bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    left: max(0.65rem, env(safe-area-inset-left, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .theme-panel h4 { display: none; }
  .theme-options { justify-content: center; gap: 0.35rem; }
  .theme-option { min-width: 44px; min-height: 44px; padding: 0.35rem 0.8rem; }
  .section { scroll-margin-top: calc(4.5rem + env(safe-area-inset-top, 0px)); }
  .form-row input, .form-row select, .form-row textarea { font-size: 16px; }
}
@media (max-width: 420px) {
  .theme-option { padding-left: 0.65rem; padding-right: 0.65rem; }
}
@media (max-height: 500px) and (max-width: 900px) {
  .theme-panel { display: none; }
  .mobile-nav { max-height: calc(100svh - 68px); }
}


/* Accessible non-WebGL / startup fallback. */
.scene-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 2rem;
  background: var(--rt-bg-primary);
  color: var(--rt-text-primary);
  text-align: center;
  font-family: var(--rt-font-body);
}
.scene-fallback h2 {
  margin-bottom: 1rem;
  letter-spacing: 0.12em;
  font-size: 1.25rem;
}
.scene-fallback p {
  max-width: 380px;
  color: var(--rt-text-secondary);
  line-height: 1.7;
}


/* Temporary overlay shown only while a lost WebGL context is being restored. */
.scene-fallback-overlay {
  position: absolute;
  inset: 0;
  min-height: 0;
  z-index: 2;
  background: var(--rt-bg-primary);
  pointer-events: none;
}


/* Unified four-theme control: desktop uses the floating selector; mobile
   places the same choices inside the navigation drawer to prevent collisions. */
@media (max-width: 900px) {
  .theme-panel { display: none; }
  .mobile-nav {
    top: calc(60px + env(safe-area-inset-top, 0px));
    bottom: 0;
    max-height: none;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    background: var(--rt-bg-secondary);
    box-shadow: var(--rt-shadow);
  }
  .mobile-theme-group {
    margin-top: 0.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rt-border);
  }
  .mobile-theme-label {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--rt-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .mobile-theme-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .mobile-theme-options .theme-option {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}
@media (max-width: 420px) {
  .nav { padding-left: max(0.75rem, env(safe-area-inset-left, 0px)); padding-right: max(0.75rem, env(safe-area-inset-right, 0px)); }
  .nav-logo { font-size: 1rem; letter-spacing: 0.14em; }
  .mobile-nav { padding-left: max(1rem, env(safe-area-inset-left, 0px)); padding-right: max(1rem, env(safe-area-inset-right, 0px)); }
}


/* Keyboard skip link and compact-screen layout safeguards. */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10001;
  padding: 0.7rem 1rem;
  transform: translateY(-180%);
  border-radius: 999px;
  background: var(--rt-text-primary);
  color: var(--rt-bg-primary);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { transform: translateY(0); }
.demo-notice-confirmed { border-left-color: var(--rt-accent); }
.demo-form button:disabled { cursor: default; opacity: 0.78; transform: none; }
@media (max-width: 600px) {
  .section-inner, .section-content, .hero-content,
  .product-grid, .printer-category-grid { min-width: 0; max-width: 100%; }
  .section-title, .hero-title, .section-desc,
  .product-card p, .printer-category p { overflow-wrap: anywhere; }
  .service-item { min-width: 0; padding: 0.85rem; gap: 0.75rem; }
  .service-info { min-width: 0; }
  .service-info p { overflow-wrap: anywhere; }
  .product-grid { gap: 0.6rem; }
  .product-card { min-width: 0; padding: 0.85rem; }
  .hero { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 360px) {
  .section { padding-left: 0.9rem; padding-right: 0.9rem; }
  .hero-title { font-size: clamp(2.25rem, 12vw, 3rem); }
  .section-title { font-size: clamp(1.8rem, 9vw, 2.35rem); }
  .printer-category { padding: 0.75rem 0.65rem; }
  .printer-category h4 { font-size: 0.82rem; }
  .printer-category p { font-size: 0.66rem; }
  .nav-logo { font-size: 0.92rem; }
}


/* Keep the final section clear of the iOS home-indicator safe area. */
.footer-section {
  padding-bottom: max(6rem, calc(6rem + env(safe-area-inset-bottom, 0px)));
}
@media (max-width: 900px) {
  .footer-section {
    padding-bottom: max(5rem, calc(5rem + env(safe-area-inset-bottom, 0px)));
  }
}


/* Keep the light-theme hero gradient comfortably readable on pale surfaces. */
[data-theme="light"] .hero-title {
  background-image: linear-gradient(135deg, #18181b 0%, #52525b 100%);
}


/* Responsive reading surfaces: keep the 3D world visible while protecting
   service copy from busy geometry behind it on narrow and tablet layouts. */
@media (max-width: 900px) {
  .section:not(.hero) .section-content {
    position: relative;
    min-width: 0;
    padding: clamp(1.1rem, 4vw, 1.65rem);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    background: rgba(10, 10, 11, 0.88);
    background: color-mix(in srgb, var(--rt-bg-primary) 84%, transparent);
    box-shadow: var(--rt-shadow);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  .hero-content {
    position: relative;
    isolation: isolate;
  }
  .hero-content::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -1.25rem -1.5rem;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(10, 10, 11, 0.82) 0%, transparent 72%);
    background: radial-gradient(
      ellipse at center,
      color-mix(in srgb, var(--rt-bg-primary) 78%, transparent) 0%,
      transparent 72%
    );
    pointer-events: none;
  }
}

@media (max-width: 900px) {
  [data-theme="light"] .section:not(.hero) .section-content {
    background: rgba(248, 248, 249, 0.92);
    background: color-mix(in srgb, var(--rt-bg-primary) 84%, transparent);
  }
  [data-theme="light"] .hero-content::before {
    background: radial-gradient(ellipse at center, rgba(248, 248, 249, 0.88) 0%, transparent 72%);
    background: radial-gradient(
      ellipse at center,
      color-mix(in srgb, var(--rt-bg-primary) 78%, transparent) 0%,
      transparent 72%
    );
  }
}

/* Keep the loading transition calm for visitors who request reduced motion. */
@media (prefers-reduced-motion: reduce) {
  #loader,
  .loader-bar-fill {
    transition: none !important;
    animation: none !important;
  }
}


/* Ultra-narrow phone refinement: preserve readable hierarchy at 320 px. */
@media (max-width: 320px) {
  .nav { padding-left: max(0.6rem, env(safe-area-inset-left, 0px)); padding-right: max(0.6rem, env(safe-area-inset-right, 0px)); }
  .nav-logo { gap: 0.4rem; font-size: 0.86rem; letter-spacing: 0.09em; }
  .nav-logo-mark { width: 25px; height: 25px; }
  .nav-toggle { width: 40px; min-width: 40px; min-height: 40px; }
  .hero { padding-left: 0.85rem; padding-right: 0.85rem; }
  .hero-title { font-size: clamp(2.05rem, 11.2vw, 2.45rem); letter-spacing: -0.045em; }
  .hero-subtitle { font-size: 1rem; }
  .section { padding-left: 0.75rem; padding-right: 0.75rem; }
  .section-title { font-size: clamp(1.7rem, 8.5vw, 2rem); }
  .section-desc { font-size: 0.96rem; }
  .printer-category-grid, .product-grid { gap: 0.45rem; }
  .printer-category { min-height: 98px; padding: 0.65rem 0.55rem; }
  .printer-category h4 { font-size: 0.78rem; }
  .printer-category p { font-size: 0.64rem; }
  .product-card { padding: 0.7rem; }
  .product-card h4 { font-size: 0.82rem; }
  .product-card p { font-size: 0.7rem; }
  .mobile-nav { padding-left: max(0.85rem, env(safe-area-inset-left, 0px)); padding-right: max(0.85rem, env(safe-area-inset-right, 0px)); }
}

/* Intermediate tablet landscape tuning without collapsing the two-column story. */
@media (min-width: 901px) and (max-width: 1100px) {
  .nav { padding-left: 1.5rem; padding-right: 1.5rem; }
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: 0.8rem; }
  .nav-actions { gap: 0.65rem; }
  .section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .section-inner { gap: 2.4rem; }
  .section-content { max-width: 100%; }
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .theme-panel { right: 1rem; bottom: 1rem; }
}


/* Footer layout is token-driven and kept free of inline presentation styles. */
.footer-inner { grid-template-columns: 1fr; }
.footer-content { max-width: 640px; margin: 0 auto; text-align: center; }
.footer-title { font-size: clamp(1.6rem, 3vw, 2.4rem); }


/* Consistent vector service marks render identically across mobile and desktop. */
.service-icon { flex: 0 0 40px; line-height: 0; }
.service-icon svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Guided inquiry details — restrained fieldset treatment matching the form system. */
.inquiry-details {
  min-width: 0;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-sm);
  background: var(--rt-bg-secondary);
}
.inquiry-details legend {
  padding: 0 0.45rem;
  color: var(--rt-text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.inquiry-details .form-row + .form-row { margin-top: 0.85rem; }
.inquiry-details .demo-notice { margin: 0.9rem 0 0; }
