/* Cin3D legal + marketing — FDM / workshop tech aesthetic */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-elevated: #0b1220;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --dim: #64748b;
  --teal: #2dd4bf;
  --teal-deep: #0d9488;
  --teal-glow: rgba(45, 212, 191, 0.35);
  --warm: #f59e0b;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(45, 212, 191, 0.28);
  --card: rgba(15, 23, 42, 0.72);
  --radius: 1.25rem;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Layer-line + iso grid atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(45, 212, 191, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(14, 165, 233, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(245, 158, 11, 0.05), transparent 55%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(148, 163, 184, 0.025) 3px,
      rgba(148, 163, 184, 0.025) 4px
    ),
    linear-gradient(rgba(45, 212, 191, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.04) 1px, transparent 1px);
  background-size: auto, auto, auto, auto, 48px 48px, 48px 48px;
  background-position: center;
}

body > * { position: relative; z-index: 1; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #5eead4; }

.shell {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}
@media (min-width: 768px) {
  .shell { padding: 1.5rem 2rem 5rem; }
}

/* —— Site header —— */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 20px var(--teal-glow);
  background: #00030f;
  flex-shrink: 0;
}
.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background:
    linear-gradient(145deg, rgba(45, 212, 191, 0.35), transparent 55%),
    linear-gradient(225deg, #0f766e, #0b1220);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 24px var(--teal-glow);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--teal);
}
.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.brand-text span {
  color: var(--dim);
  font-weight: 500;
  font-size: 0.75rem;
  display: block;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--mono);
}
.brand-wordmark {
  height: 1.55rem;
  width: auto;
  max-width: 7.5rem;
  object-fit: contain;
  display: block;
}
@media (min-width: 480px) {
  .brand-wordmark { height: 1.7rem; max-width: 8.5rem; }
}
.header-nav {
  display: none;
  gap: 0.25rem;
  align-items: center;
}
@media (min-width: 720px) {
  .header-nav { display: flex; }
}
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: color 0.35s var(--ease), background 0.35s var(--ease);
}
.header-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.header-nav a[aria-current='page'] {
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile secondary nav (header-nav hides below 720px) */
.mobile-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: -1.25rem 0 1.75rem;
}
@media (min-width: 720px) {
  .mobile-nav { display: none; }
}
.mobile-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.55);
}
.mobile-nav a:hover,
.mobile-nav a[aria-current='page'] {
  color: var(--teal);
  border-color: var(--line-strong);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.lang-switch button[aria-pressed='true'] {
  background: linear-gradient(135deg, var(--teal-deep), #115e59);
  color: #ecfdf5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.lang-switch button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* —— Typography —— */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(45, 212, 191, 0.08);
}
.eyebrow::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  animation: pulse-dot 2.4s var(--ease) infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 1rem;
}
h2 {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  color: var(--ink);
}
.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1.75rem;
  line-height: 1.7;
}
.meta {
  color: var(--dim);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
  font-family: var(--mono);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #042f2e;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25), 0 12px 40px rgba(13, 148, 136, 0.25);
}
.btn-primary:hover {
  color: #022c22;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.4), 0 16px 48px rgba(13, 148, 136, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--line-strong);
  background: rgba(45, 212, 191, 0.06);
  color: var(--ink);
  text-decoration: none;
}
.btn-icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.85rem;
  line-height: 1;
}

/* —— Cards / panels —— */
.panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.02);
}
.panel-inner {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  padding: 1.25rem 1.35rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.panel-inner.tight { padding: 1rem 1.15rem; }

.grid-2 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
.grid-3 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.15), transparent);
}
.feature-title {
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}
.feature-body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* —— Marketing hero —— */
.hero {
  display: grid;
  gap: 2.5rem;
  padding: 1rem 0 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    padding: 2rem 0 4rem;
  }
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.stat-val {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Hero phone mockup */
.hero-visual {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 0.5rem 0 1rem;
}
.phone-stack {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 9 / 19.5;
  margin: 0 auto;
}
.phone {
  position: absolute;
  inset: 0;
  border-radius: 1.65rem;
  padding: 0.45rem;
  background: linear-gradient(160deg, #1e293b, #0b1220 55%, #020617);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.12),
    0 28px 60px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(45, 212, 191, 0.1);
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 1.3rem;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #00030f;
}
.phone-notch {
  position: absolute;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 0.55rem;
  border-radius: 999px;
  background: #020617;
  z-index: 2;
  pointer-events: none;
}
.phone-glow {
  position: absolute;
  inset: 12% -18% -8%;
  background: radial-gradient(ellipse at 50% 80%, rgba(45, 212, 191, 0.22), transparent 65%);
  z-index: -1;
  pointer-events: none;
}
/* App screenshot gallery */
.shot-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 180px);
  gap: 1rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 1.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 212, 191, 0.35) transparent;
}
@media (min-width: 900px) {
  .shot-gallery {
    grid-auto-flow: dense;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: unset;
    overflow: visible;
    padding-bottom: 0.25rem;
  }
}
.shot-card {
  scroll-snap-align: start;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--card);
  padding: 0.55rem 0.55rem 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.shot-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.shot-frame {
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #00030f;
  aspect-ratio: 9 / 19.5;
}
.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.shot-card figcaption {
  margin-top: 0.65rem;
  padding: 0 0.2rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
}

/* Footer brand row */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--dim);
}
.footer-brand img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.4rem;
  object-fit: cover;
  border: 1px solid var(--line);
}

.section {
  padding: 2.5rem 0;
}
.section-head {
  margin-bottom: 1.5rem;
  max-width: 36rem;
}
.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-bottom: 0.5rem;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Process steps */
.steps {
  display: grid;
  gap: 0.85rem;
  counter-reset: step;
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}
.step {
  position: relative;
  padding: 1.15rem 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--teal);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.65rem;
}
.step h2 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

/* Tech strip — filament / G-code vibe */
.tech-strip {
  display: grid;
  gap: 0.75rem;
  margin: 0.5rem 0 0.25rem;
}
@media (min-width: 720px) {
  .tech-strip { grid-template-columns: repeat(3, 1fr); }
}
.tech-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.06), transparent 60%), var(--card);
}
.tech-chip-mark {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--teal);
  border: 1px solid var(--line-strong);
  background: rgba(3, 7, 18, 0.6);
}
.tech-chip strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}
.tech-chip span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Material swatches */
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.65);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.swatch i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

/* Support-specific */
.support-hero {
  max-width: 48rem;
  margin: 0 auto 0.5rem;
}
.contact-email {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  word-break: break-all;
}
.contact-email:hover { color: #5eead4; }
.response-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1.25rem 0 0;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: rgba(45, 212, 191, 0.04);
  font-size: 0.85rem;
  color: var(--muted);
}
.response-note strong {
  color: var(--teal);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.2rem;
}
.faq details {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--card);
  margin-bottom: 0.65rem;
  padding: 0.15rem 0;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex-shrink: 0;
  font-family: var(--mono);
  color: var(--teal);
  font-weight: 500;
  width: 1.25rem;
  text-align: center;
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  margin: 0;
  padding: 0 1.15rem 1.05rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.faq details[open] {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.06);
}

/* Doc pages (privacy) */
.doc {
  max-width: 42rem;
  margin: 0 auto;
}
.doc h2 {
  margin-top: 1.85rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}
.doc p {
  margin: 0.55rem 0;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--dim);
  font-family: var(--mono);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover { color: var(--teal); }

/* i18n — never hide <html data-lang> */
[data-i18n] {
  display: none !important;
}
html[data-lang='en'] [data-i18n='en'],
html[data-lang='vi'] [data-i18n='vi'] {
  display: block !important;
}
html[data-lang='en'] a[data-i18n='en'],
html[data-lang='vi'] a[data-i18n='vi'],
html[data-lang='en'] span[data-i18n='en'],
html[data-lang='vi'] span[data-i18n='vi'],
html[data-lang='en'] button[data-i18n='en'],
html[data-lang='vi'] button[data-i18n='vi'] {
  display: inline-flex !important;
}
html[data-lang='en'] .inline-i18n[data-i18n='en'],
html[data-lang='vi'] .inline-i18n[data-i18n='vi'] {
  display: inline !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
