/* ============================================================
   style.css — Refined dark editorial aesthetic
   ============================================================ */

/* --- Variables --- */
:root {
  --bg:          #0d0d0f;
  --bg-card:     #141416;
  --bg-elevated: #1c1c20;
  --border:      #2a2a30;
  --border-focus:#6b63f5;

  --text:        #f0eff6;
  --text-muted:  #7c7a8e;
  --text-dim:    #4a4858;

  --accent:      #6b63f5;
  --accent-soft: rgba(107, 99, 245, 0.15);
  --accent-glow: rgba(107, 99, 245, 0.4);

  --error:       #f25f5c;
  --error-soft:  rgba(242, 95, 92, 0.12);

  --radius:      10px;
  --radius-lg:   16px;
  --transition:  0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* --- Nav --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a:hover { color: var(--text); opacity: 1; }

.btn-nav {
  background: var(--accent-soft);
  color: var(--accent) !important;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: 1px solid rgba(107, 99, 245, 0.3);
}

.btn-nav:hover {
  background: var(--accent) !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* --- Main / Footer --- */
.main { flex: 1; padding: 3rem 2.5rem; max-width: 1100px; margin: 0 auto; width: 100%; }

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* --- Hero --- */
.hero {
  padding: 5rem 0 4rem;
  max-width: 640px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(107, 99, 245, 0.25);
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 420px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: box-shadow var(--transition), transform var(--transition), opacity var(--transition);
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
  opacity: 1;
  color: #fff;
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--text-muted);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: border-color var(--transition), color var(--transition);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--text); opacity: 1; }

/* --- Features --- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: rgba(107, 99, 245, 0.4);
  transform: translateY(-2px);
}

.feature-icon { font-size: 1.75rem; margin-bottom: 1rem; }

.feature-card h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* --- Auth forms --- */
.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 0;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.35s ease both;
}

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

.auth-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.auth-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.75rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}

.field input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(107, 99, 245, 0.18);
}

.field-error input { border-color: var(--error); }
.field-error input:focus { box-shadow: 0 0 0 3px rgba(242, 95, 92, 0.18); }

.field-msg {
  font-size: 0.8rem;
  color: var(--error);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.alert-error {
  background: var(--error-soft);
  border: 1px solid rgba(242, 95, 92, 0.3);
  color: var(--error);
}

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.btn-submit:hover {
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

/* --- Profile --- */
.profile-wrap {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 460px;
  text-align: center;
  animation: slideUp 0.35s ease both;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid rgba(107, 99, 245, 0.4);
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.profile-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.profile-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(107, 99, 245, 0.25);
}

.profile-details {
  margin: 2rem 0;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.detail-row:last-child { border-bottom: none; }

.profile-details dt {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

.profile-details dd {
  font-size: 0.9rem;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

.btn-logout {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition);
}

.btn-logout:hover { border-color: var(--error); color: var(--error); opacity: 1; }

/* --- Responsive --- */
@media (max-width: 600px) {
  .nav { padding: 1rem 1.25rem; }
  .main { padding: 2rem 1.25rem; }
  .hero { padding: 3rem 0 2rem; }
  .auth-card, .profile-card { padding: 1.75rem 1.25rem; }
}
