:root {
  --paper: #f6f5f1;
  --ink: #16171a;
  --navy: #1f3a64;
  --muted: #5e6066;
  --soft: #3b3c40;
  --line: #dedcd3;
  --card: rgba(255, 255, 255, 0.46);
  --max: 1120px;
  --font: Inter, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* Fixed fog canvas sits behind all page content. */
#fog-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 18px clamp(20px, 4vw, 48px);
  background: rgba(246, 245, 241, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 22px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--soft);
  text-decoration: none;
  padding: 4px 0;
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: var(--navy);
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 4vw, 48px) 80px;
}

.hero-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 10px 0;
}

/* Soft paper wash keeps text readable over the fog. */
.hero-text::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -72px -170px -68px -150px;
  pointer-events: none;
  background: radial-gradient(
    closest-side ellipse at 40% 50%,
    rgba(246, 245, 241, 0.97) 0%,
    rgba(246, 245, 241, 0.86) 44%,
    rgba(246, 245, 241, 0.38) 72%,
    rgba(246, 245, 241, 0) 100%
  );
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h1 span {
  display: block;
  color: var(--navy);
  margin-top: 0.12em;
}

.lede {
  max-width: 490px;
  margin: 0 0 30px;
  color: var(--soft);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease,
    color 180ms ease, transform 180ms ease;
}

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

.btn-primary {
  background: var(--navy);
  color: var(--paper);
}

.btn-primary:hover {
  background: #172c4d;
}

.btn-secondary {
  background: rgba(246, 245, 241, 0.58);
  border-color: rgba(22, 23, 26, 0.22);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.section {
  position: relative;
  z-index: 1;
  padding: clamp(64px, 9vw, 112px) clamp(20px, 4vw, 48px);
  background: var(--paper);
  border-top: 1px solid var(--line);
  scroll-margin-top: 92px;
}

.section-inner {
  max-width: 1040px;
  margin: 0 auto;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.14;
}

.section-inner > p {
  max-width: 680px;
  color: var(--muted);
}

.service-list {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.service-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.service-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 28px;
}

.service-heading h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.price {
  margin: 0;
  flex: 0 0 auto;
  color: var(--navy);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.service-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.service-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px 34px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.step-number {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 1px solid rgba(31, 58, 100, 0.32);
  border-radius: 50%;
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
}

.steps p {
  margin: 0;
  color: var(--soft);
  font-size: 0.98rem;
}

.honest-line {
  max-width: 760px;
  margin: 56px 0 0;
  padding-left: 24px;
  border-left: 3px solid var(--navy);
  color: var(--ink);
  font-size: clamp(1.22rem, 2.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

#magyarul .hu-list {
  display: grid;
  gap: 10px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
  max-width: 820px;
}

.hu-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.96rem;
}

.hu-list li:first-child {
  border-top: 1px solid var(--line);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.contact-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.contact-links a:hover {
  border-color: var(--navy);
  background: rgba(31, 58, 100, 0.05);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 30px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  max-width: 1040px;
  margin: 0 auto;
}

/* Fallback when WebGL is not available. */
html.no-webgl #fog-canvas {
  display: none;
}

html.no-webgl .hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: min(56vw, 740px);
  aspect-ratio: 676 / 368;
  background: url("../assets/levelup-logo.png") right center / contain no-repeat;
  opacity: 0.18;
  pointer-events: none;
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 132px;
  }

  .section {
    scroll-margin-top: 128px;
  }

  .site-header {
    padding: 14px 20px 16px;
  }

  .site-nav {
    gap: 6px 15px;
    font-size: 0.82rem;
  }

  .hero {
    padding: 132px 20px 64px;
  }

  .hero-text {
    max-width: none;
  }

  .hero-text::before {
    inset: -44px -40px -38px -36px;
    background: radial-gradient(
      closest-side ellipse at 40% 50%,
      rgba(246, 245, 241, 0.97) 0%,
      rgba(246, 245, 241, 0.88) 52%,
      rgba(246, 245, 241, 0) 100%
    );
  }

  h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .service-heading {
    display: block;
  }

  .price {
    margin-top: 6px;
    text-align: left;
  }

  .honest-line {
    margin-top: 44px;
    padding-left: 18px;
  }

  html.no-webgl .hero::after {
    top: 46%;
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
