/* Design tokens for the home page. Light-DOM only since Phase 2.5; the
   WP Shadow-DOM embed (and its :host scope) is gone. */
:root {
  /* OBEYA STYLE GUIDE TOKENS */
  --font-family-base: "Boston", "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 18px;
  --line-height-base: 1.6;

  /* Semantic Colors */
  --color-strategic-capability: #EA6D63;
  --color-milestone: #0D467F;
  --color-problem: #3AB89F;
  --color-action: #FFAF40;

  /* Functional Colors */
  --primary-navy: var(--color-milestone);
  --secondary-navy: #0b3a6a;
  --neutral-slate: #4A5568;

  /* Surfaces */
  --bg-app: #f5f5f5;
  --card-bg: #ffffff;

  /* Typography */
  --text-main: #1A202C;
  --text-muted: #718096;

  /* Geometry */
  --radius-container: 12px;
  --radius-card: 8px;
  --border-radius: 6px;

  /* Spacing */
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 20px;
  --space-lg: 40px;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-hero: 0 4px 6px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(13, 70, 127, 0.22);

  display: block;
}

* {
  box-sizing: border-box;
}

/* ─── HOME PAGE WRAPPER ─────────────────────────────────────────── */

#obeya-home {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  color: var(--text-main);
  background: var(--bg-app);
  min-height: 100%;
  padding: var(--space-lg) var(--space-md);
  line-height: var(--line-height-base);
  position: relative;
}

/* ─── HEADER ────────────────────────────────────────────────────── */

.home-header {
  max-width: 700px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.home-header__brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin: 16px 0 12px;
  line-height: 1.15;
}

.home-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0;
}

/* Settings trigger button — home page specific (absolute within #obeya-home) */
.settings-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--card-bg);
  border-radius: 50%;
  box-shadow: var(--shadow-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 110;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.settings-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--primary-navy);
  box-shadow: var(--shadow-hero);
}

/* Home page popup positioning */
.settings-popup {
  position: absolute;
  top: 58px;
  right: 14px;
  z-index: 105;
}

/* ─── NAV CARD GRID ─────────────────────────────────────────────── */

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  justify-content: center;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

/* ─── NAV CARD ──────────────────────────────────────────────────── */

.nav-card {
  background: var(--card-bg);
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  text-align: left;
  border: none;
  padding: 0;
  font-family: var(--font-family-base);
  color: var(--text-main);
  text-decoration: none;
}

.nav-card:hover {
  box-shadow: var(--shadow-hero);
  transform: translateY(-2px);
}

.nav-card:active {
  transform: translateY(0);
}

.nav-card__accent {
  height: 6px;
  width: 100%;
  flex-shrink: 0;
}

.nav-card__accent--board {
  background: var(--color-strategic-capability);
}

.nav-card__accent--assistant {
  background: var(--color-milestone);
}

.nav-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.nav-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.nav-card__desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.nav-card__cta {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-strategic-capability);
  margin-top: auto;
  padding-top: 8px;
}

/* ─── WHAT'S NEW ───────────────────────────────────────────────── */

.whats-new {
  max-width: 800px;
  margin: var(--space-lg) auto 0;
}

.whats-new__title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.whats-new__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.whats-new__item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
}

.whats-new__item-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
}

.whats-new__item-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ─── ASSISTANT VIEW ────────────────────────────────────────────── */

.assistant-topbar {
  max-width: 900px;
  margin: 0 auto var(--space-md);
  padding-top: var(--space-sm);
}

.back-btn {
  background: none;
  border: none;
  color: var(--primary-navy);
  font-family: var(--font-family-base);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  transition: opacity 0.15s ease;
}

.back-btn:hover {
  opacity: 0.7;
}

/* position: relative so the assistant's loading overlay (position:absolute) is contained here */
#assistant-content {
  position: relative;
}

/* ─── HOME FOOTER ────────────────────────────────────────────────── */

#home-footer {
  max-width: 800px;
  margin: var(--space-lg) auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.home-footer__sep {
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary-navy);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}

.link-btn:hover {
  color: var(--secondary-navy);
}

.link-btn:focus {
  outline: 2px solid var(--primary-navy);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── PRIVACY MODAL ──────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--card-bg);
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-container);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  margin: 20px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-navy);
  margin: 0;
}

.close-btn {
  background: rgba(0, 0, 0, 0.04);
  border: none;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  font-family: var(--font-family-base);
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-body section {
  margin-bottom: 24px;
}

.modal-body section:last-child {
  margin-bottom: 0;
}

.modal-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  font-family: var(--font-family-base);
}

.modal-body p,
.modal-body ul {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
}

.modal-body ul {
  padding-left: 20px;
  list-style-type: disc;
  margin: 12px 0;
}

.modal-body li {
  margin-bottom: 8px;
}

.privacy-link {
  display: inline-flex;
  margin-top: 12px;
  text-decoration: none;
  width: auto !important;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
  #obeya-home {
    padding: var(--space-md) var(--space-sm);
  }

  .home-cards {
    grid-template-columns: 1fr;
  }

  .home-title {
    font-size: 2rem;
  }
}