/* ==========================================================================
   THANH HÒA TOOLS · ARCHITECTURAL SOFTWARE SHOWCASE (v3.0)
   Domain: https://tools.kientructhanhhoa.net
   Design System: UI/UX Pro Max + Taste Skill 2.5 (Architectural Blueprint)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  --bg: #f6f9f8;
  --bg-elev: #ffffff;
  --bg-subtle: #edf4f3;
  --bg-blueprint: #f1f7f6;
  --ink: #0d2224;
  --ink-2: #385255;
  --ink-3: #688285;
  --line: #d5e3e1;
  --line-strong: #b6cecb;
  --accent: #087b72;
  --accent-hover: #06635b;
  --accent-bright: #0d9488;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --accent-border: rgba(13, 148, 136, 0.28);
  --free-bg: #e6f9f0;
  --free-ink: #087443;
  --free-border: #abefc6;
  --warn-bg: #fff8eb;
  --warn-ink: #9a5b06;
  --shadow-sm: 0 2px 8px rgba(13, 34, 36, 0.04);
  --shadow-md: 0 14px 36px -8px rgba(13, 34, 36, 0.08);
  --shadow-lg: 0 28px 68px -14px rgba(13, 34, 36, 0.14);
  --grid-dot: rgba(8, 123, 114, 0.075);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --max-w: 1260px;
}

[data-theme="dark"] {
  --bg: #070d0e;
  --bg-elev: #0e1719;
  --bg-subtle: #132023;
  --bg-blueprint: #0b1416;
  --ink: #ecf5f4;
  --ink-2: #9fb7b9;
  --ink-3: #6a8588;
  --line: #1c2e31;
  --line-strong: #294347;
  --accent: #14b8a6;
  --accent-hover: #2dd4bf;
  --accent-bright: #14b8a6;
  --accent-soft: rgba(20, 184, 166, 0.13);
  --accent-border: rgba(20, 184, 166, 0.34);
  --free-bg: rgba(16, 185, 129, 0.14);
  --free-ink: #34d399;
  --free-border: rgba(52, 211, 153, 0.3);
  --warn-bg: rgba(245, 158, 11, 0.14);
  --warn-ink: #fbbf24;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 42px -10px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 32px 76px -12px rgba(0, 0, 0, 0.72);
  --grid-dot: rgba(20, 184, 166, 0.065);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Be Vietnam Pro', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid-dot) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-dot) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono, .tabular {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.container {
  width: min(var(--max-w), calc(100% - 40px));
  margin-inline: auto;
}

/* --- STICKY ARCHITECTURAL NAVBAR --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg-elev) 84%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.brand-meta strong {
  display: block;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-meta span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 18px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 9px;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-spacer {
  flex: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--accent-border);
  background: var(--bg-subtle);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 20px -6px rgba(8, 123, 114, 0.45);
}

[data-theme="dark"] .btn-primary {
  color: #041314;
  font-weight: 700;
}

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

[data-theme="dark"] .btn-primary:hover {
  color: #041314;
}

.btn-lg {
  height: 48px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 12px;
}

.btn-icon {
  width: 40px;
  padding: 0;
}

/* --- ASYMMETRIC ARCHITECTURAL HERO --- */
.hero {
  padding: 56px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 36px;
  align-items: stretch;
}

.hero-pitch {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero h1 .hl {
  color: var(--accent);
}

.hero-lead {
  margin: 0 0 26px;
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 610px;
  line-height: 1.68;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.metric-item strong {
  display: block;
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.metric-item span {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.35;
  display: block;
  margin-top: 2px;
}

/* --- INTERACTIVE SPOTLIGHT DECK (RIGHT COLUMN) --- */
.spotlight-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #2dd4bf);
}

.spot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.spot-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.spot-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 14px 0;
}

.spot-tab {
  padding: 8px 6px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-subtle);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
}

.spot-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .spot-tab.active {
  color: #041314;
}

.spot-stage {
  background: var(--bg-blueprint);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.spot-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.spot-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.spot-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  background: var(--bg-elev);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
}

.spot-stage h3 {
  margin: 4px 0 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.spot-stage p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.58;
}

.spot-specs {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: grid;
  gap: 7px;
}

.spot-specs li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
}

.spot-specs li svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.spot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

/* --- SECTION HEADERS --- */
.section {
  padding: 52px 0;
}

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

.section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-sub {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
  max-width: 650px;
}

/* --- FILTER & SEARCH TOOLBAR --- */
.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-pill {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-pill:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.filter-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-elev);
}

.search-box {
  position: relative;
  min-width: 280px;
  flex: 0 1 320px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* --- PRODUCT BENTO GRID --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tool-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.price-tag {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.price-tag .amount {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.price-tag .unit {
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
}

.price-tag.is-free .amount {
  background: var(--free-bg);
  color: var(--free-ink);
  border: 1px solid var(--free-border);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.price-tag.is-maint .amount {
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
}

.tool-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 5px;
}

.ver-pill {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11px;
}

.tool-card h3 {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.tool-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.58;
}

.tool-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tool-card-foot .btn {
  height: 36px;
  font-size: 12.5px;
}

.tool-card-foot .btn-buy {
  flex: 1;
}

/* --- 3-TIER PUBLIC PRICING SECTION --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.plan-card.vip-featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 55%, var(--bg-elev)) 0%, var(--bg-elev) 42%);
}

.vip-ribbon {
  position: absolute;
  top: -13px;
  right: 22px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

[data-theme="dark"] .vip-ribbon {
  color: #041314;
}

.plan-tier-name {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.plan-price-row {
  margin: 10px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-price-big {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.plan-strike {
  font-size: 14px;
  color: var(--ink-3);
  text-decoration: line-through;
}

.plan-save-pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--free-bg);
  color: var(--free-ink);
  border: 1px solid var(--free-border);
  padding: 2px 9px;
  border-radius: 999px;
}

.plan-desc {
  margin: 8px 0 18px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--ink);
}

.plan-features li svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

/* --- WORKFLOW STEPS --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
}

.step-card h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  font-weight: 700;
}

.step-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* --- FOOTER --- */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 36px 0 32px;
}

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

.footer-copy {
  font-size: 12.5px;
  color: var(--ink-3);
}

.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- MODALS (DETAIL / ORDER / LICENSE REDEEM) --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6, 16, 18, 0.62);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-panel {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-subtle);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
}

.form-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.form-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}

.form-field input, .form-field select {
  height: 42px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}

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

.alert-box {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.alert-box.ok {
  background: var(--free-bg);
  border-color: var(--free-border);
  color: var(--free-ink);
}

.order-summary-box {
  background: var(--bg-blueprint);
  border: 1px solid var(--accent-border);
  border-radius: 13px;
  padding: 16px;
  margin-bottom: 16px;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .product-grid, .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 680px) {
  .metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-grid, .pricing-grid, .steps-grid {
    grid-template-columns: 1fr;
  }
  .spot-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-actions .hide-mobile {
    display: none;
  }
}
