/* A1 — Welcome / first visit */

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-on-background);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.welcome {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 100vh;
  height: 100%;
}

/* —— Atmosphere / map plane (full-bleed right) —— */
.welcome-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: var(--map-land);
  order: 2;
}

.welcome-visual .map-canvas {
  position: absolute;
  inset: 0;
  transform: scale(1.08);
  animation: map-drift 18s ease-in-out infinite alternate;
}

@keyframes map-drift {
  from { transform: scale(1.06) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.5%, 1%); }
}

.map-water {
  position: absolute;
  background: var(--map-water);
  border-radius: 40% 60% 55% 45%;
}

.map-park {
  position: absolute;
  background: var(--map-park);
  border-radius: 30%;
}

.map-road {
  position: absolute;
  background: var(--map-road);
  border-radius: 2px;
}

.map-road.major {
  background: var(--map-road-major);
}

.map-label {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--map-label);
  pointer-events: none;
}

.welcome-pin {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 5px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  box-shadow: var(--shadow-pin);
  transform: translate(-50%, -100%);
  animation: pin-soft 3.2s ease-in-out infinite;
}

.welcome-pin:nth-child(2) { animation-delay: 0.4s; }
.welcome-pin:nth-child(3) { animation-delay: 0.9s; }

@keyframes pin-soft {
  0%, 100% { transform: translate(-50%, -100%); }
  50% { transform: translate(-50%, -108%); }
}

.welcome-pin .pin-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary-container);
  color: var(--color-primary);
}

.welcome-pin .pin-ico svg {
  width: 13px;
  height: 13px;
}

.welcome-pin .pin-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-on-surface);
}

.welcome-pin .pin-rating svg {
  width: 11px;
  height: 11px;
  color: var(--color-primary);
}

.welcome-fade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--color-background) 0%,
    color-mix(in srgb, var(--color-background) 35%, transparent) 18%,
    transparent 42%
  );
}

[data-theme="dark"] .welcome-fade {
  background: linear-gradient(
    90deg,
    var(--color-background) 0%,
    color-mix(in srgb, var(--color-background) 55%, transparent) 22%,
    transparent 48%
  );
}

/* —— Content —— */
.welcome-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 72px) clamp(28px, 5vw, 64px);
  order: 1;
  background: var(--color-background);
}

.welcome-brand {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--color-on-background);
  animation: rise 0.7s ease-out both;
}

.welcome-brand span {
  color: var(--color-primary);
}

.welcome-headline {
  margin: 0 0 14px;
  max-width: 14em;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--color-on-background);
  animation: rise 0.7s ease-out 0.08s both;
}

.welcome-lead {
  margin: 0 0 32px;
  max-width: 28em;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--color-on-surface-variant);
  animation: rise 0.7s ease-out 0.16s both;
}

.welcome-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: rise 0.7s ease-out 0.24s both;
}

@keyframes rise {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s, background 0.15s, border-color 0.15s;
}

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

.btn-primary:hover {
  filter: brightness(0.95);
}

.btn-ghost {
  background: var(--color-surface);
  border-color: var(--color-outline);
  color: var(--color-on-surface);
}

.btn-ghost:hover {
  background: var(--color-surface-variant);
}

.welcome-foot {
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--color-on-surface-variant);
  animation: rise 0.7s ease-out 0.32s both;
}

.welcome-foot a {
  color: var(--color-primary);
  font-weight: 650;
  text-decoration: none;
}

.welcome-foot a:hover {
  text-decoration: underline;
}

.mock-tag {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 70;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  border: 1px solid var(--color-outline);
  color: var(--color-on-surface-variant);
  pointer-events: none;
  line-height: 1.2;
}

.mock-tag a {
  pointer-events: auto;
  text-decoration: underline;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .welcome {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(42vh, 48vh) 1fr;
  }

  .welcome-visual {
    order: 1;
    min-height: 42vh;
  }

  .welcome-content {
    order: 2;
    padding: 28px 22px 40px;
    justify-content: flex-start;
  }

  .welcome-fade {
    background: linear-gradient(
      180deg,
      transparent 40%,
      color-mix(in srgb, var(--color-background) 40%, transparent) 70%,
      var(--color-background) 100%
    );
  }

  .welcome-brand {
    margin-bottom: 18px;
  }

  .welcome-cta {
    flex-direction: column;
  }

  .welcome-cta .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-brand,
  .welcome-headline,
  .welcome-lead,
  .welcome-cta,
  .welcome-foot,
  .welcome-visual .map-canvas,
  .welcome-pin {
    animation: none;
  }
}
