/* My Global Family Tree — tenant public theme.
   Each tenant overrides the --color-* CSS variables via tenant_branding,
   but the defaults below mirror the platform brand kit (green on cream,
   Inter everywhere). includes/header.php emits the override block.
*/

@import url('/css/inter.css');

:root {
  --color-primary:      #1a6a3a;
  --color-primary-dark: #1a4a3a;
  --color-accent:       #5aaa18;
  --color-ocean:        #1a6a9a;
  --color-bg:           #f0ebe0;
  --color-bg-soft:      #f7f4ec;
  --color-surface:      #ffffff;
  --color-ink:          #111a14;
  --color-ink-soft:     #3d4842;
  --color-muted:        #6b7470;
  --color-border:       #d9d2c2;

  --font-heading: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.tenant-public {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px; font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.t-nav {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.t-nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.t-brand {
  display: flex; align-items: center;
  font-family: var(--font-heading);
  font-size: 1.15rem; font-weight: 900;
  color: var(--color-primary); letter-spacing: -0.01em;
}
.t-brand img { max-height: 40px; }
.t-links { display: flex; gap: 1.15rem; align-items: center; }
.t-links a { color: var(--color-ink); font-weight: 500; font-size: 0.92rem; }
.t-cta {
  background: var(--color-primary); color: #fff !important;
  padding: 0.55rem 1.15rem; border-radius: 999px;
  font-weight: 700; transition: background 0.15s ease;
}
.t-cta:hover { background: var(--color-primary-dark); text-decoration: none; }
.t-bell {
  position: relative; padding: 0.25rem 0.45rem;
  display: inline-flex; align-items: center; font-size: 1.1rem;
}
.t-bell-badge {
  position: absolute; top: -2px; right: -6px;
  background: var(--color-accent); color: #1f1300;
  font-size: 0.65rem; font-weight: 700; padding: 0.05rem 0.4rem;
  border-radius: 999px; line-height: 1.3; font-family: var(--font-body);
}
.t-main { min-height: 60vh; }
.t-foot {
  margin-top: 4rem; padding: 2rem 1.5rem;
  border-top: 1px solid var(--color-border);
  text-align: center; color: var(--color-muted); font-size: 0.9rem;
  background: var(--color-bg-soft);
}
.flash-toast { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000; }

[data-theme="dark"] {
  --color-bg:      #0e1410;
  --color-bg-soft: #14211a;
  --color-surface: #1a2920;
  --color-ink:     #ecebe6;
  --color-ink-soft:#bcbab2;
  --color-muted:   #8d918a;
  --color-border:  #2a3a30;
}
[data-theme="dark"] .t-nav { background: var(--color-surface); }

/* ---- auth pages ----------------------------------------------------- */
.auth-wrap { padding: 4rem 1.5rem; display: flex; justify-content: center; }
.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 2rem 2.25rem; max-width: 440px; width: 100%;
}
.auth-card h1 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--color-primary);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}
.auth-lede { margin: 0 0 1.5rem; color: var(--color-muted); font-size: 0.97rem; }
.auth-form { margin: 0; }
.auth-form label {
  display: block; margin-bottom: 1rem;
  font-size: 0.88rem; color: var(--color-ink); font-weight: 600;
}
.auth-form input {
  display: block; width: 100%; box-sizing: border-box;
  padding: 0.7rem 0.85rem; margin-top: 0.35rem;
  border: 1.5px solid var(--color-border); border-radius: 10px;
  font: inherit; font-weight: 400;
  background: #fff; color: var(--color-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-form input:focus {
  outline: 0; border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(26, 106, 58, 0.12);
}
.auth-form button[type=submit] {
  width: 100%; padding: 0.85rem 1rem; font-size: 1rem;
  margin-top: 0.5rem;
  background: var(--color-primary); color: #fff; border: 0;
  border-radius: 999px; cursor: pointer; font-weight: 700;
  transition: background 0.15s ease;
}
.auth-form button[type=submit]:hover { background: var(--color-primary-dark); }
.auth-link-btn { background: transparent; border: 0; color: var(--color-primary); cursor: pointer; padding: 0.5rem 0; font: inherit; text-decoration: underline; font-weight: 500; }
.auth-meta { margin: 1.25rem 0 0; font-size: 0.9rem; color: var(--color-muted); }
.auth-meta a { color: var(--color-primary); }
.auth-meta span { margin: 0 0.5rem; color: var(--color-border); }
.auth-err { background: #fcebe7; color: #8a1f1f; padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.92rem; border: 1px solid #f5c5c5; }
.auth-ok  { background: #e3f4e3; color: #205c2a; padding: 0.85rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.95rem; border: 1px solid #b8e1bb; }

/* ---- a11y ----------------------------------------------------------- */
.skip-link { position: absolute; top: -100px; left: 0; z-index: 9999; background: var(--color-primary); color: #fff; padding: 0.7rem 1.1rem; text-decoration: none; border-bottom-right-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 0; outline: 3px solid var(--color-accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
