/* ==========================================================================
   AOLE — Atlantis Open Learning Experience
   Shared design tokens + components
   ========================================================================== */

:root {
  /* Brand */
  --au-red: #ea1c24;
  --au-red-dark: #b9151c;
  --au-red-light: #fde8e9;
  --au-navy: #0b1a2d;
  --au-navy-light: #152b47;

  /* Health vertical (this workshop) */
  --health: #1f6b3a;
  --health-dark: #134d28;
  --health-light: #e1f0e6;
  --health-ink: #0a3019;

  /* Surfaces */
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --border: #e2e8f0;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all .25s ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  background: #f1f5f9;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  z-index: 0;
}

/* Ambient background blobs — signature AOLE touch */
body::before {
  content: '';
  position: fixed;
  top: -10%; right: -10%;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234,28,36,.10) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
  filter: blur(40px);
}
body::after {
  content: '';
  position: fixed;
  bottom: -10%; left: -10%;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11,26,45,.08) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
  filter: blur(40px);
}

/* Typography ============================================================== */
.serif { font-family: 'Fraunces', serif; font-weight: 400; }
.mono { font-family: 'JetBrains Mono', monospace; }

h1, h2, h3, h4 { font-family: 'Fraunces', serif; font-weight: 400; color: var(--au-navy); margin: 0; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--au-red); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--au-red); font-weight: 600;
}
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: var(--au-red); }

/* MASTHEAD ================================================================ */
.masthead {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(135deg, #c0111a 0%, #ea1c24 45%, #a50e15 100%);
  padding: 1.25rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(234,28,36,.25);
  position: relative; overflow: hidden;
  color: white;
}
.masthead::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.15));
  pointer-events: none;
}
.masthead::before {
  content: ''; position: absolute; top: -50%; left: -10%;
  width: 50%; height: 200%;
  background: linear-gradient(135deg, rgba(255,255,255,.08) 0%, transparent 60%);
  pointer-events: none; transform: rotate(-15deg);
}
.brand { display: flex; align-items: center; gap: 1.25rem; z-index: 1; position: relative; }
.brand img { height: 38px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.brand-text {
  border-left: 2px solid rgba(255,255,255,.2);
  padding-left: 1.25rem;
}
.brand-text .u {
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  font-weight: 600; color: rgba(255,255,255,.7); margin-bottom: .15rem;
}
.brand-text .name { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 500; }

.meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; letter-spacing: .1em;
  color: rgba(255,255,255,.7); text-transform: uppercase;
  z-index: 1; position: relative;
}
.meta b { color: white; font-weight: 600; }

/* Pills ==================================================================== */
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  background: white; border: 1px solid var(--border);
  padding: .35rem .85rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; color: var(--au-navy);
  box-shadow: var(--shadow-sm);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--health); }

/* Cards ==================================================================== */
.card {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Buttons ================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .92rem;
  padding: .75rem 1.5rem; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: var(--transition);
}
.btn-primary { background: var(--au-navy); color: white; }
.btn-primary:hover { background: var(--au-red); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: white; color: var(--au-navy); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--au-red); color: var(--au-red); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--au-red); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Form fields ============================================================== */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"] {
  font-family: 'Inter', sans-serif; font-size: 1rem;
  padding: .85rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); background: white;
  transition: var(--transition); color: var(--text-main);
}
.field input:focus {
  outline: none; border-color: var(--au-red);
  box-shadow: 0 0 0 4px rgba(234,28,36,.10);
}
.field .hint { font-size: .8rem; color: var(--text-dim); }
.field .err { font-size: .8rem; color: var(--au-red); font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }

.checkbox-row {
  display: flex; gap: .65rem; align-items: flex-start;
  font-size: .88rem; color: var(--text-muted); margin-bottom: 1.25rem;
}
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--au-red);
  margin-top: 2px; cursor: pointer;
}

/* Flash messages =========================================================== */
.flash-stack { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.flash {
  padding: .85rem 1.1rem; border-radius: var(--radius-md);
  font-size: .9rem; border: 1px solid;
  display: flex; align-items: center; gap: .65rem;
}
.flash-success { background: var(--health-light); border-color: var(--health); color: var(--health-ink); }
.flash-error   { background: var(--au-red-light); border-color: var(--au-red); color: var(--au-red-dark); }
.flash-info    { background: #e4f3fb; border-color: #3aa7e4; color: #0a3e5f; }

/* Misc helpers ============================================================ */
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.center { text-align: center; }
.divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 1.5rem 0;
}
.link { color: var(--au-red); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* Scrollbar ================================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-3); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--au-red); }
