/* ===================================================================
   eGata landing page — extends the kiosk design language.
   Greens (#1F6F5F / #2FA084 / #6FCF97) + Onest + soft glass cards.
   =================================================================== */

:root {
  --c-dark: #1F6F5F;
  --c-mid: #2FA084;
  --c-light: #6FCF97;
  --c-bg: #F4F6F4;
  --c-bg-soft: #FAFBFA;
  --c-ink: #0F1F1A;
  --c-ink-soft: rgba(15, 31, 26, 0.66);
  --c-ink-mute: rgba(15, 31, 26, 0.48);
  --c-line: rgba(15, 31, 26, 0.10);
  --c-line-strong: rgba(15, 31, 26, 0.18);
  --c-card: #FFFFFF;
  --c-card-tint: rgba(47, 160, 132, 0.06);
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-card:
    0 1px 0 rgba(15, 31, 26, 0.04),
    0 16px 40px -16px rgba(15, 31, 26, 0.16),
    0 4px 14px -4px rgba(15, 31, 26, 0.08);
  --shadow-lg:
    0 1px 0 rgba(15, 31, 26, 0.04),
    0 28px 64px -22px rgba(15, 31, 26, 0.24),
    0 8px 20px -6px rgba(15, 31, 26, 0.10);
  --font-civic: "Onest", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html, body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-civic);
  font-feature-settings: "ss01","ss02","cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ===================== Type scale ===================== */

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--c-dark);
}

.display {
  font-size: clamp(56px, 8.4vw, 124px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 0;
  text-wrap: balance;
}
.display em {
  font-style: normal;
  font-weight: 400;
  color: var(--c-mid);
}

.h1 {
  font-size: clamp(40px, 5.2vw, 72px);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

.lede {
  font-size: clamp(18px, 1.45vw, 22px);
  color: var(--c-ink-soft);
  line-height: 1.5;
  max-width: 56ch;
  text-wrap: pretty;
  margin: 0;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ===================== Layout ===================== */

.page {
  position: relative;
  overflow-x: clip;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

section { position: relative; }

@media (max-width: 600px) {
  .wrap { padding: 0 22px; }
}

/* ===================== Top nav ===================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(244, 246, 244, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--c-line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--c-ink);
}
.nav-brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--c-mid);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(31, 111, 95, 0.55);
}
.nav-brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink-soft);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover {
  color: var(--c-ink);
  background: var(--c-card-tint);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-cta {
  appearance: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--c-dark);
  color: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 22px -10px rgba(31, 111, 95, 0.65);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease;
}
.nav-cta:hover {
  background: #185548;
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ===================== Hero ===================== */

.hero {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0 clamp(80px, 9vw, 120px);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg canvas {
  width: 100%;
  height: 100%;
  filter: blur(60px) saturate(1.15);
  opacity: 0.55;
}
.hero-bg .grain {
  position: absolute; inset: 0;
  opacity: 0.10;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.hero-bg .vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 20%, transparent 0%, transparent 55%, var(--c-bg) 100%);
}
.hero-inner { position: relative; z-index: 1; }

/* ----- Hero A: Pathfinder ----- */

.heroA {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
}
.heroA-text { min-width: 0; }

@media (max-width: 960px) {
  .heroA { grid-template-columns: 1fr; }
}

.path-stage {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1;
  margin-inline: auto;
  isolation: isolate;
}
.path-stage svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Endpoint chip labels positioned over the SVG */
.ps-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink);
  white-space: nowrap;
  animation: ps-chip-in 0.6s ease both;
  z-index: 2;
}
.ps-chip[data-side="start"] {
  left: 6%;
  bottom: 6%;
  transform: translate(0, 50%);
  animation-delay: 0.1s;
}
.ps-chip[data-side="end"] {
  right: 6%;
  top: 6%;
  transform: translate(0, -50%);
  animation-delay: 0.9s;
}
.ps-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-mid);
  box-shadow: 0 0 0 0 rgba(47, 160, 132, 0.55);
  flex-shrink: 0;
}
.ps-chip[data-side="start"] .ps-chip-dot {
  background: var(--c-dark);
  animation: ps-chip-pulse 2.4s ease-in-out infinite;
}
.ps-chip-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--c-card-tint);
  color: var(--c-dark);
}
@keyframes ps-chip-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 111, 95, 0.55); }
  50%      { box-shadow: 0 0 0 10px rgba(31, 111, 95, 0); }
}
@keyframes ps-chip-in {
  from { opacity: 0; transform: translateY(50%) translateX(-6px); }
  to   { opacity: 1; }
}
.ps-chip[data-side="end"] { animation-name: ps-chip-in-end; }
@keyframes ps-chip-in-end {
  from { opacity: 0; transform: translateY(-50%) translateX(6px); }
  to   { opacity: 1; }
}

@media (max-width: 560px) {
  .ps-chip { font-size: 12px; padding: 8px 12px 8px 10px; }
  .ps-chip-tag { font-size: 9px; padding: 2px 6px; }
}

/* Path draw + traveling dot */
.ps-line {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: ps-draw 2.4s 0.3s ease-out forwards;
}
@keyframes ps-draw { to { stroke-dashoffset: 0; } }
.ps-line-trail {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: ps-draw 2.4s 0.3s ease-out forwards;
  opacity: 0.18;
}

/* ===================== Sections ===================== */

.section {
  padding: clamp(72px, 9vw, 120px) 0;
}
.section-soft {
  background: var(--c-bg-soft);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

/* ===================== How it works ===================== */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

.step {
  position: relative;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: 24px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 360px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.step:hover {
  border-color: var(--c-mid);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-mid);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.step-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
  line-height: 1.2;
}
.step-body {
  font-size: 14.5px;
  color: var(--c-ink-soft);
  line-height: 1.55;
  text-wrap: pretty;
  margin: 0;
}
.step-illu {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  position: relative;
  overflow: hidden;
  margin-top: auto;
}
.step-illu svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Animated caret in the "Primește procedura corectă" illustration */
.form-caret {
  animation: form-caret-blink 1s steps(2, jump-none) infinite;
}
@keyframes form-caret-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ===================== Procedure showcase ===================== */

.proc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .proc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .proc-grid { grid-template-columns: 1fr; } }

.proc-card {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: 22px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.proc-card:hover {
  border-color: var(--c-mid);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.proc-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--c-card-tint);
  color: var(--c-dark);
  display: grid; place-items: center;
}
.proc-name {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
}
.proc-sub {
  font-size: 11px;
  color: var(--c-ink-mute);
  margin: 4px 0 0;
  letter-spacing: 0.04em;
}
.proc-meta {
  font-size: 12.5px;
  color: var(--c-ink-soft);
  line-height: 1.45;
  margin: 0;
  flex: 1;
  text-wrap: pretty;
}
.proc-time-row {
  margin-top: auto;
  display: flex; align-items: baseline; gap: 8px;
  padding-top: 18px;
  border-top: 1px dashed var(--c-line);
}
.proc-time-before {
  color: var(--c-ink-mute);
  font-size: 12px;
  text-decoration: line-through;
}
.proc-time-after {
  color: var(--c-dark);
  font-weight: 600;
  font-size: 14px;
}
.proc-time-arrow {
  color: var(--c-ink-mute);
}

/* ===================== Try Now CTA ===================== */

.try-now-section {
  padding: clamp(72px, 10vw, 140px) 0;
  background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-mid) 100%);
}

.try-now-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.try-now-link:hover {
  transform: scale(1.02);
  opacity: 0.95;
}
.try-now-link:active {
  transform: scale(0.98);
}

.try-now-text {
  font-size: clamp(56px, 10vw, 128px);
  font-weight: 500;
  letter-spacing: -0.035em;
  color: white;
  margin: 0;
  line-height: 1;
}

.try-now-arrow {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}
.try-now-link:hover .try-now-arrow {
  background: rgba(255,255,255,0.30);
  transform: translateX(10px);
}

@media (max-width: 720px) {
  .try-now-arrow { width: 60px; height: 60px; }
  .try-now-arrow svg { width: 32px; height: 32px; }
  .try-now-link { gap: 20px; }
}

/* ===================== Footer ===================== */

.footer {
  padding: 48px 0 60px;
  border-top: 1px solid var(--c-line);
  font-size: 13px;
  color: var(--c-ink-soft);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}
.footer-name { font-weight: 500; color: var(--c-ink); }
.footer-tag { color: var(--c-ink-mute); }
.footer-links {
  display: flex; gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--c-ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--c-ink); }

/* ===================== Reduced motion ===================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
