/* brand.css — shared design system for the Learn in Labs platform chrome.
   Design tokens + site header (with logo) + footer + buttons + animated hero
   scaffold. Loaded by: the marketing landing (index.html), the /demo page, and
   templates/base.html (which loads auth.css AFTER this for forms/cards/dashboards).

   The :root block is kept IDENTICAL to auth.css's so both stylesheets work
   standalone; auth.css still ships its own copy. Never used inside individual
   simulations — platform chrome only. */

:root {
  --color-primary: #32615d;        /* deep teal — primary actions, links, brand */
  --color-primary-dark: #244b47;   /* darker teal — hover, headings, footer */
  --color-secondary: #619490;      /* sage teal — secondary / gradient pair */
  --color-accent: #d8592a;         /* terracotta — highlight accent */
  --color-accent-dark: #c44a1f;    /* darker terracotta — hover */
  --color-accent-light: #ea9051;   /* amber — soft warm accent */
  --color-text: #2d3a37;
  --color-muted: #6b7a76;
  --color-border: #e6ddcd;         /* warm cream border */
  --color-bg: #fdf6ed;             /* cream — page background */
  --color-card: #fff;
  --color-error: #c0392b;
  --color-error-bg: #fdecea;
  --color-success: #1e8449;
  --color-success-bg: #e8f6ef;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  /* brand.css additions (not in auth.css) */
  --header-h: 64px;
  --hero-grad-a: #32615d;
  --hero-grad-b: #244b47;
  --maxw: 1120px;
}

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Shared site header (logo + lang + context) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 246, 237, 0.86);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header__logo { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.site-header__logo img { height: 40px; width: auto; display: block; }
.site-header__right { display: flex; align-items: center; gap: 10px; }
.site-header__nav-link {
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.site-header__nav-link:hover { background: rgba(50, 97, 93, 0.1); }
.site-header__context-link {
  color: #fff;
  background: var(--color-accent);
  border: 2px solid var(--color-accent);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.site-header__context-link:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }

/* ---------- Language switcher (shared) ---------- */
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lang-btn:hover { border-color: var(--color-primary); }
.lang-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---------- Shared buttons ---------- */
.brand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.brand-btn-primary { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.brand-btn-primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); box-shadow: 0 10px 24px rgba(216, 89, 42, 0.28); transform: translateY(-2px); }
.brand-btn-secondary { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.brand-btn-secondary:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }

/* ---------- Animated hero scaffold ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--hero-grad-a) 0%, var(--hero-grad-b) 100%);
  color: #fdf6ed;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(36, 75, 71, 0.10) 0%, rgba(36, 75, 71, 0.55) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: 92px 24px 104px;
  text-align: center;
}
.brand-headline { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 18px; }
.brand-tagline { font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 400; line-height: 1.55; opacity: 0.94; max-width: 640px; margin: 0 auto 34px; }
.brand-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Hero sits on a dark gradient → flip secondary buttons to light. */
.hero .brand-btn-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.10); }
.hero .brand-btn-secondary:hover { background: rgba(255, 255, 255, 0.20); border-color: #fff; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .hero__canvas { display: none; }       /* static gradient shows through */
  .brand-btn:hover { transform: none; }
}

/* ---------- Shared footer ---------- */
.site-footer { background: var(--color-primary-dark); color: rgba(253, 246, 237, 0.82); margin-top: auto; }
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}
.site-footer__brand .wordmark { display: inline-block; font-size: 1.2rem; font-weight: 900; letter-spacing: -0.01em; color: #fff; text-decoration: none; margin-bottom: 12px; }
.site-footer__tagline { font-size: 0.92rem; line-height: 1.55; max-width: 300px; opacity: 0.8; margin: 0; }
.site-footer__col h4 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: #fff; margin: 2px 0 12px; }
.site-footer__col a, .site-footer__col span { display: block; color: rgba(253, 246, 237, 0.82); text-decoration: none; font-size: 0.92rem; padding: 4px 0; }
.site-footer__col a:hover { color: #fff; text-decoration: underline; }
.site-footer__bottom {
  border-top: 1px solid rgba(253, 246, 237, 0.15);
}
.site-footer__bottom-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px 28px;
  font-size: 0.82rem;
  opacity: 0.72;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-header__inner { padding: 8px 16px; }
  .site-header__right { gap: 6px; }
  .site-header__nav-link { padding: 6px 8px; font-size: 0.85rem; }
  .hero__content { padding: 64px 18px 72px; }
  .brand-cta { flex-direction: column; align-items: stretch; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 24px; }
}
