@import url('./brand.css');

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

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body-text);
  background: var(--page-bg);
}

a {
  color: var(--brand-accent);
  text-decoration: none;
}

a:hover {
  color: var(--brand-accent-hover);
  text-decoration: underline;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.container-wide {
  width: min(1280px, 92%);
  margin: 0 auto;
}

/* ── Public header ── */
.site-header {
  background: var(--brand-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a:not(.btn) {
  color: var(--text-muted-dark);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:not(.btn):hover,
.nav a.nav-active {
  color: var(--brand-accent);
  text-decoration: none;
}

.nav-user {
  color: var(--text-muted-dark);
  font-size: 0.85rem;
}

.main-content {
  padding: 0;
  flex: 1;
}

.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-shell .main-content {
  flex: 1;
}

/* ── Footer ── */
.site-footer {
  background: var(--brand-dark);
  color: var(--text-on-dark);
  padding: 3rem 0 1.5rem;
  border-top: none;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand p {
  margin: 0 0 1rem;
  color: #9ca3af;
  line-height: 1.6;
  max-width: 28rem;
}

.footer-col h3 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-on-dark);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

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

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* ── Hero (legacy card hero for auth etc.) ── */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.hero p {
  margin: 0 auto 1.5rem;
  max-width: 560px;
  color: #4b5563;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Auth pages ── */
.auth-page {
  background: var(--page-bg);
}

.auth-page .site-header {
  position: relative;
}

.auth-page .main-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 4rem;
}

.auth-page .card {
  width: 100%;
  max-width: 440px;
}

/* ── Cards ── */
.card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(11, 17, 48, 0.08);
}

.card-wide {
  max-width: none;
}

.card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: #111827;
}

.card .subtitle {
  margin: 0 0 1.5rem;
  color: var(--body-muted);
  font-size: 0.95rem;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}

.form-footer {
  margin-top: 1.25rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-end) 100%);
  color: #111827;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-brand);
}

.btn:hover {
  background: linear-gradient(135deg, var(--brand-accent-hover) 0%, var(--brand-accent) 100%);
  color: #111827;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
  text-align: center;
}

.btn-small {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  box-shadow: none;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
  box-shadow: none;
}

.btn-secondary:hover {
  background: #d1d5db;
  color: #111827;
  transform: none;
}

/* ── Alerts ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.muted-link {
  display: block;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--body-muted);
}

.errors {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem 0.75rem 2rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
}

.errors li {
  margin-bottom: 0.25rem;
}
