:root {
  --bg: #f5f4f2;
  --panel: #eff2f7;
  --line: #e0e5eb;
  --navy: #1e2736;
  --muted: #9ba8bc;
  --blue: #2e5fa9;
  --red: #d14a40;
  --red-deep: #bf4037;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--navy);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  overflow-x: hidden;
}

button, input {
  font: inherit;
}

.site-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 28px 0 28px;
  background: var(--bg);
}

.wordmark {
  color: var(--red);
  font-family: "Space Grotesk", sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.16em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transform: translateY(-1px);
}

.wordmark::after {
  content: "↓";
  display: inline-block;
  margin-left: 12px;
  font-size: 20px;
  line-height: 1;
  color: var(--blue);
  transform: translateY(-2px);
}

.header-arrow {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
  padding: 0;
  margin-left: 8px;
  cursor: pointer;
  transform: translateY(-2px);
}

.tagline {
  display: none;
}

.entry-page {
  min-height: calc(100vh - 76px - 88px);
  display: grid;
  place-items: center;
  background: var(--bg);
}

.entry-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-8px);
}

.entry-country,
.entry-route {
  color: var(--navy);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.entry-country {
  font-size: 20px;
  line-height: 1.2;
}

.entry-arrow {
  color: #d0d7e4;
  font-size: 24px;
  line-height: 1;
  margin: 12px 0 14px;
}

.spain-flag {
  font-size: 32px;
  line-height: 1;
  transform: translateY(-1px);
}

.entry-route {
  margin-top: 10px;
  font-size: 28px;
  line-height: 1.3;
  text-align: center;
}

.move-button {
  margin-top: 48px;
  width: 268px;
  height: 72px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
  color: var(--white);
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 14px rgba(190, 64, 55, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.move-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 18px rgba(190, 64, 55, 0.22);
}

.roadmap-page {
  display: none;
  min-height: calc(100vh - 76px - 88px);
  position: relative;
  padding: 18px 0 0;
  background: var(--bg);
}

.roadmap-page.visible {
  display: block;
}

.route-selector {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 0 8px;
  color: var(--navy);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.route-selector-arrow {
  color: var(--muted);
  font-size: 16px;
}

.roadmap-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 18px 14px;
  scrollbar-width: thin;
}

.roadmap {
  min-width: 1100px;
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: flex-start;
  padding-top: 8px;
}

.stage {
  flex: 0 0 auto;
  width: 170px;
  text-align: center;
}

.stage-circle {
  position: relative;
  width: 120px;
  height: 120px;
  border: none;
  border-radius: 50%;
  background: rgba(244,244,243,0.6);
  color: #6b7a92;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(173,182,193,0.18);
  transition: all 0.18s ease;
}

.stage.active .stage-circle {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 18px rgba(46, 95, 169, 0.18);
}

.stage.completed .stage-circle {
  background: rgba(245,244,242,0.8);
  color: #657382;
  box-shadow: inset 0 0 0 2.5px rgba(209, 74, 64, 0.24);
}

.stage-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(131, 142, 155, 0.6);
}

.stage.active .stage-dot {
  background: rgba(255,255,255,0.88);
}

.stage-connector {
  flex: 0 0 68px;
  margin-top: 44px;
  color: #cdd4e0;
  font-size: 28px;
  line-height: 1;
  text-align: center;
}

.stage.completed + .stage-connector {
  color: var(--red);
}

.stage-details {
  width: 270px;
  margin-top: 22px;
  margin-left: -28px;
  text-align: left;
}

.checklist {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--navy);
  font-weight: 500;
}

.checklist div {
  margin: 0;
}

.checklist span {
  display: block;
  color: #a6b2c5;
  font-size: 18px;
  line-height: 1;
  margin: 6px 0 5px;
}

.checklist .ellipsis {
  color: #b5bccb;
  font-size: 22px;
  margin-top: 4px;
}

.document-form {
  margin-top: 26px;
  text-align: left;
}

.document-form label {
  display: block;
  color: #717d92;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.document-form input {
  width: 100%;
  height: 44px;
  border: 1px solid #dce3f0;
  border-radius: 8px;
  background: rgba(255,255,255,0.35);
  padding: 0 14px;
  color: var(--navy);
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease;
}

.document-form input::placeholder {
  color: #a9b5ca;
}

.document-form input:focus {
  border-color: var(--blue);
  background: rgba(255,255,255,0.5);
}

.document-form button {
  width: 100%;
  height: 44px;
  margin-top: 11px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease;
}

.document-form button:hover {
  background: #284fa0;
}

.form-message {
  min-height: 18px;
  color: #8a95a8;
  font-size: 12px;
  margin: 10px 0 0;
}

.site-footer {
  min-height: 88px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--bg);
}

.site-footer > div {
  color: #9ba8bc;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.site-footer nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-footer a {
  color: #62748a;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.18s ease;
}

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

.site-footer a[href="#"]::before {
  content: "in";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  padding: 0 1px;
  border-radius: 3px;
  border: 1px solid #c9d2e2;
  background: rgba(255,255,255,0.22);
  font-size: 9px;
  font-weight: 700;
  color: #586891;
  line-height: 1;
}

.success-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(360px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e0e5eb;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(12, 18, 28, 0.08);
  padding: 16px 18px;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.24s ease;
  z-index: 1000;
}

.success-toast.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.success-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8f5ed;
  color: #2d8a52;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.success-toast-text {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.5;
}

.success-toast-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .site-header {
    height: 70px;
    padding: 0 18px;
  }

  .wordmark {
    font-size: 28px;
    letter-spacing: 0.14em;
  }

  .entry-page {
    min-height: calc(100vh - 70px - 90px);
  }

  .entry-country {
    font-size: 18px;
  }

  .entry-route {
    font-size: 24px;
  }

  .move-button {
    width: 240px;
    height: 68px;
    font-size: 16px;
    margin-top: 44px;
  }

  .roadmap-page {
    min-height: calc(100vh - 70px - 90px);
  }

  .route-selector {
    padding-left: 8px;
    margin-bottom: 14px;
  }

  .roadmap-viewport {
    padding: 0 12px 12px;
  }

  .roadmap {
    min-width: 900px;
  }

  .stage {
    width: 160px;
  }

  .stage-circle {
    width: 110px;
    height: 110px;
    font-size: 13px;
  }

  .stage-connector {
    flex: 0 0 60px;
    margin-top: 40px;
    font-size: 26px;
  }

  .site-footer {
    min-height: 90px;
    padding: 0 16px;
  }

  .site-footer nav {
    gap: 14px;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 66px;
    padding: 0 16px;
  }

  .wordmark {
    font-size: 26px;
  }

  .entry-page {
    min-height: calc(100vh - 66px - 88px);
  }

  .entry-country {
    font-size: 17px;
  }

  .entry-route {
    font-size: 22px;
    max-width: 280px;
  }

  .move-button {
    width: 220px;
    height: 64px;
    font-size: 15px;
    margin-top: 40px;
  }

  .site-footer {
    flex-direction: column;
    min-height: 96px;
    justify-content: center;
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 8px;
  }

  .site-footer nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
