/* =========================================================================
   AEGBM · GlioSpain — Design System
   Warm editorial aesthetic. Cream paper, coral accent, serif display.
   ========================================================================= */

/* ---- Fonts (Google) ---- */
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

/* ---- Tokens ---- */
:root {
  /* paper / ink (warm) */
  --paper:        #FAF9F5;
  --paper-2:      #F3F0E7;   /* alt section bg */
  --paper-3:      #ECE7DA;   /* deeper cream */
  --card:         #FFFFFF;
  --ink:          #20201C;   /* warm near-black */
  --ink-2:        #4B473E;   /* warm gray text */
  --ink-3:        #837C6E;   /* muted */
  --line:         #E4DECF;   /* warm hairline */
  --line-2:       #D6CFBC;

  /* accent — coral/terracotta (Claude-like) */
  --coral:        #C8603C;
  --coral-2:      #B14F2D;   /* deep, hover */
  --coral-tint:   #F6E7DE;   /* soft fill */
  --coral-tint-2: #EFD6C8;

  /* functional hues — same L/C, varied hue (oklch) */
  --sage:         oklch(0.62 0.07 165);
  --sage-tint:    oklch(0.93 0.03 165);
  --slate:        oklch(0.58 0.07 245);
  --slate-tint:   oklch(0.93 0.03 245);
  --amber:        oklch(0.68 0.09 75);
  --amber-tint:   oklch(0.94 0.04 75);

  /* type */
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* radius / shadow */
  --r-sm: 7px;
  --r:    11px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(40,36,28,0.04);
  --shadow:    0 2px 14px rgba(40,36,28,0.06);
  --shadow-lg: 0 18px 50px -16px rgba(40,36,28,0.18);

  /* layout */
  --maxw: 1180px;
  --maxw-wide: 1460px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--coral-tint-2); }

/* ---- Type ---- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 0; color: var(--ink); text-wrap: balance; }
.display { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 400; line-height: 1.04; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.12rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; color: var(--ink-2); font-weight: 400; }
.eyebrow {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral);
  display: inline-flex; align-items: center; gap: 0.5em;
}
.serif-italic { font-family: var(--serif); font-style: italic; font-weight: 400; }
.muted { color: var(--ink-3); }

/* ---- Layout helpers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding-inline: var(--gutter); }
/* Wider container for CARD GALLERIES so they use more horizontal space on big
   monitors (text stays at the narrower --maxw for readability). */
.wrap-wide { max-width: var(--maxw-wide); }
.section { padding-block: clamp(56px, 9vw, 110px); }
.section-sm { padding-block: clamp(40px, 6vw, 70px); }
.bg-alt { background: var(--paper-2); }
.bg-deep { background: var(--paper-3); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.center { text-align: center; }
.stack > * + * { margin-top: var(--s, 1rem); }
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
/* Auto-flowing card gallery: columns are added/removed by available width
   (≈4-up on wide monitors, 3 at laptop, 2 tablet, 1 phone) instead of a fixed
   column count. min(100%, …) prevents overflow on very narrow screens. */
.grid.gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--sans); font-weight: 600; font-size: 0.97rem;
  padding: 0.72em 1.3em; border-radius: 999px; border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--card); border-color: var(--ink-3); }
.btn-soft { background: var(--coral-tint); color: var(--coral-2); }
.btn-soft:hover { background: var(--coral-tint-2); }
.btn-lg { padding: 0.95em 1.7em; font-size: 1.05rem; }
.btn-sm { padding: 0.5em 0.95em; font-size: 0.85rem; }
.arrow { transition: transform .18s; }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4em; color: var(--coral); font-weight: 600; }

/* ---- Cards ---- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(20px, 2.6vw, 30px);
  box-shadow: var(--shadow-sm);
}
.card-hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

/* ---- Chips / badges ---- */
.chip {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 0.34em 0.74em; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
}
.chip-coral { background: var(--coral-tint); color: var(--coral-2); border-color: var(--coral-tint-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.82rem; font-weight: 600; }
.status-recruiting { color: var(--sage); }
.status-active { color: var(--slate); }
.status-completed { color: var(--ink-3); }
.status-soon { color: var(--amber); }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 0.4em; }
label { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 0.7em 0.9em; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-tint);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23837C6E' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9em center; padding-right: 2.3em;
}

/* ---- Placeholder image (striped) ---- */
.ph {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, var(--paper-2) 0 11px, var(--paper-3) 11px 22px);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.ph::after {
  content: attr(data-label);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-3);
  background: var(--paper); padding: 0.35em 0.7em; border-radius: 6px;
  border: 1px solid var(--line); text-align: center; max-width: 80%;
}

/* =========================================================================
   Header / Nav (injected by shell.js)
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 70px; }
/* Header uses a slightly wider container than body content so the full nav
   (logo + links + actions) fits without overflowing — that lets margin-left:auto
   balance both sides, keeping the bar optically centered / pushed toward the right. */
.site-header .nav { max-width: 1480px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a, .nav-trigger {
  position: relative;
  font-size: 0.94rem; font-weight: 500; color: var(--ink-2);
  padding: 0.5em 0.7em; border-radius: 8px; transition: background .15s, color .15s;
  background: none; border: 0; display: inline-flex; align-items: center; gap: 0.35em;
  white-space: nowrap;
}
.nav-links a:hover, .nav-trigger:hover { color: var(--ink); background: var(--paper-2); }
/* "You are here": ink text + a short coral underline under the current item.
   Also applies to the Resources dropdown trigger when a sub-page is active. */
.nav-links a.active, .nav-trigger.active { color: var(--ink); font-weight: 600; }
.nav-links a.active::after, .nav-trigger.active::after {
  content: ''; position: absolute; left: 0.7em; right: 0.7em; bottom: 0.18em;
  height: 2px; border-radius: 2px; background: var(--coral);
}
.nav-links a.nav-proj, .mobile-nav a.nav-proj { color: var(--coral); font-weight: 600; }
.nav-links a.nav-proj:hover { color: var(--coral-2); }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-team { font-weight: 700; color: var(--coral); display: inline-flex; align-items: center; gap: 0.45em; text-transform: uppercase; font-size: 0.74rem; letter-spacing: 0.05em; white-space: nowrap; }
.nav-team::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); flex: none; }
.nav-team:hover { color: var(--coral-2); }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: var(--serif); font-size: 1.32rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.logo-name b { color: var(--coral); font-weight: 500; }
.logo-sub { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }

/* dropdown */
.nav-drop { position: relative; }
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 7px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu a { display: flex; flex-direction: column; gap: 1px; padding: 0.6em 0.7em; border-radius: 8px; }
.nav-menu a:hover { background: var(--paper-2); }
.nav-menu .nm-t { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.nav-menu .nm-d { font-size: 0.78rem; color: var(--ink-3); }

/* lang toggle */
.lang {
  display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden;
  background: var(--card);
}
.lang button { padding: 0.32em 0.6em; font-size: 0.78rem; font-weight: 700; color: var(--ink-3); background: none; border: 0; letter-spacing: 0.03em; }
.lang button.on { background: var(--ink); color: var(--paper); }

/* mobile */
.hamburger { display: none; background: none; border: 1px solid var(--line-2); border-radius: 9px; width: 42px; height: 38px; align-items: center; justify-content: center; }
.hamburger span, .hamburger span::before, .hamburger span::after { content: ''; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.hamburger span::before { position: absolute; top: -6px; }
.hamburger span::after { position: absolute; top: 6px; }
.mobile-nav { display: none; }

@media (max-width: 940px) {
  .nav-links, .nav-right .desktop-only { display: none; }
  .hamburger { display: inline-flex; }
  .mobile-nav { display: block; position: fixed; inset: 70px 0 0; background: var(--paper); z-index: 99; padding: 18px var(--gutter) 40px; overflow-y: auto; transform: translateX(100%); transition: transform .25s; }
  .mobile-nav.open { transform: translateX(0); }
  .mobile-nav a { display: block; font-family: var(--serif); font-size: 1.5rem; padding: 0.5em 0; border-bottom: 1px solid var(--line); color: var(--ink); }
  .mobile-nav a.active { color: var(--coral); padding-left: 16px; border-left: 3px solid var(--coral); }
  .mobile-nav .mob-section { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-top: 22px; font-family: var(--sans); }
}

/* =========================================================================
   Join band (persistent team CTA above footer)
   ========================================================================= */
.join-band { background: var(--ink); border-top: 1px solid rgba(255,255,255,0.08); }
.join-band-inner { display: flex; align-items: center; gap: clamp(20px, 4vw, 48px); padding-block: clamp(28px, 4vw, 44px); }
.join-band-mark { flex: none; width: 52px; height: 52px; display: grid; place-items: center; background: rgba(255,255,255,0.06); border-radius: 14px; }
.join-band-mark .logo-mark { width: 30px; height: 30px; }
.join-band-text { flex: 1 1 auto; }
.join-band-text h3 { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 500; color: #fff; margin: 0; line-height: 1.2; }
.join-band-text p { margin: 6px 0 0; color: #B7B0A0; font-size: 0.98rem; line-height: 1.5; max-width: 56ch; }
.join-band .btn { flex: none; }
@media (max-width: 680px) {
  .join-band-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .join-band .btn { width: 100%; justify-content: center; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--ink); color: #E9E4D7; padding-block: clamp(48px, 7vw, 80px) 36px; }
.site-footer a { color: #C9C2B2; transition: color .15s; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8C8576; margin: 0 0 16px; }
.footer-links { display: flex; flex-direction: column; gap: 11px; font-size: 0.94rem; }

/* social icons */
.social-ic {
  width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--line-2); color: var(--ink-2);
  background: var(--card); transition: color .16s, background .16s, border-color .16s, transform .16s;
}
.social-ic:hover { color: #fff; background: var(--coral); border-color: var(--coral); transform: translateY(-2px); }
.foot-social { margin-top: 26px; }
.foot-social-label { font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8C8576; display: block; margin-bottom: 12px; }
.foot-social-row { display: flex; flex-wrap: wrap; gap: 10px; }
.social-ic-dark { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.16); color: #C9C2B2; }
.social-ic-dark:hover { color: #fff; background: var(--coral); border-color: var(--coral); }
.footer-logo .logo-name { color: #fff; }
.footer-logo .logo-name b { color: var(--coral); }
.footer-logo .logo-sub { color: #8C8576; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; color: #8C8576; }

/* =========================================================================
   Reusable page bits
   ========================================================================= */
.page-hero { padding-block: clamp(48px, 7vw, 96px) clamp(36px, 5vw, 64px); }
.breadcrumb { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 18px; display: flex; gap: 0.5em; align-items: center; }
.breadcrumb a:hover { color: var(--coral); }

/* notice / callout */
.callout { border-left: 3px solid var(--coral); background: var(--coral-tint); border-radius: 0 var(--r) var(--r) 0; padding: 18px 22px; }
.callout-sage { border-color: var(--sage); background: var(--sage-tint); }
.callout-slate { border-color: var(--ink-3); background: var(--paper-3); }

/* accordion */
.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; text-align: left; background: none; border: 0; padding: 1.3em 0; font-family: var(--serif); font-size: 1.18rem; color: var(--ink); }
.acc-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: transform .2s, background .2s; position: relative; }
.acc-icon::before, .acc-icon::after { content: ''; position: absolute; background: var(--ink-2); border-radius: 2px; }
.acc-icon::before { width: 11px; height: 2px; }
.acc-icon::after { width: 2px; height: 11px; transition: transform .2s; }
.acc-item.open .acc-icon { background: var(--coral); border-color: var(--coral); }
.acc-item.open .acc-icon::before, .acc-item.open .acc-icon::after { background: #fff; }
.acc-item.open .acc-icon::after { transform: rotate(90deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.acc-body-inner { padding-bottom: 1.5em; color: var(--ink-2); max-width: 68ch; }

/* skeleton loading */
.skel { background: linear-gradient(100deg, var(--paper-2) 30%, var(--paper-3) 50%, var(--paper-2) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* fade-in on load */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
[data-reveal].in { opacity: 1; transform: none; }

/* utility */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-sm { gap: 8px; } .gap { gap: 16px; } .gap-lg { gap: 28px; }
.wrap-gap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.full { width: 100%; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } [data-reveal] { opacity: 1; transform: none; } }
