:root {
  --bg: #06070a;
  --bg2: #0a0f1f;
  --text: #f5f7ff;
  --muted: #8ea2d9;
  --royal: #4169e1;
  --cornflower: #6495ed;
}

.light {
  --bg: #f7f9ff;
  --bg2: #e9efff;
  --text: #0b0f1a;
  --muted: #5b6ea8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(65, 105, 225, 0.25), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(100, 149, 237, 0.2), transparent 50%),
    linear-gradient(to bottom, var(--bg), var(--bg2));
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
}

.nav {
  position: fixed;
  width: 100%;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(100, 149, 237, 0.1);
  z-index: 10;
}

.nav a {
  color: var(--text);
  text-decoration: none;
}

.light .nav a {
  color: #0b0f1a;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

.brand img {
  width: 42px;
  height: 42px;
}

.brand span {
  font-weight: 600;
  letter-spacing: 1px;
}

.toggle {
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  border: 1px solid rgba(100, 149, 237, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
}

.hero {
  height: 85vh;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10%;
}

.hero h1 {
  display: inline-block;
  font-size: clamp(56px, 10vw, 150px);
  font-weight: 600;
  letter-spacing: -3px;
  color: var(--text);
  background: linear-gradient(90deg, #ffffff, var(--cornflower));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.light .hero h1 {
  color: #0b0f1a;
  background: linear-gradient(90deg, #0b0f1a, var(--royal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  margin-top: 14px;
  color: var(--muted);
}

.section {
  padding: 80px 10%;
}

.section h2 {
  font-size: 28px;
  margin-bottom: 28px;
  color: var(--cornflower);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 34px;
}

.feature {
  grid-column: span 2;
  padding: 70px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(65, 105, 225, 0.2), rgba(100, 149, 237, 0.1));
  border: 1px solid rgba(100, 149, 237, 0.2);
  position: relative;
  overflow: hidden;
}

.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(100, 149, 237, 0.3), transparent 60%);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

.feature > * {
  position: relative;
  z-index: 1;
}

.card {
  position: relative;
  padding: 44px;
  border-radius: 28px;
  background: rgba(65, 105, 225, 0.08);
  border: 1px solid rgba(100, 149, 237, 0.18);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: 0.35s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x) var(--y), rgba(100, 149, 237, 0.25), transparent 40%);
  opacity: 0;
  transition: 0.3s;
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.card p,
.about {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 25px 80px rgba(65, 105, 225, 0.25);
}

.glass-btn,
button {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  transition: 0.3s ease;
  text-decoration: none;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.light .glass-btn,
.light button {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.glass-btn:hover,
button:hover {
  transform: translateY(-3px);
}

.about {
  max-width: 650px;
  font-size: 17px;
}

/* ---------- Auth forms ---------- */

.form-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
}

.form-card {
  width: min(430px, 100%);
  padding: 38px;
  border-radius: 28px;
  background: rgba(65, 105, 225, 0.1);
  border: 1px solid rgba(100, 149, 237, 0.22);
  backdrop-filter: blur(14px);
}

.form-card h1 {
  margin-bottom: 12px;
}

label {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

input {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.light input {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--text);
}

input::placeholder {
  color: var(--muted);
}

input:focus {
  outline: none;
  border-color: var(--cornflower);
  box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.2);
}

.form-card button {
  width: 100%;
}

.form-card a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(100, 149, 237, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.form-card a:hover {
  color: var(--cornflower);
  border-bottom-color: var(--cornflower);
}

.light .form-card a {
  color: var(--royal);
}

.light .form-card a:hover {
  color: var(--cornflower);
}

.form-card a:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.25);
  border-radius: 3px;
}

.message {
  margin-top: 14px;
  color: #ffb3b3;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 20px;
}

.modal-card {
  width: min(400px, 100%);
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(65, 105, 225, 0.2), rgba(100, 149, 237, 0.1));
  border: 1px solid rgba(100, 149, 237, 0.25);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal-card h2 {
  margin-bottom: 8px;
  color: var(--cornflower);
}

/* ---------- Footer / socials ---------- */

footer {
  padding: 50px 10%;
  color: var(--muted);
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  transform: translateX(18px);
}

.socials a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: 0.25s ease;
}

.light .socials a {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.socials a:hover {
  transform: translateY(-3px) scale(1.05);
}

.socials img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.fade {
  opacity: 0;
  transform: translateY(40px);
  transition: 1s ease;
}

.fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .feature {
    grid-column: span 1;
    padding: 40px;
  }
  .card {
    padding: 40px;
  }
  .nav {
    padding: 16px 22px;
  }
  .hero h1 {
    font-size: clamp(48px, 12vw, 90px);
  }
  .socials {
    transform: none;
  }
  .brand span {
    display: none;
  }
}

/* ---------- Home button (top-left) ---------- */

.home-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(100, 149, 237, 0.3);
  background: rgba(65, 105, 225, 0.12);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.light .home-link {
  background: rgba(65, 105, 225, 0.1);
}

.home-link svg {
  width: 15px;
  height: 15px;
}

.home-link:hover {
  background: rgba(65, 105, 225, 0.25);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .home-link {
    top: 12px;
    left: 12px;
    padding: 6px 11px;
  }
}
