:root {
  --red: #D7141A;
  --red-dark: #9B0F13;
  --red-deep: #6E0A0D;
  --ink: #141414;
  --ink-soft: #3a3a3a;
  --muted: #6a6a6a;
  --paper: #ffffff;
  --snow: #fafafa;
  --cream: #f4eeea;
  --line: #eeeaea;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 10px 30px rgba(215,20,26,.12);
  --shadow-lg: 0 20px 60px rgba(20,20,20,.18);
  --f-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-display: 'Bebas Neue', 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

.container { width: min(1120px, 92%); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark { width: 44px; height: 44px; object-fit: contain; }
.brand-text strong { font-size: 18px; letter-spacing: -.01em; display: block; line-height: 1; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--red); }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer; padding: 8px;
  width: 42px; height: 42px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  margin: 4px auto; transition: transform .2s, opacity .2s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(60px, 10vw, 120px);
  overflow: hidden;
  background:
    radial-gradient(1100px 500px at 110% -10%, rgba(215,20,26,.18), transparent 60%),
    radial-gradient(600px 300px at -10% 110%, rgba(110,10,13,.08), transparent 60%),
    linear-gradient(#fff, #fff);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(215,20,26,.25);
  border-radius: 999px;
  background: rgba(215,20,26,.06);
}
.hero-copy h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 80px);
  line-height: .95;
  margin: 0 0 18px;
  letter-spacing: .005em;
}
.hero-copy h1 .accent { color: var(--red); }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 54ch; margin: 0 0 28px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-block { width: 100%; max-width: 100%; min-width: 0; }

.hero-stats {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; gap: 36px; flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.hero-stats li { display: flex; align-items: baseline; gap: 10px; letter-spacing: .04em; text-transform: uppercase; }
.hero-stats li span {
  font-family: var(--f-display);
  font-size: 34px;
  color: var(--red);
  letter-spacing: 0;
  line-height: 1;
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.hero-art .circle-bg {
  position: absolute; inset: 12% 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--red), var(--red-deep) 70%);
  filter: blur(.5px);
  box-shadow: 0 40px 100px rgba(215,20,26,.35);
  animation: float 8s ease-in-out infinite;
}
.hero-art .hero-logo {
  position: relative;
  width: 88%;
  max-width: 460px;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.18));
  animation: float 8s ease-in-out infinite reverse;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 9vw, 110px) 0; }
.section-light { background: var(--snow); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark {
  background:
    radial-gradient(700px 300px at 50% 120%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(135deg, var(--red-deep), var(--red-dark));
  color: #fff;
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: .01em;
}
.section-lede { color: var(--ink-soft); font-size: 17px; margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--red);
  margin-top: 7px;
  box-shadow: 0 0 0 4px rgba(215,20,26,.12);
  flex-shrink: 0;
}

/* ---------- Universities ---------- */
.uni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.uni-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.uni-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
}
.uni-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(215,20,26,.2);
}
.uni-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.uni-name {
  font-family: var(--f-display);
  font-size: 34px;
  color: var(--red);
  line-height: 1;
  margin: 0;
  letter-spacing: .02em;
}
.uni-city { font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.uni-full { color: var(--ink-soft); font-size: 14px; margin: 0; }
.uni-sessions { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.uni-sessions li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px;
  background: var(--snow);
  border-radius: 10px;
  font-size: 14px;
}
.uni-sessions .day { font-weight: 600; color: var(--ink); }
.uni-sessions .time { color: var(--ink-soft); }
.mode-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}
.mode-virtual { background: #eef3ff; color: #1a48c7; }
.mode-presencial { background: rgba(215,20,26,.1); color: var(--red-dark); }
.uni-note {
  font-size: 12px; color: var(--muted); font-style: italic; margin-top: 4px;
}
.legal-note { margin-top: 28px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Verse ---------- */
.verse {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 36px;
  max-width: 900px;
  margin: 0 auto;
}
.verse-art {
  width: 180px; height: 180px; object-fit: contain;
  filter: brightness(0) invert(1) opacity(.9);
}
.verse blockquote { margin: 0; }
.verse blockquote p {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: .005em;
}
.verse cite { font-style: normal; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }

/* ---------- Form ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.form { display: grid; gap: 14px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215,20,26,.15);
}
.form-status { margin: 4px 0 0; font-size: 14px; min-height: 1.2em; }
.form-status.success { color: #0a7a3d; }
.form-status.error { color: var(--red-dark); }

.contact-meta { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 15px; color: var(--ink-soft); }

/* ---------- Auth (register / login / welcome) ---------- */
.verify-banner {
  margin: 0 auto;
  max-width: 1120px;
  width: 92%;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
}
.verify-ok    { background: #e8f6ee; color: #0a7a3d; border: 1px solid #c2e4d0; }
.verify-error { background: rgba(215,20,26,.08); color: var(--red-dark); border: 1px solid rgba(215,20,26,.2); }

.auth-form { gap: 14px; min-width: 0; }
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  min-width: 0;
}
.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215,20,26,.15);
}

/* ---------- Header auth cluster ---------- */
.header-auth { display: flex; align-items: center; gap: 10px; }
.header-auth-guest,
.header-auth-user { display: flex; align-items: center; gap: 10px; }
.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 999px;
}

/* ---------- Logged-in user strip on landing ---------- */
.user-strip {
  background: linear-gradient(135deg, rgba(215,20,26,.05), rgba(215,20,26,0));
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.user-strip-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: center;
}
.user-strip h3 {
  font-family: var(--f-display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: .01em;
  margin: 6px 0 4px;
}
.user-strip-meta {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.user-strip-meta small { color: var(--red-dark); margin-left: 6px; }
.user-strip-sessions { margin: 0; }

@media (max-width: 720px) {
  .user-strip-inner { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- CTA join section (replaces old #unirme card) ---------- */
.cta-join-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.cta-join-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
@media (max-width: 800px) {
  .cta-join-inner { grid-template-columns: 1fr; }
}

/* ---------- Full-viewport auth pages (signup.html, login.html) ---------- */
.auth-page {
  min-height: 100vh;
  background: var(--snow);
}
.auth-back {
  position: fixed;
  top: 22px;
  left: 22px;
  z-index: 5;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
  transition: color .15s, border-color .15s, transform .15s;
}
.auth-back:hover { color: var(--red); border-color: var(--red); transform: translateX(-2px); }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-aside {
  position: relative;
  background: var(--red);
  color: #fff;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.auth-aside::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 80%;
  aspect-ratio: 1;
  background: radial-gradient(circle at center, rgba(255,255,255,.18), transparent 60%);
  filter: blur(20px);
  z-index: -1;
}
.auth-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  margin-bottom: 18px;
}
.auth-display {
  font-family: var(--f-display);
  font-size: clamp(56px, 8vw, 96px);
  line-height: .95;
  margin: 0 0 18px;
  letter-spacing: .015em;
}
.auth-display .accent { color: #ffd2d4; }
.auth-aside-lede {
  max-width: 360px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,.9);
  margin: 0;
}
.auth-main {
  display: flex;
  flex-direction: column;
  padding: 56px clamp(24px, 6vw, 72px);
  background: var(--paper);
  position: relative;
}
.auth-head { margin-bottom: 36px; }
.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: var(--shadow-md);
  max-width: 520px;
  width: 100%;
  margin: auto 0;
}
.auth-card-logo {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto 18px;
  filter: drop-shadow(0 12px 24px rgba(215,20,26,.18));
}
.auth-title {
  font-family: var(--f-display);
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1;
  margin: 8px 0 6px;
  letter-spacing: .01em;
}
.auth-card:has(.auth-card-logo) .auth-title,
.auth-card:has(.auth-card-logo) .auth-sub {
  text-align: center;
}
.auth-sub {
  color: var(--ink-soft);
  margin: 0 0 22px;
  font-size: 15px;
}
.auth-alt {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}
.auth-foot {
  margin-top: 36px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
}

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside {
    padding: 48px 32px 56px;
    min-height: 280px;
  }
  .auth-aside::before { width: 100%; aspect-ratio: 1.6; }
  .auth-main { padding: 36px 24px 48px; }
  .auth-back { top: 16px; left: 16px; }
}

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: #111;
  color: #eee;
  padding: 48px 0 24px;
}
.site-footer a { color: #eee; opacity: .8; }
.site-footer a:hover { color: #fff; opacity: 1; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}
.foot-brand img { width: 160px; filter: brightness(0) invert(1); margin-bottom: 10px; }
.foot-brand p { color: #bbb; font-size: 14px; margin: 0; max-width: 50ch; }
.foot-nav { display: flex; gap: 24px; justify-content: flex-end; flex-wrap: wrap; }
.copy {
  grid-column: 1 / -1;
  border-top: 1px solid #222;
  padding-top: 18px;
  margin-top: 24px;
  font-size: 13px;
  color: #888;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; aspect-ratio: 5 / 4; max-width: 380px; margin: 0 auto; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .verse { grid-template-columns: 1fr; text-align: center; }
  .verse-art { margin: 0 auto; width: 140px; height: 140px; }
  .footer-inner { grid-template-columns: 1fr; }
  .foot-nav { justify-content: flex-start; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    padding: 18px 24px 24px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .nav-toggle { display: block; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
}
