/* ===========================
   Saxby Family – Global Styles
   Day / Night Theme Enabled
   =========================== */

/* ===========================
   DAY THEME (DEFAULT)
   =========================== */

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-soft: #f1f5f9;

  --accent-teal: #0891b2;
  --accent-amber: #d97706;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-soft: #475569;

  --border-soft: rgba(15, 23, 42, 0.12);

  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-soft: 0 18px 40px rgba(2, 6, 23, 0.08);

  --max-width: 1400px;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===========================
   NIGHT THEME (CURRENT LOOK)
   =========================== */

html[data-theme="dark"] {
  --bg-main: #0b1220;          /* lighter base */
  --bg-card: #111827;          /* cards stand out more */
  --bg-card-soft: #1f2937;     /* gentle contrast */

  --accent-teal: #38bdf8;      /* brighter highlights */
  --accent-amber: #fbbf24;

  --text-main: #f1f5f9;        /* clearer body text */
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;

  --border-soft: rgba(148, 163, 184, 0.25);
  --shadow-soft: 0 12px 28px rgba(2, 6, 23, 0.55);
}

/* ===========================
   RESET
   =========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* ===========================
   BODY + BACKGROUNDS
   =========================== */

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.6;
}

/* Day background */
html[data-theme="light"] body,
html:not([data-theme]) body {
  background: radial-gradient(circle at top, #ffffff 0%, #f1f5f9 55%, #e2e8f0 100%);
}

/* Night background */
html[data-theme="dark"] body {
  background: radial-gradient(circle at top, #071322 0%, var(--bg-main) 55%, #020617 100%);
}

/* ===========================
   LAYOUT
   =========================== */

.page-content {
  max-width: var(--max-width);
  margin: 2.5rem auto 3.5rem;
  padding: 0 1.25rem;
}

/* ===========================
   HEADER
   =========================== */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
}

.site-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: contain;
  background: radial-gradient(circle at 30% 20%, #38bdf8, #0f172a);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.site-name {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
  text-transform: uppercase;
  color: var(--text-main);
}

.site-tagline {
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* ===========================
   NAVIGATION
   =========================== */

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  border: 1px solid transparent;
}

.main-nav a:hover {
  background: var(--bg-card-soft);
  color: var(--text-main);
  transform: translateY(-1px);
}

.main-nav a.active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.6);
  color: var(--text-main);
}

.nav-webmail {
  border-color: rgba(56, 189, 248, 0.8);
  color: var(--accent-teal);
}

/* ===========================
   THEME TOGGLE
   =========================== */

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-icon {
  font-size: 1rem;
}
/* Theme toggle: icon + text */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Text label */
.theme-text {
  letter-spacing: 0.04em;
}

/* Mobile: icon only */
@media (max-width: 640px) {
  .theme-text {
    display: none;
  }

  .theme-toggle {
    padding: 0.45rem 0.6rem;
  }
}

/* ===========================
   ACKNOWLEDGEMENT BANNER
   =========================== */

.country-banner {
  border-top: 1px solid var(--border-soft);
  background:
    radial-gradient(circle at left, rgba(245, 166, 35, 0.4), transparent 55%),
    radial-gradient(circle at right, rgba(56, 189, 248, 0.3), transparent 60%),
    var(--bg-card);
}

.country-banner p {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.55rem 1.25rem 0.75rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}

/* ===========================
   HERO
   =========================== */

.hero {
  max-width: var(--max-width);
  margin: 1.9rem auto 0;
  padding: 0 1.25rem 1.5rem;
}

.hero-home .hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.hero-text {
  flex: 1 1 260px;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.4rem);
  margin: 0 0 0.75rem;
}

.hero-text p {
  margin: 0 0 1.2rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-art {
  flex: 0 0 220px;
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 15%, #38bdf8, #0b1120 65%, #020617 100%);
  padding: 0.8rem;
  box-shadow: var(--shadow-soft);
  object-fit: contain;
}

/* ===========================
   CARDS
   =========================== */

.card {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-soft));
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

/* ===========================
   GRID
   =========================== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

/* ===========================
   BUTTONS
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
}

.btn-ghost {
  background: var(--bg-card-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
}

/* ===========================
   FAMILY TREE
   =========================== */

.family-tree {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

/* ===========================
   FOOTER
   =========================== */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 1.25rem 1.25rem 1.8rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-soft);
  background: var(--bg-card);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 780px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-home .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.55rem;
  }

  .site-logo {
    width: 30px;
    height: 30px;
  }

  .hero-art img {
    width: 120px;
    height: 120px;
  }
}
/* Group nav + toggle nicely */
.top-bar {
  gap: 0.85rem;
}

.main-nav {
  margin-left: auto;
}
/* ===========================
   CONTACT FORM (FIXED LAYOUT)
   =========================== */

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
  align-items: start;
  margin-top: 0.7rem;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-main);
  font: inherit;
  outline: none;
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form .full {
  grid-column: 1 / -1;
}

.contact-form .actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@media (max-width: 780px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}
.tree-stats{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:0.75rem;
}
.tree-stat{
  border:1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  border-radius: 1rem;
  padding: 0.75rem 0.8rem;
  text-align:center;
}
.tree-stat .num{
  font-size:1.25rem;
  font-weight:700;
}
.tree-stat .lbl{
  font-size:0.78rem;
  color: var(--text-soft);
}
@media (max-width: 900px){
  .tree-stats{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
