/* ===========================
   Saxby Family – Global Styles
   =========================== */

:root {
  --bg-main: #050914;
  --bg-card: #0b1220;
  --bg-card-soft: #111827;
  --accent-teal: #24c2d8;
  --accent-amber: #f5a623;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;
  --border-soft: rgba(148, 163, 184, 0.3);
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
  --max-width: 1040px;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Reset */

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #071322 0, var(--bg-main) 55%, #020617 100%);
  color: var(--text-main);
  line-height: 1.6;
}

/* 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 rgba(148, 163, 184, 0.2);
  background: linear-gradient(135deg, #020617 0%, #02081a 40%, #020617 100%);
  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);
}

/* ===========================
   HEADER LOGO (RESIZED)
   =========================== */
.site-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: contain;
  background: radial-gradient(circle at 30% 20%, #38bdf8, #0f172a);
  box-shadow: none;
}

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

.site-name {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
  text-transform: uppercase;
  color: #ffffff;
}

.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: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  transform: translateY(-1px);
}

.main-nav a.active {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(59, 130, 246, 0.7);
  color: #f9fafb;
}

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

/* Acknowledgement Banner */

.country-banner {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at left, rgba(245, 166, 35, 0.5), transparent 55%),
              radial-gradient(circle at right, rgba(56, 189, 248, 0.4), transparent 60%),
              #020617;
}

.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 Section */

.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 LOGO (RESIZED)
   =========================== */
.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: 0 18px 40px rgba(15, 23, 42, 0.7);
  object-fit: contain;
}

/* Inner Page Hero */

.hero-inner-page .hero-inner {
  text-align: center;
  padding: 1.8rem 1.25rem 0.5rem;
}

.hero-inner-page h1 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
}

.hero-inner-page p {
  margin: 0;
  color: var(--text-soft);
}

/* 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);
}

.card-full {
  margin-top: 0.5rem;
}

/* Layout Grids */

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  margin-bottom: 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, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-color: rgba(37, 99, 235, 0.9);
  color: #f9fafb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.65);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--text-main);
}

/* Contact Form */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

/* Family Tree */

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

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1.25rem 1.25rem 1.8rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-soft);
  background: #020617;
}

/* ===========================
   UNIVERSAL LOGO SAFETY NET
   =========================== */
img[src*="saxby-logo"] {
  max-width: 100px;
  width: 100%;
  height: auto;
}

/* Standalone top logo class */
.top-logo {
  display: block;
  margin: 2rem auto 1rem;
  max-width: 230px;
  width: 35vw;
  height: auto;
}

/* Responsive Tweaks */

@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;
  }

  .hero-art {
    align-self: center;
  }

  .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;
  }
}
