/* ===================================================================
   ROVIA — Components CSS  (part 1: header, hero, regions, why, process)
   =================================================================== */

/* ---------------- Section heads ---------------- */
.section-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head .kicker { margin-bottom: 18px; }
.section-head-sub { color: var(--text-secondary); max-width: 460px; }
.section-head.center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.section-head-sub.center { margin-inline: auto; }
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
}

/* ===================== HEADER ===================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--dur-mid) var(--ease),
              box-shadow var(--dur-mid) var(--ease),
              border-color var(--dur-mid) var(--ease),
              padding var(--dur-mid) var(--ease);
  border-bottom: 1px solid transparent;
  padding-block: 18px;
}
.header.solid {
  background: rgba(247,245,241,0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
  padding-block: 10px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.02em;
  color: var(--brand);
}
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 8px;
}
.nav-link {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  position: relative;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-link:hover { color: var(--brand); background: rgba(38,70,83,0.05); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-cta { padding: 11px 20px; font-size: 15px; }

/* burger */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--brand); border-radius: 2px; transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.burger span.x:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger span.x:nth-child(2) { opacity: 0; }
.burger span.x:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0 var(--margin);
  max-height: 0;
  overflow: hidden;
  background: rgba(247,245,241,0.98);
  backdrop-filter: blur(14px);
  transition: max-height var(--dur-mid) var(--ease), padding var(--dur-mid) var(--ease);
}
.mobile-menu.open { max-height: 420px; padding: 16px var(--margin) 28px; border-bottom: 1px solid var(--line); }
.mobile-link { font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--text-primary); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 16px; }

/* ---- Language switcher ---- */
.lang { position: relative; }
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(252,251,248,0.7);
  border: 1px solid var(--line);
  border-radius: var(--r-ui);
  padding: 9px 12px;
  cursor: pointer;
  color: var(--brand);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.lang-trigger:hover { border-color: var(--line-strong); }
.lang-trigger.open { border-color: var(--accent); background: var(--surface-card); }
.lang-code { letter-spacing: 0.04em; }
.lang-caret { transition: transform var(--dur-fast) var(--ease); color: var(--text-secondary); }
.lang-trigger.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 248px;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--r-ui);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  z-index: 120;
}
.lang-menu.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.lang-menu-head {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.lang-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: background var(--dur-fast) var(--ease);
}
.lang-opt:hover { background: var(--bg-secondary); }
.lang-opt.active { background: rgba(217,144,65,0.08); }
.lang-opt-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--bg-secondary);
  border-radius: 7px;
  padding: 5px 7px;
  min-width: 34px;
  text-align: center;
}
.lang-opt.active .lang-opt-code { background: var(--accent); color: #fff; }
.lang-opt-text { display: flex; flex-direction: column; flex: 1; }
.lang-opt-label { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--text-primary); }
.lang-opt-region { font-size: 12px; color: var(--text-secondary); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 60px;
  background:
    radial-gradient(1100px 600px at 78% 18%, rgba(217,144,65,0.06), transparent 60%),
    var(--bg-primary);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-title { margin: 18px 0 24px; }
.hero-sub { color: var(--text-secondary); max-width: 540px; }
.hero-cta { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.btn-lg { padding: 17px 30px; font-size: 17px; }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stat-num { color: var(--brand); line-height: 1; }
.hero-stat-label { color: var(--text-secondary); margin-top: 10px; font-size: 12px; letter-spacing: 0.1em; }

.hero-viz-wrap {
  position: relative;
  aspect-ratio: 560 / 600;
  max-height: 600px;
  margin-inline: auto;
  width: 100%;
}
.hero-viz {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.42;
  /* a single warm hue, lighter than the page */
  filter: grayscale(1) sepia(0.5) saturate(0.4) brightness(1.02) contrast(0.9);
  /* feather all four edges so the map melts into the page (no hard border) */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}
.hero-map img {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  max-width: none;
}
.hero-viz > svg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.viz-label { font-family: var(--font-mono); font-size: 11px; fill: var(--text-primary); letter-spacing: 0.02em; }
.viz-coord { font-family: var(--font-mono); font-size: 10px; fill: var(--text-secondary); letter-spacing: 0.06em; }

.viz-chip {
  position: absolute;
  left: 6%;
  bottom: 8%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  box-shadow: var(--shadow-md);
}
.viz-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #3fae6f; box-shadow: 0 0 0 0 rgba(63,174,111,0.5); animation: ping 4.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(63,174,111,0.5);} 70%{ box-shadow:0 0 0 8px rgba(63,174,111,0);} 100%{box-shadow:0 0 0 0 rgba(63,174,111,0);} }
.viz-chip-label { font-size: 10px; color: var(--text-secondary); }
.viz-chip-val { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--brand); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-viz-wrap { max-width: 520px; margin-inline: auto; width: 100%; }
  .nav-desktop { display: none; }
  .header-cta { display: none; }
  .burger { display: flex; }
  .mobile-menu { display: flex; }
}
@media (max-width: 680px) {
  .hero-stats { gap: 28px; }
  .lang-trigger { padding: 8px 10px; }
}

/* ===================== REGIONS ===================== */
.regions-section { background: var(--bg-secondary); }
.regions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.region-card {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-mid) var(--ease), box-shadow var(--dur-mid) var(--ease), border-color var(--dur-mid) var(--ease);
}
.region-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.region-route { background: var(--bg-tertiary); border-bottom: 1px solid var(--line); height: 170px; }
.region-body { padding: 28px 30px 26px; display: flex; flex-direction: column; flex: 1; }
.region-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.region-name { color: var(--brand); }
.region-code { font-size: 11px; color: var(--text-secondary); background: var(--bg-secondary); padding: 5px 9px; border-radius: 7px; }
.region-desc { color: var(--text-secondary); margin-top: 12px; }
.region-details { transition: opacity var(--dur-mid) var(--ease); }
.region-hubs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.region-hub { font-size: 11px; color: var(--brand); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 11px; }
.region-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 20px; }
.region-transit { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 12px; }
.region-go { color: var(--accent); transition: opacity var(--dur-fast) var(--ease); }
@media (max-width: 760px) { .regions-grid { grid-template-columns: 1fr; } }

/* ===================== WHY CHOOSE ===================== */
.why-section { background: var(--bg-tertiary); }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.benefit-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  transition: transform var(--dur-mid) var(--ease), box-shadow var(--dur-mid) var(--ease), border-color var(--dur-mid) var(--ease);
}
.benefit-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.benefit-corner { position: absolute; top: 22px; right: 24px; font-size: 12px; color: var(--line-strong); }
.benefit-icon { margin-bottom: 22px; }
.benefit-title { color: var(--brand); margin-bottom: 12px; }
.benefit-desc { color: var(--text-secondary); }
.benefit-annot { transition: opacity var(--dur-mid) var(--ease); display: flex; flex-direction: column; gap: 8px; }
.benefit-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--brand); padding-top: 12px; }
.benefit-tag-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.benefit-spec { margin-top: auto; padding-top: 18px; font-size: 11px; transition: color var(--dur-fast) var(--ease); border-top: 1px solid var(--line); }
@media (max-width: 1040px) { .benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .benefits-grid { grid-template-columns: 1fr; } .benefit-card { min-height: 0; } }

/* ===================== PROCESS ===================== */
.process-section { background: var(--bg-primary); }
.process-rail { position: relative; margin-top: 20px; }
.process-line { position: absolute; top: 0; left: 0; width: 100%; height: 64px; overflow: visible; }
.process-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
.process-step { text-align: left; padding-right: 12px; }
.process-node {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  z-index: 2;
}
.process-node-ring { position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation: ringIn 600ms var(--ease) forwards; }
@keyframes ringIn { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 0.5; } }
.process-n { font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.process-title { color: var(--brand); margin-bottom: 10px; }
.process-desc { color: var(--text-secondary); }
@media (max-width: 920px) {
  .process-line { display: none; }
  .process-steps { grid-template-columns: 1fr; gap: 28px; }
  .process-step { display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; }
  .process-node { margin-bottom: 0; }
  .process-step > .process-n { grid-column: 2; }
}
