/* app/assets/stylesheets/base/layout.css */
:root {
    /* Shared roster variables (moved from base.css) */
    --brand-font-family: system-ui, sans-serif;
    --brand-bg: #fff;
    --brand-fg: #222;
    --brand-radius: 6px;
    --brand-border: 1px solid #e0e0e0;

  /* Brand Identity */
  --brand-primary: #1A5AD7;        /* Anchors (Fixed RFF Slots) */
  --brand-secondary: #F3F4F6;      /* Neutral Background / Sidebar */

  /* Status & Equity (The Traffic Light System) */
  --status-balanced: #2D8A2D;      /* Green: Staff within ±2% FTE quota */
  --status-monitoring: #D97706;    /* Amber: Staff near limit / Breather buffers */
  --status-overload: #DC2626;      /* Red: Conflict / Over-quota / Immediate Action */

  /* Special Operational Overrides */
  --mode-wet-weather: #7C3AED;     /* Purple: Indoor Supervision Protocol */
  --mode-event: #0891B2;           /* Teal: Carnivals / Excursions / Special Layers */

  /* UI Elements */
  --text-main: #111827;            /* High-contrast text for accessibility */
  --text-muted: #6B7280;           /* De-emphasised text (e.g., historical data) */
  --border-subtle: #E5E7EB;        /* Grid lines for the Master Timetable */
  --bg-unavailable: #9CA3AF;       /* Grey: Non-working days for part-time staff */
}

html, body {
  height: 100%;
}

body {
  font-family: var(--brand-font-family);
  background: var(--brand-bg);
  color: var(--brand-fg);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-main {
  width: 80%;
  max-width: 96rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.5rem; /* reduced top gap */
  padding-left: 1.25rem; /* roughly Tailwind px-5 */
  padding-right: 1.25rem;
  display: block;
  flex: 1 0 auto;
}

.form-container {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 66.666%; /* roughly md:w-2/3 */
}

.admin-container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .app-main { width: 100%; padding-left: 0.5rem; padding-right: 0.5rem; }
  .form-container { max-width: 100%; padding: 0 0.5rem; }
  .admin-container { padding: 1rem; }
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid var(--border-subtle, #E5E7EB);
  padding: 0.75rem 0;
  background: var(--brand-secondary, #F3F4F6);
}
.site-header__inner {
  max-width: 96rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}
.site-title {
  font-weight: 700;
  color: var(--text-main, #111827);
  font-size: 1rem;
}
.site-nav a {
  text-decoration: none;
  margin-left: 0.75rem;
}
.site-nav .link-muted { color: var(--text-muted, #6B7280); }
.site-nav .btn-primary { margin-left: 0.5rem; }
.site-nav form { display: inline; }

/* Home hero */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.home-hero .hero-title { margin: 0; font-size: 1.5rem; font-weight: 700; }
.home-hero .hero-sub { margin: 0; color: var(--text-muted); }

/* Home page tweaks */
.app-main.home-top { margin-top: 2rem; }

/* Hero styling (Atlassian-like centered hero) */
.home-hero {
  display: block;
  padding: 4rem 1.25rem;
  background: linear-gradient(180deg, rgba(26,90,215,0.04), rgba(255,255,255,0));
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2rem;
  background: transparent;
}

.site-footer__inner {
  max-width: 96rem;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.site-footer a { color: var(--text-muted); text-decoration: none; margin: 0 0.5rem; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .site-footer { padding: 1rem 0.75rem; }
}
.home-hero__inner {
  max-width: 86rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0.75rem;
  align-items: start;
}
.home-hero .hero-visual { border-radius: 12px; background: linear-gradient(135deg,#DDEEFF,#F6FBFF); height: 80px; max-width:140px; justify-self:center; overflow:hidden; }

/* Ensure inline SVGs scale down to the visual container */
.home-hero .hero-visual svg { width: 100% !important; height: auto !important; max-width: 140px; display: block; }

.hero-title { font-size: 2.5rem; line-height: 1.05; margin: 0 0 0.5rem 0; color: var(--text-main); }
.hero-sub { font-size: 1.125rem; margin: 0 0 1.25rem 0; color: var(--text-muted); max-width: 48rem; }
.hero-actions { display:flex; align-items:center; gap:0.75rem; flex-wrap:wrap; }
.hero-cta { padding: 0.7rem 1.1rem; font-size: 1.02rem; border-radius: 10px; }
.hero-cta.secondary { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-main); padding: 0.55rem 0.9rem; border-radius: 8px; }

/* Testimonial */
.testimonial { margin-top: 1.25rem; padding: 1rem; background: white; border: 1px solid var(--border-subtle); border-radius: 8px; box-shadow: 0 6px 18px rgba(16,24,40,0.03); max-width: 46rem; }
.testimonial blockquote { margin: 0 0 0.5rem 0; font-style: italic; color: var(--text-main); }
.testimonial .source { font-size: 0.875rem; color: var(--text-muted); }

/* Logos / trust row */
.trust-row { margin-top: 1.75rem; display:flex; gap:1.5rem; align-items:center; flex-wrap:wrap; }
.trust-row__item { opacity: 0.85; filter: grayscale(100%); height: 28px; }

/* Features cards */
.features-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:1rem; margin-top: 2rem; }
.feature-card { padding: 1rem; background: white; border: 1px solid var(--border-subtle); border-radius: 8px; box-shadow: 0 4px 10px rgba(16,24,40,0.04); }
.feature-card h3 { margin: 0 0 0.5rem 0; font-size: 1.05rem; }

@media (max-width: 980px) {
  .home-hero__inner { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .home-hero .hero-visual { height: 120px; max-width:100%; justify-self:center; }
}

/* Features */
.section-title { font-size: 1.25rem; margin: 0 0 0.5rem 0; }
.features-list { list-style: disc; margin-left: 1.25rem; color: var(--text-main); }
.features-list li { margin-bottom: 0.5rem; }

@media (max-width: 900px) {
  .home-hero { flex-direction: column; padding: 1.25rem; }
  .home-hero .hero-visual { width: 100%; min-height: 120px; }
}
