/* ==========================================================================
   VNPF Portal — landing page
   Depends on tokens.css
   ========================================================================== */

/* ---------- Nav ---------- */

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

.nav {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand img { width: 52px; height: auto; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links > a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 500;
}
.nav-links > a:not(.btn):hover { color: var(--green); }

.env-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-pill);
  padding: 4px 11px 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.env-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--green-brand);
  box-shadow: 0 0 0 3px var(--green-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 7px 9px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 18px; height: 18px; display: block; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 380px at 12% -10%, var(--green-light) 0%, transparent 65%),
    var(--bg);
}

.hero-grid {
  display: grid;
  /* Photo column is the wider of the two so the image keeps its scale
     while still sitting alongside the headline. */
  grid-template-columns: 1fr 1.1fr;
  column-gap: clamp(1.75rem, 4vw, 3.25rem);
  row-gap: clamp(1.5rem, 3vw, 2.25rem);
  align-items: center;
}
.hero-copy { grid-column: 1; min-width: 0; }
.hero-photo { grid-column: 2; min-width: 0; }
/* Stats run the full width underneath both columns */
.hero-meta { grid-column: 1 / -1; }

.eyebrow {
  /* Spans the full hero width so the long system name stays on one line */
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 16px 6px 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0;
}
.eyebrow b {
  background: var(--green);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 3px 11px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  margin-bottom: .5em;
}
.hero h1 em {
  font-style: normal;
  color: var(--green);
}

.hero-lede {
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  color: var(--ink);
  opacity: .82;
  max-width: 54ch;
  margin-bottom: 1.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.hero-meta div { min-width: 0; }
.hero-meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 3px;
}
.hero-meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Hero photo */
.hero-photo {
  position: relative;
  margin: 0;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  /* Both subjects sit centre-right in the 2:1 source frame */
  object-position: 56% center;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
/* Caption sits beneath the image */
.hero-photo figcaption {
  margin-top: .85rem;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

/* ---------- Section furniture ---------- */

.section { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--border); }

.section-head { max-width: 62ch; margin-bottom: 2.25rem; }
.section-head h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); margin-bottom: .45em; }
.section-head p { color: var(--muted); margin: 0; }

.kicker {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  color: var(--green);
  margin-bottom: .75rem;
}

/* ---------- Module cards ---------- */

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.module {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.module:hover {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.module-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.module-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.module-icon svg { width: 22px; height: 22px; }

.module-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
}

.module h3 { font-size: 1.2rem; margin-bottom: .4em; }
.module > p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.module-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.module-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.5;
}
.module-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .48em;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--green-brand);
  opacity: .55;
}

.module-foot {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}
.module-foot .badge { margin-left: auto; }

/* ---------- Environment strip ---------- */

.envs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.env-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, background-color .2s ease;
}
.env-card:hover { border-color: color-mix(in srgb, var(--green) 45%, var(--border)); color: var(--ink); }
.env-card-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.env-prd { background: var(--green-light); color: var(--green-dark); }
.env-uat { background: var(--amber-tint); color: var(--amber-ink); }
.env-trn { background: var(--gold-tint); color: var(--gold-ink); }
.env-card strong { display: block; font-size: 14px; font-family: var(--font-display); }
.env-card small { display: block; font-size: 12px; color: var(--muted); }
.env-card-arrow { margin-left: auto; color: var(--muted); }
.env-card-arrow svg { width: 16px; height: 16px; display: block; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 2.5rem 0 2rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-grid p { font-size: 13px; color: var(--muted); margin: .5rem 0 0; max-width: 42ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--green); }
.footer-bar {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy, .hero-photo { grid-column: 1; }
  .hero-photo img { aspect-ratio: 2 / 1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 84px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem;
    box-shadow: var(--shadow-pop);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { width: 100%; }
  .env-chip { align-self: flex-start; }
}

@media (max-width: 620px) {
  .eyebrow { font-size: 14px; padding: 5px 13px 5px 7px; gap: 8px; }
  .eyebrow b { font-size: 13px; padding: 3px 10px; }
}

@media (max-width: 480px) {
  /* "VNPF One" alone carries the brand; the full name wraps to two lines here */
  .nav .brand-sub { display: none; }
  .nav .brand img { width: 38px; }
  .hero-meta { gap: 1.25rem 1.75rem; }
}

/* Footer attribution link */
.footer-bar a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--border); }
.footer-bar a:hover { color: var(--green); border-bottom-color: currentColor; }
