/* Pacisoft 2026 — homepage-only styles (index.html).
   Requires tokens.css + base.css. Never redefines a token.
   All motion here is CSS-only and is disabled by the reduced-motion
   kill switch in base.css — no rule below sets a hidden resting state. */

/* ================================================================= hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy-950);
  color: var(--white);
  padding-block: var(--space-16) var(--space-16);
}
@media (min-width: 768px) {
  .hero { padding-block: 5.5rem 5rem; }
}

/* signature motion: a slow, single drifting aurora behind the headline */
.hero::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(38% 44% at 16% 26%, rgba(0, 168, 181, .48), transparent 64%),
    radial-gradient(30% 38% at 84% 12%, rgba(14, 159, 110, .22), transparent 66%),
    radial-gradient(52% 60% at 66% 96%, rgba(22, 57, 79, .95), transparent 72%);
  animation: heroDrift 24s var(--ease) infinite alternate;
  will-change: transform;
}
@keyframes heroDrift {
  from { transform: translate3d(-2%, -1.5%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.14); }
}

/* static blueprint grid, faded out at the edges */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(72% 72% at 50% 38%, #000 0%, transparent 78%);
          mask-image: radial-gradient(72% 72% at 50% 38%, #000 0%, transparent 78%);
}

.hero-inner { max-width: 46rem; }

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, .78);
  margin-bottom: var(--space-4);
}
.hero .eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(14, 159, 110, .22);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.125rem, 5.4vw, 3.75rem);
  letter-spacing: -.03em;
  line-height: 1.06;
}
/* Trusted Steel: the old gradient started on cornflower #7FB0FF, which read as a
   leftover of the retired blue accent. --accent is the palette's on-navy display
   colour (6.09:1 against --navy-950), so the wash now starts there. */
.hero h1 .hero-accent {
  background: linear-gradient(96deg, var(--accent) 0%, var(--white) 52%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: var(--space-6);
  max-width: 38rem;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: rgba(255, 255, 255, .76);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.hero-cta .btn { padding-inline: var(--space-8); }

/* one measured line rather than a stat block — DIRECTION §6.2; the numbers are
   computed from content.json at render time, never hardcoded */
.hero-statline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, .68);
}
.hero-statline strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -.02em;
  color: var(--white);
}
.hero-stat-sep { color: rgba(255, 255, 255, .34); }

/* staggered entrance — resting state is VISIBLE, the hidden state only
   lives inside the keyframe, so `animation:none` (reduced motion) is safe */
.reveal { animation: reveal .78s var(--ease) backwards; animation-delay: var(--d, 0s); }
@keyframes reveal {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
}

/* ========================================================== brand strip */
.brand-strip {
  padding-block: var(--space-12);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.brand-strip-label {
  margin: 0 0 var(--space-8);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.brand-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: var(--space-6) var(--space-4);
}
@media (min-width: 640px) { .brand-list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .brand-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-8); } }

.brand-list img {
  width: 100%;
  max-width: 120px;
  height: auto;
  margin-inline: auto;
  filter: grayscale(1) contrast(.9);
  opacity: .58;
  transition: filter var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.brand-list li:hover img,
.brand-list li:focus-within img {
  filter: none;
  opacity: 1;
  transform: scale(1.04);
}

/* ======================================================== featured grid */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.section-head .eyebrow { margin-bottom: var(--space-2); }
.section-head p.lead { margin-top: var(--space-3); max-width: 42rem; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
}
.section-link svg { transition: transform var(--dur) var(--ease); }
.section-link:hover svg { transform: translateX(3px); }

.product-grid { gap: var(--space-4); }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); } }

.product-card .card-media { aspect-ratio: 4 / 3; }
.product-card .card-media img { width: auto; max-height: 100%; object-fit: contain; }
/* title link is a tap target too — keep it on the 40px floor even on one line */
.product-card .card-title a {
  display: flex;
  align-items: center;
  min-height: 40px;
}
.product-card .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.product-card .card-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--ink-soft);
}
.product-card .card-foot {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
}
.product-card .card-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}
.product-card .card-link:hover { text-decoration: underline; }
.btn.is-added { background: var(--ok); box-shadow: 0 2px 10px rgba(14, 159, 110, .28); }
.btn.is-added:hover { background: var(--ok); }

.grid-note {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

/* two adjacent bands would double the vertical rhythm — the featured grid rides
   straight off the category tiles */
.section-tight { padding-top: 0; }
@media (min-width: 768px) { .section-tight { padding-top: 0; } }

/* ==================================================== software categories */
.cat-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 560px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.cat-tile a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-height: 84px;
  height: 100%;
  padding: var(--space-4);
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.cat-tile a:hover {
  border-color: var(--accent-ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.cat-count {
  grid-column: 1;
  font-size: var(--text-xs);
  color: var(--ink-soft);
}
.cat-arrow {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--accent-ink);
  transition: transform var(--dur) var(--ease);
}
.cat-tile a:hover .cat-arrow { transform: translateX(3px); }

/* ------------------------------------------------ compare toggle on cards */
/* secondary to "Thêm vào báo giá": a quiet full-width ghost under the primary */
.card-actions { display: grid; gap: var(--space-2); }
.card-compare { width: 100%; font-weight: 600; color: var(--ink-soft); }
.card-compare:hover { color: var(--accent-ink); }

/* ========================================================= hardware band */
.hw-band {
  padding-block: var(--space-12);
  background: var(--white);
  border-block: 1px solid var(--line);
}
@media (min-width: 768px) { .hw-band { padding-block: var(--space-16); } }

.hw-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) { .hw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hw-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); } }

.hw-grid .card { background: var(--paper); }
.hw-grid .card-media { background: var(--white); }

.hw-more {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  text-decoration: none;
  color: var(--white);
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.hw-more:hover { background: var(--navy-700); color: var(--white); transform: translateY(-2px); }
.hw-more:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.hw-more-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  line-height: 1.2;
}
.hw-more-sub { font-size: var(--text-sm); color: rgba(255, 255, 255, .72); line-height: 1.45; }
.hw-more svg { color: var(--accent); }

/* ========================================================= quote process */
.flow-list {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: flow;
}
@media (min-width: 768px) { .flow-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); } }

.flow-step {
  position: relative;
  padding: var(--space-6);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.flow-num {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-base);
  color: var(--accent-fg);
  background: var(--accent);
  border-radius: 999px;
}
.flow-step h3 { font-size: var(--text-base); margin-bottom: var(--space-2); }
.flow-step p { font-size: var(--text-sm); line-height: 1.55; color: var(--ink-soft); }

/* ============================================================ trust band */
.trust {
  padding-block: var(--space-16);
  background: var(--white);
  border-top: 1px solid var(--line);
}
.trust-item {
  padding: var(--space-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  height: 100%;
}
.trust-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: var(--space-4);
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.trust-item h3 { font-size: var(--text-base); margin-bottom: var(--space-2); }
.trust-item p { font-size: var(--text-sm); line-height: 1.55; color: var(--ink-soft); }

/* keep the fixed watermark clear of the footer's last line on phones */
.site-footer .footer-bottom { padding-bottom: var(--space-8); }
