/* ============================================================
   Noraviel — Shared Stylesheet
   ============================================================ */

/* Custom Properties
   ------------------------------------------------------------ */
:root {
  --bg-base:           #09090f;
  --bg-surface:        rgba(12, 16, 26, 0.52);
  --bg-surface-solid:  #0f1320;
  --bg-surface-opaque: rgba(10, 13, 22, 0.92);
  --bg-border:         rgba(255, 255, 255, 0.12);
  --bg-border-solid:   #1e2535;

  --accent:        #6366f1;
  --accent-hover:  #818cf8;

  --text-primary:   #e8edf5;
  --text-secondary: #8892a4;
  --text-muted:     #404858;

  --link-color: #818cf8;
  --link-hover: #a5b4fc;

  --transition: 160ms ease;
  --radius-md:  8px;
  --radius-lg:  14px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Cinematic background — multi-source glow lighting, CSS only
   ------------------------------------------------------------ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 18% 22%, rgba(56, 189, 248, 0.07) 0%, transparent 44%),
    radial-gradient(ellipse at 78% 16%, rgba(99, 102, 241, 0.13) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%,  rgba(139, 92, 246, 0.09) 0%, transparent 54%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 5%  85%, rgba(99, 102, 241, 0.06) 0%, transparent 44%),
    radial-gradient(ellipse at 92% 92%, rgba(56, 189, 248, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--link-hover); }

img { display: block; max-width: 100%; }
ul  { list-style: none; }

/* Layout
   ------------------------------------------------------------ */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2rem);
}

.section        { padding-block: 5rem; }
.section--tight { padding-block: 3rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Lab card grid — 2×2
   ------------------------------------------------------------ */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Navigation
   ------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface-solid);
  border-bottom: 1px solid var(--bg-border-solid);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 20px rgba(0, 0, 0, 0.3);
}

@supports (backdrop-filter: blur(1px)) {
  .nav {
    background: rgba(10, 13, 20, 0.7);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 24px rgba(0, 0, 0, 0.35);
  }
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.nav__logo {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.nav__logo:hover { color: var(--text-primary); }

.nav__links { display: flex; gap: 1.5rem; }

.nav__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.nav__link:hover,
.nav__link--active { color: var(--text-primary); }

/* Hero
   ------------------------------------------------------------ */
.hero {
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 5rem;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
  margin-top: 1.25rem;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 0.875rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--bg-border-solid);
}
.btn--ghost:hover {
  color: var(--text-primary);
  border-color: #2a3347;
}

/* Section heading
   ------------------------------------------------------------ */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.section-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 580px;
  margin-bottom: 2rem;
}

/* Cards — liquid glass
   ------------------------------------------------------------ */
.card {
  background: var(--bg-surface-solid);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 4px 24px rgba(0, 0, 0, 0.3);
  transition: border-color var(--transition), box-shadow var(--transition);
}

@supports (backdrop-filter: blur(1px)) {
  .card {
    background: var(--bg-surface);
    -webkit-backdrop-filter: blur(18px) saturate(200%);
    backdrop-filter: blur(18px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.09),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(99, 102, 241, 0.1);
}

/* Top-left specular highlight */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.03) 30%,
    transparent 56%
  );
  pointer-events: none;
}

/* Top-edge light line */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.26) 38%,
    rgba(255, 255, 255, 0.12) 68%,
    transparent 100%
  );
  pointer-events: none;
}

/* Lab placeholder card variant — quieter, no hover accent */
.card--lab {
  cursor: default;
}
.card--lab::before {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.015) 30%,
    transparent 56%
  );
}
.card--lab:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4);
}
.card--lab .card__name { font-weight: 500; }

.card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Badge — muted pill for status labels */
.card__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.875rem;
}

.card__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-top: 0.625rem;
}

.card__list {
  margin-top: 1.25rem;
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
}
.card__list li { margin-bottom: 0.375rem; }

.card__link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  transition: color var(--transition);
}
.card__link:hover { color: var(--accent-hover); }
.card__link::after { content: " →"; }

/* Page header (inner pages)
   ------------------------------------------------------------ */
.page-header { border-bottom: 1px solid var(--bg-border-solid); }

.page-header__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.page-header__sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Prose — legal and support pages
   Near-opaque, no blur, maximum readability
   ------------------------------------------------------------ */
.prose-wrap {
  background: var(--bg-surface-opaque);
  border: 1px solid var(--bg-border-solid);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 720px;
}

.prose { max-width: 680px; }

.prose h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.prose p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  line-height: 1.7;
}

.prose ul {
  padding-left: 1.5rem;
  list-style: disc;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}
.prose li { margin-bottom: 0.375rem; line-height: 1.65; }

.prose a { color: var(--link-color); }
.prose a:hover { text-decoration: underline; }

.prose strong { color: var(--text-primary); font-weight: 600; }

.prose .note {
  font-size: 0.875rem;
  color: var(--text-muted);
  border-left: 2px solid var(--bg-border-solid);
  padding-left: 1rem;
  margin-top: 2rem;
  line-height: 1.65;
}

/* Divider
   ------------------------------------------------------------ */
.divider {
  border: none;
  border-top: 1px solid var(--bg-border-solid);
}

/* Contact block
   ------------------------------------------------------------ */
.contact-block {
  display: inline-block;
  background: var(--bg-surface-opaque);
  border: 1px solid var(--bg-border-solid);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
}

.contact-block__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.contact-block__email {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--link-color);
}
.contact-block__email:hover { color: var(--link-hover); }

/* Footer
   ------------------------------------------------------------ */
.footer {
  background: var(--bg-surface-solid);
  border-top: 1px solid var(--bg-border-solid);
  padding-block: 2.5rem;
}

@supports (backdrop-filter: blur(1px)) {
  .footer {
    background: rgba(10, 13, 20, 0.7);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    backdrop-filter: blur(12px) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.03);
  }
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__brand {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.footer__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer__link:hover { color: var(--text-primary); }

.footer__link--dim {
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.footer__link--dim:hover { color: var(--text-secondary); }

/* Link row
   ------------------------------------------------------------ */
.link-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}
.link-row a { color: var(--text-secondary); transition: color var(--transition); }
.link-row a:hover { color: var(--text-primary); }

/* Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .grid-2, .lab-grid { grid-template-columns: 1fr; }
  .nav__links         { gap: 1rem; }
  .hero               { padding-top: 4rem; }
  .hero__title        { font-size: 2rem; }
  .section            { padding-block: 3.5rem; }
  .footer__inner      { flex-direction: column; align-items: flex-start; }
  .prose-wrap         { padding: 1.5rem; }
}
