:root {
  --bg: #0b0b0d;
  --bg-2: #111116;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --muted: #b4b7c3;
  --accent: #caa464;
  --accent-soft: rgba(202, 164, 100, 0.18);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radius-lg: 18px;
  --max-width: 1100px;
  --nav-height: 76px;
}

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

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  background: radial-gradient(circle at 10% 20%, rgba(202, 164, 100, 0.08), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.04), transparent 35%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: "Epilogue", "Source Sans 3", sans-serif; letter-spacing: -0.01em; }

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

img { max-width: 100%; display: block; border-radius: var(--radius); }

.container { width: min(var(--max-width), 92vw); margin: 0 auto; }

.section { padding: 4.5rem 0; }
.section.tight { padding: 3.25rem 0; }

.hidden { display: none !important; }
.form-status { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.form-status.success { color: #b5f5d0; }
.form-status.error { color: #f7b3b3; }

.section-title { font-size: clamp(1.9rem, 3vw, 2.4rem); margin-bottom: 0.6rem; }
.lead { color: var(--muted); font-size: 1.05rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent); font-size: 0.78rem; font-weight: 700; }

.top-nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(12, 12, 14, 0.6); border-bottom: 1px solid var(--border); }

.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; min-height: var(--nav-height); }
.brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; padding: 0.35rem 0.5rem; border-radius: 14px; border: 1px solid var(--border); background: linear-gradient(120deg, rgba(255,255,255,0.04), rgba(202,164,100,0.08)); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.brand img { width: 44px; height: 44px; border-radius: 0; background: transparent; box-shadow: none; border: none; }
.brand-text { line-height: 1.05; }
.brand-name { font-family: "Epilogue", "Source Sans 3", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.brand-name::after { content: ""; width: 14px; height: 2px; background: var(--accent); border-radius: 999px; opacity: 0.9; }
.brand-tag { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 0.9rem; position: relative; }
.nav-drawer { display: flex; align-items: center; gap: 0.9rem; position: relative; z-index: 1; }
.nav-links a { padding: 0.45rem 0.6rem; border-radius: 10px; font-weight: 700; }
.nav-links .active { color: var(--accent); background: rgba(202, 164, 100, 0.12); }
.nav-links a:hover { background: var(--panel-strong); }

.nav-toggle { display: none; background: var(--panel); border: 1px solid var(--border); color: var(--text); padding: 0.5rem 0.85rem; border-radius: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-close { display: none; }
.nav-drawer-header, .nav-drawer-title { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.78rem 1.2rem; border-radius: 12px; font-weight: 800; border: 1px solid var(--border); color: var(--text); background: var(--panel); transition: transform 120ms ease, box-shadow 140ms ease, background 140ms ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: linear-gradient(120deg, #f2dcc0, #caa464); color: #0b0b0d; border-color: rgba(202, 164, 100, 0.5); }
.btn-ghost { background: transparent; }

.hero { position: relative; overflow: hidden; background-size: cover; background-position: center; min-height: clamp(520px, 78vh, 780px); margin-top: calc(-1 * var(--nav-height)); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 12% 20%, rgba(202, 164, 100, 0.08), transparent 30%), radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.07), transparent 35%); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(11,11,13,0.82)); }
.hero > .container { position: relative; z-index: 1; padding: calc(5rem + var(--nav-height)) 0 4.5rem; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; align-items: end; }

.intro-block { position: relative; overflow: hidden; padding: calc(4rem + var(--nav-height)) 0 3rem; background: radial-gradient(circle at 20% 20%, rgba(202, 164, 100, 0.12), transparent 36%), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.08), transparent 32%), #0a0a0c; }
.intro-heading { font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; max-width: 920px; }
.intro-abstract { position: relative; margin-top: 2rem; padding: 2.2rem 1.2rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(202,164,100,0.08)); overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.4); }
.name-stack { display: grid; gap: 0.18rem; position: relative; overflow: visible; padding: 0.4rem 0; }
.name-line { position: relative; display: block; text-align: center; font-size: clamp(5.4rem, 14vw, 10.5rem); font-weight: 900; letter-spacing: 0.12em; line-height: 0.9; text-transform: uppercase; color: transparent; background: linear-gradient(90deg, #f2dcc0, #caa464, #f2dcc0); -webkit-background-clip: text; background-clip: text; mix-blend-mode: screen; transform: translateX(var(--x, 0)); transition: transform 160ms ease-out; }
.down-arrow { position: absolute; bottom: calc(var(--nav-height) + 22px); left: 50%; transform: translateX(-50%); font-size: 1.4rem; color: var(--text); opacity: 0.8; animation: arrow-bounce 1.3s ease-in-out infinite; }

@keyframes arrow-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }

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

.stat { padding: 1.3rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel-strong); }
.stat strong { display: block; font-size: 1.6rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { padding: 0.15rem 0.35rem; border-radius: 6px; border: 1px dashed var(--border); background: transparent; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.78rem; }

.media-box { border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }

.footer { border-top: 1px solid var(--border); background: #0d0d11; padding: 2.6rem 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.small { color: var(--muted); font-size: 0.93rem; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem; }
.label { font-weight: 700; margin-bottom: 0.35rem; display: block; }
.input, .select, .textarea, .file-input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 12px; color: var(--text); padding: 0.75rem 0.85rem; }
.textarea { min-height: 120px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.file-note { color: var(--muted); font-size: 0.9rem; }
.required { color: #e57373; font-weight: 800; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 320ms ease, transform 320ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.accent-bar { width: 82px; height: 6px; background: linear-gradient(120deg, #f2dcc0, #caa464); border-radius: 999px; margin-bottom: 0.6rem; box-shadow: 0 10px 24px rgba(202, 164, 100, 0.4); }
.floating-card { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.3rem; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38); backdrop-filter: blur(6px); }
.stacked { display: grid; gap: 0.9rem; }
.pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px dashed var(--border); background: transparent; color: var(--muted); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.8rem; }
.form-section { margin-top: 1rem; padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); }
.form-section h3 { margin-bottom: 0.35rem; }
.grouped { display: grid; gap: 0.8rem; }

.modal-open { overflow: hidden; position: fixed; width: 100%; left: 0; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 5, 7, 0.82); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 1.5rem; z-index: 40; }
.modal-card { max-width: 560px; width: min(560px, 95vw); background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(202,164,100,0.08)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.8rem; text-align: left; box-shadow: 0 28px 90px rgba(0,0,0,0.5); display: grid; gap: 0.8rem; }
.modal-card .btn { justify-self: flex-start; margin-top: 0.4rem; }
.agreement-card { max-width: 760px; width: min(760px, 95vw); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.agreement-body { color: var(--muted); flex: 1; overflow-y: auto; padding-right: 0.4rem; }

.team-lock { padding: 4.6rem 0 3.6rem; }
.team-lock-box { max-width: 780px; padding: 2.2rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(202,164,100,0.06)); margin: 0 auto; box-shadow: var(--shadow); }
.team-login-form { display: grid; gap: 0.6rem; margin-top: 1rem; max-width: 420px; }
.form-actions { display: flex; gap: 0.6rem; align-items: center; }

.team-dashboard { padding: 1rem 0 4rem; }
.team-grid { display: grid; grid-template-columns: minmax(320px, 380px) 1fr; gap: 1rem; align-items: start; }
.team-panel { min-height: 220px; }
.case-list { display: grid; gap: 0.5rem; }
.case-card { padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); cursor: pointer; transition: border-color 120ms ease, transform 120ms ease; }
.case-card:hover { border-color: rgba(202, 164, 100, 0.8); transform: translateY(-1px); }
.case-card.active { border-color: var(--accent); box-shadow: 0 10px 32px rgba(0,0,0,0.35); }
.case-id { font-weight: 800; letter-spacing: 0.04em; }
.case-meta { color: var(--muted); font-size: 0.9rem; }
.case-detail { display: grid; gap: 0.8rem; }
.case-detail h3 { margin: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.8rem; }
.detail-block { background: var(--panel-strong); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.7rem 0.8rem; }
.notes-list { display: grid; gap: 0.5rem; margin-top: 0.4rem; }
.note { border: 1px dashed var(--border); border-radius: 10px; padding: 0.6rem 0.7rem; }
.note time { display: block; color: var(--muted); font-size: 0.85rem; }
.note strong { display: block; }
.note-form { display: grid; gap: 0.5rem; margin-top: 0.6rem; }
.file-list { display: grid; gap: 0.25rem; margin-top: 0.4rem; }
.file-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.55rem; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); width: fit-content; }
.file-row { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }

@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 0; display: flex; justify-content: center; align-items: stretch; pointer-events: none; z-index: 25; }
  .nav-links::before { content: ""; position: absolute; inset: 0; background: rgba(10, 10, 12, 0.68); opacity: 0; transition: opacity 220ms ease; }
  .nav-links.open { pointer-events: auto; }
  .nav-links.open::before { opacity: 1; }
  .nav-drawer { width: 100%; min-height: 100vh; background: #0b0b0f; border-left: 1px solid var(--border); box-shadow: 0 0 80px rgba(0, 0, 0, 0.6); padding: 5rem 1.6rem 2.4rem; flex-direction: column; gap: 1.1rem; transform: translateY(12px); transition: transform 240ms ease, opacity 240ms ease; overflow-y: auto; opacity: 0; align-items: stretch; }
  .nav-links.open .nav-drawer { transform: translateY(0); opacity: 1; }
  .nav-drawer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
  .nav-drawer-title { display: inline-flex; font-family: "Epilogue", "Source Sans 3", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-size: 0.88rem; font-weight: 800; }
  .nav-close { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.7rem; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text); font-weight: 700; }
  .nav-links a { width: 100%; padding: 1rem 0.85rem; font-size: 1.12rem; border-radius: 12px; text-align: left; }
  .nav-links .btn { width: 100%; text-align: center; }
  .nav-toggle { display: inline-flex; }
  body.nav-open { overflow: hidden; }
  .team-grid { grid-template-columns: 1fr; }
  .brand { background: none; border: none; padding: 0; box-shadow: none; }
  .brand img { border-radius: 0; background: transparent; }
  body:not(.page-home) .hero { margin-top: calc(-1 * var(--nav-height)); }
  body:not(.page-home) .hero > .container { padding-top: calc(5.4rem + var(--nav-height)); }
}

@media (max-width: 600px) {
  :root { --nav-height: 64px; }
  .hero > .container { padding: calc(5rem + var(--nav-height)) 0 2.8rem; }
  body:not(.page-home) .hero { margin-top: calc(-1 * var(--nav-height)); }
  body:not(.page-home) .hero > .container { padding-top: calc(5.6rem + var(--nav-height)); }
  .intro-block { padding: calc(2.2rem + var(--nav-height)) 0 2.6rem; }
  .name-stack { justify-items: center; }
  .name-line { font-size: clamp(4.8rem, 14vw, 7rem); letter-spacing: 0.02em; line-height: 0.9; }
  .brand { background: none; border: none; padding: 0; box-shadow: none; }
  .brand img { border-radius: 0; background: transparent; }
  .btn { width: 100%; justify-content: center; }
}
