/* ============================================
   Aetheris Lab — Login Gate + Portal
   ============================================ */

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

:root {
  --bg:       #f5f2ed;
  --bg-warm:  #eae5dd;
  --text:     #1a1a1a;
  --text-mid: #555550;
  --text-light: #999590;
  --accent:   #8b6914;
  --accent-light: #c49b2c;
  --border:   #d5d0c8;
  --white:    #ffffff;
  --serif:    'Cormorant Garamond', Georgia, serif;
  --sans:     'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(245, 242, 237, .9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.back {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: opacity .2s;
}

.back:hover { opacity: .6; }

.topbar-logo {
  height: 22px;
  width: auto;
  filter: sepia(1) saturate(2) hue-rotate(5deg) brightness(.6);
  opacity: .7;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lab-badge-static {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 3px 8px;
}

.sign-out {
  font-family: var(--sans);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .2s;
}

.sign-out:hover { color: var(--text); }

/* ========================================
   LOGIN GATE
   ======================================== */
.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 40px 0;
}

.gate-logo {
  width: 80px;
  height: auto;
  border-radius: 10px;
  filter: sepia(1) saturate(2) hue-rotate(5deg) brightness(.6);
  opacity: .4;
}

.gate-line {
  width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: .3;
  margin: 32px auto;
}

.gate-label {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-light);
}

.gate-form {
  margin-top: 48px;
  text-align: center;
}

.gate-input {
  width: 240px;
  text-align: center;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 300;
  padding: 12px 0;
  color: var(--text);
  letter-spacing: 1px;
  outline: none;
  transition: border-color .3s;
}

.gate-input:focus {
  border-color: var(--accent);
}

.gate-input::placeholder {
  color: var(--text-light);
  font-weight: 300;
  letter-spacing: 1px;
}

.gate-error {
  font-size: .7rem;
  color: #a04040;
  opacity: 0;
  transition: opacity .3s;
  margin-top: 16px;
}

.gate-error.visible {
  opacity: 1;
}

/* Shake animation for wrong code */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.gate-input.shake {
  animation: shake .4s ease;
  border-color: #a04040;
}

/* Fade out on successful auth */
.gate-success {
  opacity: 0;
  transition: opacity .5s ease;
}

/* ========================================
   PORTAL
   ======================================== */

/* Header */
.portal-header {
  padding-top: 120px;
  text-align: center;
  margin-bottom: 80px;
}

.portal-eyebrow {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.portal-title {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.portal-sub {
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 300;
  color: var(--text-mid);
}

/* Venture cards */
.ventures {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.venture-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 36px;
  transition: border-color .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
}

.venture-card:hover {
  border-color: var(--accent-light);
  box-shadow: 0 2px 20px rgba(139, 105, 20, .06);
}

.venture-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Venture logo */
.venture-logo-row {
  margin-bottom: 20px;
  height: 44px;
  display: flex;
  align-items: center;
}

.venture-logo {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  border-radius: 6px;
}

.mykonosall-logo {
  border-radius: 8px;
}

.venture-logo-placeholder {
  height: 40px;
}

.venture-codename {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.venture-link {
  transition: color .2s;
}

.venture-link:hover {
  color: var(--accent);
}

.venture-status {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}

.venture-status.active {
  color: #4a7c59;
  background: rgba(74, 124, 89, .08);
}

.venture-status.building {
  color: #8b6914;
  background: rgba(139, 105, 20, .08);
}

.venture-status.research {
  color: var(--text-light);
  background: rgba(153, 149, 144, .08);
}

.venture-sector {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.venture-desc {
  font-size: .85rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 20px;
}

.venture-meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: .7rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.venture-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
}

/* Portal divider */
.portal-divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: .3;
  margin: 80px auto;
}

/* Section label */
.section-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 40px;
}

/* Advisory */
.advisory {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.advisory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.advisory-card {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.advisory-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.advisory-card p {
  font-size: .85rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.7;
}

/* Mandates */
.mandates {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.mandates-sub {
  font-size: .85rem;
  font-weight: 300;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 40px;
}

.mandates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.mandate-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 36px;
  transition: border-color .3s, box-shadow .3s;
}

.mandate-card:hover {
  border-color: var(--accent-light);
  box-shadow: 0 2px 20px rgba(139, 105, 20, .06);
}

.mandate-logo-row {
  margin-bottom: 20px;
  height: 36px;
  display: flex;
  align-items: center;
}

.mandate-logo {
  height: 32px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.ca-logo {
  height: 28px;
}

.mandate-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mandate-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.mandate-link {
  transition: color .2s;
}

.mandate-link:hover {
  color: var(--accent);
}

.mandate-details {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mandate-round {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}

.mandate-size {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text);
}

.mandate-press-link {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: .7rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color .2s;
}

.mandate-press-link:hover {
  color: var(--accent);
}

/* Timeline */
.updates {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.timeline-item {
  display: flex;
  gap: 32px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-date {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--accent);
  min-width: 80px;
  flex-shrink: 0;
}

.timeline-text {
  font-size: .85rem;
  font-weight: 300;
  color: var(--text-mid);
}

/* Documents */
.documents {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 40px 120px;
}

.documents-note {
  font-size: .85rem;
  font-weight: 300;
  color: var(--text-light);
  text-align: center;
}

/* Footer */
footer {
  padding: 40px;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer p {
  font-size: .7rem;
  color: var(--text-light);
  letter-spacing: 1px;
}

/* ---------- Fade-in animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .topbar { padding: 0 20px; }

  .gate { padding: 56px 24px 0; }
  .gate-input { width: 200px; }

  .portal-header { padding-top: 100px; margin-bottom: 60px; }
  .portal-title { font-size: 1.8rem; }

  .ventures {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }

  .advisory {
    padding: 0 24px 60px;
  }

  .advisory-grid {
    grid-template-columns: 1fr;
  }

  .mandates {
    padding: 0 24px 60px;
  }

  .mandates-grid {
    grid-template-columns: 1fr;
  }

  .updates {
    padding: 0 24px 60px;
  }

  .timeline-item {
    flex-direction: column;
    gap: 4px;
  }

  .documents {
    padding: 0 24px 80px;
  }
}
