/* ────────────────────────────────────────────────────────────
   Base reset & tokens
──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  color: #0B0B0F;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}

a { color: #1F3BFF; text-decoration: none; transition: color 0.15s; }
a:hover { color: #0A1FCC; }

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  margin: 0;
  letter-spacing: -0.02em;
}

/* ────────────────────────────────────────────────────────────
   Layout
──────────────────────────────────────────────────────────── */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.row  { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ────────────────────────────────────────────────────────────
   Components
──────────────────────────────────────────────────────────── */
.btn {
  font: 700 15px 'DM Sans', sans-serif;
  min-height: 44px; padding: 0 20px;
  border-radius: 10px;
  border: 2px solid #1F3BFF;
  background: #1F3BFF; color: #fff;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
}
.btn:hover:not(:disabled) {
  background: #1530e0;
  box-shadow: 0 4px 16px rgba(31,59,255,0.3);
  transform: translateY(-1px);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn.alt { background: transparent; color: #1F3BFF; }
.btn.alt:hover { background: rgba(31,59,255,0.07); box-shadow: none; }
.btn.no  { background: #fff; color: #E5173F; border-color: #E5173F; }
.btn.no:hover { background: #fff0f0; box-shadow: 0 4px 14px rgba(229,23,63,0.2); }

.btn:focus-visible,
.field:focus-visible,
button.d:focus-visible,
.role button:focus-visible { outline: 3px solid #0B0B0F; outline-offset: 2px; }

.card {
  background: #fff;
  border: 2px solid #0B0B0F;
  border-radius: 16px;
}

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

.img {
  height: 150px;
  border-radius: 12px 12px 0 0;
  display: flex; align-items: center; justify-content: center;
  font: 600 13px 'DM Sans', sans-serif; color: #0B0B0F;
}

.tag {
  display: inline-block;
  font: 700 12px 'DM Sans', sans-serif;
  padding: 4px 10px;
  border-radius: 99px;
  background: #FFD60A; color: #0B0B0F;
}
.tag.pending { background: #FF8A00; }
.tag.red     { background: #E5173F; color: #fff; }

/* ────────────────────────────────────────────────────────────
   Calendar
──────────────────────────────────────────────────────────── */
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-size: 14px;
  text-align: center;
}
.cal b { font-size: 12px; color: #4A4A55; }
.d     { font-style: normal; padding: 10px 0; border-radius: 8px; background: #F0F0F0; }
button.d { border: 0; font: inherit; color: inherit; cursor: pointer; min-height: 44px; transition: background 0.12s; }
button.d:disabled { cursor: not-allowed; opacity: .4; }
.d.p  { background: #FF8A00; color: #0B0B0F; }
.d.b, button.d.b:disabled { background: #E5173F; color: #fff; text-decoration: line-through; opacity: 1; }
.d.s  { background: #1F3BFF; color: #fff; font-weight: 700; }

/* ────────────────────────────────────────────────────────────
   Sections
──────────────────────────────────────────────────────────── */
.sec     { padding: 72px 0; }
.sec.alt { background: #fff; border-top: 2px solid #0B0B0F; border-bottom: 2px solid #0B0B0F; }
.muted   { color: #4A4A55; }

/* ────────────────────────────────────────────────────────────
   Forms
──────────────────────────────────────────────────────────── */
input, textarea, select { font: 16px 'DM Sans', sans-serif; }
.field {
  display: block; width: 100%;
  padding: 0 12px; min-height: 44px;
  border: 2px solid #0B0B0F; border-radius: 10px;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field:focus { border-color: #1F3BFF; box-shadow: 0 0 0 3px rgba(31,59,255,0.12); outline: none; }
textarea.field { padding: 12px; }
.lbl { display: block; font-weight: 700; font-size: 14px; margin: 16px 0 6px; }
.msg { min-height: 20px; font-weight: 700; font-size: 14px; margin: 12px 0 0; }
.msg.err { color: #E5173F; }
.msg.ok  { color: #0A1FCC; }

/* ────────────────────────────────────────────────────────────
   Role switcher
──────────────────────────────────────────────────────────── */
.role { display: flex; border: 2px solid #0B0B0F; border-radius: 10px; overflow: hidden; }
.role button { border: 0; background: #fff; color: #0B0B0F; font: 700 14px 'DM Sans', sans-serif; min-height: 40px; padding: 0 14px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.role button[aria-pressed=true] { background: #0B0B0F; color: #fff; }

/* ────────────────────────────────────────────────────────────
   Dialog
──────────────────────────────────────────────────────────── */
dialog { border: 2px solid #0B0B0F; border-radius: 16px; padding: 28px; max-width: 420px; width: calc(100% - 48px); }
dialog::backdrop { background: rgba(11,11,15,.6); backdrop-filter: blur(4px); }

/* ────────────────────────────────────────────────────────────
   Header
──────────────────────────────────────────────────────────── */
header {
  background: #fff;
  border-bottom: 2px solid #0B0B0F;
  position: sticky; top: 0; z-index: 100;
}
.header-logo {
  font: 800 22px 'Bricolage Grotesque', sans-serif;
  color: #1F3BFF;
  letter-spacing: -0.02em;
}

/* ────────────────────────────────────────────────────────────
   Footer
──────────────────────────────────────────────────────────── */
.site-footer {
  background: #0B0B0F;
  color: #fff;
  padding: 64px 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-logo {
  font: 800 26px 'Bricolage Grotesque', sans-serif;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.footer-tagline {
  color: #9999bb;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 24px;
}

.footer-social { display: flex; gap: 10px; }

.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  color: #9999bb;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.18s, color 0.18s, transform 0.15s;
}
.social-link:hover {
  background: #1F3BFF;
  color: #fff;
  transform: translateY(-2px);
}

.footer-col-title {
  font: 700 12px 'DM Sans', sans-serif;
  letter-spacing: 0.08em;
  color: #6b6b80;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col ul li { font-size: 14px; color: #9999bb; }
.footer-col ul li a { color: #9999bb; }
.footer-col ul li a:hover { color: #fff; }

.footer-tech {
  display: inline-block;
  font: 600 12px 'DM Sans', sans-serif;
  padding: 2px 8px;
  background: rgba(31,59,255,0.25);
  color: #7b9fff;
  border-radius: 6px;
  margin-right: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
  font-size: 13px;
  color: #555570;
}

/* ────────────────────────────────────────────────────────────
   Intro animation overlay (on index.html)
──────────────────────────────────────────────────────────── */
#intro {
  position: fixed; inset: 0; z-index: 9999;
  background: #0B0B0F;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#intro.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  position: relative; z-index: 1;
}

.intro-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
}
.intro-blob-1 { width: 380px; height: 380px; background: #1F3BFF; top: -100px; right: -60px; }
.intro-blob-2 { width: 280px; height: 280px; background: #7B5EA7; bottom: -80px; left: -40px; }

.intro-logo {
  font: 800 52px 'Bricolage Grotesque', sans-serif;
  color: #fff; letter-spacing: -0.03em;
  opacity: 0; transform: translateY(28px);
  animation: introFadeUp 0.7s 0.2s cubic-bezier(.16,1,.3,1) forwards;
}
.intro-logo span { color: #4f6eff; }

.intro-tagline {
  font: 400 16px 'DM Sans', sans-serif;
  color: #6b6b80;
  opacity: 0; transform: translateY(16px);
  animation: introFadeUp 0.6s 0.55s cubic-bezier(.16,1,.3,1) forwards;
}

.intro-bar {
  width: 200px; height: 3px;
  background: #1a1a2e; border-radius: 99px; overflow: hidden;
  opacity: 0;
  animation: introFadeUp 0.4s 0.85s ease forwards;
}
.intro-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #1F3BFF, #7B5EA7);
  border-radius: 99px;
  animation: introBarFill 1.1s 0.95s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes introFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes introBarFill {
  to { width: 100%; }
}

/* Item card hover animation */
article.card { transition: transform 0.2s, box-shadow 0.2s; }
article.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
