:root {
  --bg: #070b12;
  --surface: #0d1420;
  --surface-alt: #131d2e;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #10b981;
  --accent-text: #04150f;
  --border: #1e293b;
  --radius: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --border-width: 1px;
}

body[data-theme="editorial"] {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-alt: #ece8df;
  --text: #141413;
  --text-muted: #52504b;
  --accent: #c84b31;
  --accent-text: #ffffff;
  --border: #d8d3c8;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(20, 20, 19, 0.06);
}

body[data-theme="brutalista"] {
  --bg: #f2f2f0;
  --surface: #ffffff;
  --surface-alt: #e4ff33;
  --text: #0a0a0a;
  --text-muted: #2e2e2e;
  --accent: #0a0a0a;
  --accent-text: #e4ff33;
  --border: #0a0a0a;
  --radius: 0px;
  --shadow: 6px 6px 0px #0a0a0a;
  --border-width: 2px;
}

body[data-theme="saas"] {
  --bg: #080c14;
  --surface: #0f1623;
  --surface-alt: #162033;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #22d3ee;
  --accent-text: #04131a;
  --border: #233148;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

body[data-theme="boutique"] {
  --bg: #151210;
  --surface: #1e1916;
  --surface-alt: #28211c;
  --text: #f5efe6;
  --text-muted: #bcae9c;
  --accent: #d4af37;
  --accent-text: #151210;
  --border: #3a3028;
  --radius: 6px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --font-display: "Instrument Serif", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  transition: background-color 260ms ease, color 260ms ease;
  overflow-x: hidden;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.75rem 1rem;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 90;
  pointer-events: none;
}

.container {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: var(--border-width) solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: calc(var(--radius) * 0.6);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.site-nav .nav-cta {
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius);
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero {
  padding: clamp(3rem, 7vw, 5.25rem) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-tag {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  background: var(--surface-alt);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.15rem, 4.5vw, 3.45rem);
  letter-spacing: -0.02em;
}

body[data-theme="boutique"] h1 {
  font-weight: 400;
  letter-spacing: 0;
}

.hero-lead {
  font-size: 1.06rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.3rem;
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background-color 220ms ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn:not(:disabled):hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

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

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding-top: 1.25rem;
  border-top: var(--border-width) solid var(--border);
}

.hero-metrics dt {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.hero-metrics dd {
  margin: 0.2rem 0 0;
  font-weight: 700;
  font-size: 1rem;
}

.browser-frame {
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface-alt);
  border-bottom: var(--border-width) solid var(--border);
}

.browser-dots {
  display: flex;
  gap: 0.35rem;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.browser-url {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.browser-canvas {
  padding: 1.85rem 1.75rem;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.canvas-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: calc(var(--radius) * 0.6);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.canvas-title {
  font-size: 1.65rem;
  margin-bottom: 0.6rem;
}

.canvas-text {
  color: var(--text-muted);
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
}

.canvas-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.mini-kpi {
  background: var(--surface-alt);
  border: var(--border-width) solid var(--border);
  border-radius: calc(var(--radius) * 0.8);
  padding: 0.75rem 0.9rem;
}

.mini-kpi span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mini-kpi strong {
  font-size: 1.15rem;
  color: var(--accent);
}

.styles-section,
.fintech-section,
.quote-section,
.contact-section {
  padding: clamp(2.75rem, 5.5vw, 4.5rem) 0;
}

.section-head {
  max-width: 64ch;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

.styles-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.style-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 220ms ease;
}

.style-card:hover {
  transform: translateY(-4px);
}

.style-swatch {
  height: 82px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  border-bottom: var(--border-width) solid var(--border);
}

.swatch-fintech { background: #070b12; color: #10b981; }
.swatch-editorial { background: #f6f4ef; color: #c84b31; }
.swatch-brutalista { background: #e4ff33; color: #0a0a0a; }
.swatch-saas { background: #0f172a; color: #22d3ee; }
.swatch-boutique { background: #1e1916; color: #d4af37; font-family: "Instrument Serif", Georgia, serif; }

.style-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.style-body h3 {
  font-size: 1.12rem;
  margin-bottom: 0.45rem;
}

.style-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.9rem;
}

.style-specs {
  margin: 0 0 1.1rem;
  padding-left: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-card {
  margin-top: auto;
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--surface-alt);
  color: var(--text);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.btn-card:hover {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.bento-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 1.25rem;
}

.bento-card {
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.bento-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.spec-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.kpi-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.1;
}

.kpi-delta {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.range-tabs {
  display: inline-flex;
  gap: 0.4rem;
  background: var(--surface-alt);
  padding: 0.25rem;
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border);
}

.range-btn {
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: calc(var(--radius) * 0.7);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.range-btn.is-active {
  background: var(--accent);
  color: var(--accent-text);
}

.chart-wrap {
  position: relative;
}

#finance-svg {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}

.chart-grid-lines line {
  stroke: var(--border);
  stroke-dasharray: 4 4;
}

.chart-line-animate {
  transition: stroke-dashoffset 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chart-crosshair {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}

.chart-tooltip {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0.45rem 0.75rem;
  background: var(--surface-alt);
  border: var(--border-width) solid var(--border);
  border-radius: calc(var(--radius) * 0.75);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  pointer-events: none;
}

.bento-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.metric-tile {
  background: var(--surface-alt);
  border: var(--border-width) solid var(--border);
  border-radius: calc(var(--radius) * 0.85);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-tile strong {
  font-size: 1.35rem;
  font-family: var(--font-display);
}

.quote-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.35rem, 3vw, 2rem);
}

.quote-controls {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: none;
  padding: 0;
  margin: 0;
}

.control-block label,
.control-block legend {
  font-weight: 600;
  font-size: 0.92rem;
}

.control-block select,
.control-block input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.control-block select {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  color: var(--text);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 400 !important;
  font-size: 0.9rem !important;
  color: var(--text-muted);
  cursor: pointer;
}

.check-item input {
  accent-color: var(--accent);
}

.quote-summary {
  background: var(--surface-alt);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.quote-price {
  font-family: var(--font-display);
  font-size: 2.3rem;
  line-height: 1.1;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.quote-days {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.spec-list {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--text);
}

.quote-actions {
  margin-top: auto;
}

.contact-box {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-box p {
  color: var(--text-muted);
}

.live-spec-mini {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--surface-alt);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row label {
  font-size: 0.88rem;
  font-weight: 600;
}

.form-row input,
.form-row select,
.form-row textarea {
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  color: var(--text);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.94rem;
}

.form-row input[aria-invalid="true"],
.form-row textarea[aria-invalid="true"] {
  border-color: #ef4444;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-feedback {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  min-height: 1.4em;
}

.site-footer {
  border-top: var(--border-width) solid var(--border);
  padding: 1.75rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .styles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .hero-grid,
  .bento-grid,
  .quote-grid,
  .contact-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .styles-grid,
  .bento-metrics {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  .style-card:hover {
    transform: none;
  }
}
