:root {
  --bg: #0c1116;
  --bg-elevated: #141b22;
  --ink: #e8eef4;
  --muted: #8b9aab;
  --accent: #1aa6c4;
  --accent-strong: #0e7f99;
  --line: rgba(232, 238, 244, 0.12);
  --tile: rgba(20, 27, 34, 0.88);
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.landing {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  background: rgba(12, 17, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-text {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.nav-text:hover {
  color: var(--ink);
}

.landing-lang-wrap {
  display: inline-flex;
  align-items: center;
}

.landing-lang-select {
  min-width: 7.5rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.landing-lang-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-login {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease;
}

.nav-login:hover {
  background: var(--accent);
  color: #041016;
}

.landing-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 5.5rem 1.5rem 3rem;
  overflow: hidden;
}

.hero-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 360px);
  gap: 2.5rem;
  align-items: end;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  animation: heroRise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-login-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(100%, 360px);
}

.hero-login-stack > .cta-primary {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.hero-login-form {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 1.25rem 1.35rem 1.4rem;
  background: rgba(20, 27, 34, 0.9);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  animation: heroRise 1100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-login-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.hero-login-form .cta-primary {
  width: 100%;
  margin-top: 0.35rem;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(12, 17, 22, 0.2) 10%, rgba(12, 17, 22, 0.78) 55%, rgba(12, 17, 22, 0.92) 100%),
    radial-gradient(ellipse 80% 60% at 70% 35%, rgba(26, 166, 196, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(14, 127, 153, 0.25), transparent 50%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 47px,
      rgba(232, 238, 244, 0.04) 47px,
      rgba(232, 238, 244, 0.04) 48px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 47px,
      rgba(232, 238, 244, 0.04) 47px,
      rgba(232, 238, 244, 0.04) 48px
    ),
    linear-gradient(160deg, #1a2833 0%, #0c1116 55%, #070b0f 100%);
  transform: scale(1.02);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 18% 8% auto auto;
  width: min(48vw, 520px);
  height: min(48vw, 520px);
  border: 1px solid rgba(26, 166, 196, 0.35);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(232, 238, 244, 0.05);
  animation: ringPulse 7s ease-in-out infinite;
}

.brand-hero {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink);
}

.landing-hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 500;
  line-height: 1.25;
  color: #d5e2ec;
}

.hero-support {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-primary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.cta-primary {
  background: var(--accent);
  color: #041016;
}

.cta-primary:hover {
  background: #35c5e0;
  transform: translateY(-1px);
}

.cta-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.cta-secondary:hover {
  border-color: var(--accent);
}

.landing-section {
  width: min(1100px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 4.5rem 0 1rem;
}

.landing-section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 1.75rem;
  max-width: 46rem;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

.about-section {
  border-top: 1px solid var(--line);
}

.project-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.project-tile {
  min-height: 180px;
  padding: 1.15rem 1.1rem 1.25rem;
  background: var(--tile);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 180ms ease, transform 180ms ease;
  animation: tileIn 500ms ease both;
}

.project-tile:hover {
  border-color: rgba(26, 166, 196, 0.55);
  transform: translateY(-2px);
}

.project-tile h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.project-tile .tile-brief {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.project-tile .tile-meta {
  margin: 0;
  font-size: 0.75rem;
  color: #6f8092;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tile-empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

.register-section {
  padding-bottom: 5rem;
}

.register-form {
  max-width: 420px;
  padding: 1.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.partner-register-form {
  max-width: min(920px, 100%);
}

.partner-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.25rem;
}

@media (min-width: 760px) {
  .partner-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .partner-form-span {
    grid-column: 1 / -1;
  }
}

.partner-form-field .field-label {
  margin-top: 0.85rem;
}

.partner-form-field:first-child .field-label {
  margin-top: 0;
}

.partner-map {
  width: 100%;
  height: 280px;
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  z-index: 1;
}

.partner-coords-readout,
.partner-location-summary {
  margin-top: 0.5rem;
}

.partner-location-summary {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--line);
  opacity: 0.9;
}

.field-hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.field-label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.register-form input[type="text"],
.register-form input[type="password"],
.register-form input[type="tel"],
.register-form textarea,
.register-form select {
  width: 100%;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  background: #0c1116;
  color: var(--ink);
  font: inherit;
}

.register-form textarea {
  resize: vertical;
  min-height: 5rem;
}

.register-form select[multiple] {
  min-height: 11rem;
}

.role-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.role-options-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 0.85rem;
  max-height: 11rem;
  overflow: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: #0c1116;
}

@media (min-width: 520px) {
  .role-options-compact {
    grid-template-columns: 1fr 1fr;
  }
}

.role-options label {
  color: var(--ink);
  font-size: 0.92rem;
}

.register-form .cta-primary {
  width: 100%;
  margin-top: 1.15rem;
}

.form-footer {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-footer a {
  color: var(--accent);
}

.status {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.status.success {
  color: #6dcb8b;
}

.status.error {
  color: #e07a7a;
}

.hidden {
  display: none !important;
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.landing-footer a {
  color: var(--accent);
  text-decoration: none;
}

@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.5%, 1%, 0); }
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.04); }
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tileIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .landing-nav-actions .nav-text {
    display: none;
  }

  .landing-lang-select {
    min-width: 6.5rem;
  }

  .landing-hero {
    align-items: center;
    padding-bottom: 3rem;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: stretch;
  }

  .landing-section {
    width: calc(100% - 2rem);
  }
}
