/* ============================================================
   VariTree — Main Stylesheet
   Upload to: public_html/css/style.css
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --navy:        #1a2535;
  --navy-dark:   #111c2a;
  --orange:      #d4622a;
  --orange-dark: #b8501f;
  --cream:       #f5f0eb;
  --off-white:   #f8f7f5;
  --white:       #ffffff;
  --text:        #2c2c2c;
  --text-muted:  #5a6476;
  --border:      #ddd8d2;
  --color-muted: #5a6476;

  --font-head: 'Lora', Georgia, serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  --max-w:    1160px;
  --pad:      0 20px;
  --radius:   6px;
  --shadow:   0 2px 12px rgba(0,0,0,0.09);
  --transition: 0.22s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  max-width: 100%;
  /* global word-wrap — prevents ANY text overflowing on narrow screens */
  overflow-wrap: break-word;
  word-break: break-word;
}
/* apply wrapping to every text-bearing element */
p, li, a, span, td, th, label, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--navy);
  overflow-wrap: break-word;   /* stops long words/headings overflowing on mobile */
  word-break: break-word;
  max-width: 100%;
}
h1 { font-size: clamp(1.6rem, 5vw, 3rem); margin-bottom: 20px; }
h2 { font-size: clamp(1.35rem, 4vw, 2.25rem); margin-bottom: 16px; }
h3 { font-size: clamp(1.05rem, 3vw, 1.4rem); margin-bottom: 10px; }
h4 { font-size: 1rem; margin-bottom: 8px; }
p  { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
ul li { margin-bottom: 6px; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;   /* padding never adds extra width */
  min-width: 0;             /* allows flex/grid children to shrink below content size */
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn--cta, .btn--primary {
  background: var(--orange);
  color: var(--white);
  border: 2px solid var(--orange);
}
.btn--cta:hover, .btn--primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}
.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.55);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

/* ─────────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}
/* hamburger — left, mobile only */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
/* logo */
.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 24px;
  min-width: 0;
}
.header-logo img {
  height: 48px;
  width: auto;
  max-width: 180px;    /* hard cap — prevents oversized logo on mobile */
  object-fit: contain;
  border-radius: 4px;
}
/* desktop nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
/* header CTA button */
.header-cta {
  flex-shrink: 0;
  font-size: 0.88rem;
  padding: 9px 18px;
}

/* ─────────────────────────────────────────────────────────────
   MOBILE NAV DRAWER
───────────────────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--navy-dark);
  padding: 0;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.mobile-nav.open {
  display: flex;
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav-header img {
  height: 44px;
  width: auto;
  border-radius: 4px;
}
.mobile-nav-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius);
}
.mobile-nav-close:hover { background: rgba(255,255,255,0.1); }
.mobile-nav a {
  display: block;
  padding: 16px 24px;
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background var(--transition);
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(255,255,255,0.07);
  color: var(--white);
}
.mobile-nav .btn--cta {
  margin: 20px 24px;
  display: block;
  text-align: center;
}

/* ─────────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────────── */
.hero {
  background: var(--cream);
  padding: 72px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-content h1 { color: var(--navy); }
.hero-content p   { color: var(--text-muted); font-size: 1.1rem; max-width: 480px; }
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image img { max-width: 100%; }

/* ─────────────────────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────────────────────── */
.section        { padding: 72px 0; }
.section--alt   { background: var(--off-white); }

.section-intro  { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-intro p { color: var(--text-muted); }

/* ─────────────────────────────────────────────────────────────
   SPLIT GRID (two-column image + text)
───────────────────────────────────────────────────────────── */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  min-width: 0;
}
.split-grid > * { min-width: 0; }   /* prevents grid children blowing out on mobile */
.split-image { display: flex; justify-content: center; }
.split-image img { max-width: 100%; border-radius: var(--radius); }
.split-grid p { color: var(--text-muted); }
.split-grid .btn { margin-top: 20px; }

/* ─────────────────────────────────────────────────────────────
   CARD GRID (accessories)
───────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
  min-width: 0;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;   /* prevents card blowing out grid column */
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.13); transform: translateY(-2px); }
.card-icon { margin-bottom: 16px; }
.card-icon img { height: 56px; width: auto; }
.card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--navy); }
.card p   { font-size: 0.9rem; color: var(--text-muted); flex: 1; margin-bottom: 16px; }
.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--orange);
  transition: color var(--transition);
}
.card-link:hover { color: var(--orange-dark); }

/* ─────────────────────────────────────────────────────────────
   TWO-COLUMN TEXT
───────────────────────────────────────────────────────────── */
.two-col-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  min-width: 0;
}
.two-col-text > * { min-width: 0; }
.two-col-text h3 { color: var(--navy); margin-bottom: 12px; }
.two-col-text ul { list-style: disc; padding-left: 20px; }
.two-col-text li { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 8px; }

/* ─────────────────────────────────────────────────────────────
   CHECKLIST
───────────────────────────────────────────────────────────── */
.checklist { margin: 20px 0; }
.checklist li {
  padding-left: 26px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────
   CTA BANNER
───────────────────────────────────────────────────────────── */
.cta-banner {
  background: var(--navy);
  color: var(--white);
  padding: 72px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 14px; }
.cta-banner p  { color: rgba(255,255,255,0.72); font-size: 1.05rem; margin-bottom: 32px; }
.cta-banner-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand img {
  height: 44px;
  width: auto;
  border-radius: 4px;
  margin-bottom: 16px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.6; max-width: 260px; }
.footer-col h4  {
  font-family: var(--font-head);
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.footer-col ul  { display: flex; flex-direction: column; gap: 8px; }
.footer-col a   { font-size: 0.875rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
}
.footer-bottom a { color: rgba(255,255,255,0.75); }
.footer-bottom a:hover { color: var(--white); }

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET  ≤ 860px
───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  /* hide desktop nav + CTA in header */
  .site-nav    { display: none; }
  .header-cta  { display: none; }
  /* show hamburger */
  .nav-toggle  { display: flex; }

  /* hero — stack */
  .hero { padding: 52px 0 48px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-image { order: -1; max-width: 320px; margin: 0 auto; }

  /* split-grid — stack */
  .split-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .split-image { max-width: 340px; margin: 0 auto; }

  /* two-col-text — stack */
  .two-col-text { grid-template-columns: 1fr; gap: 28px; }

  /* footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE  ≤ 560px
───────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  /* base text */
  body { font-size: 15px; }

  /* header */
  .header-inner { height: 58px; gap: 10px; }
  .header-logo { margin-right: 0; }
  .header-logo img { height: 38px; max-width: 140px; }

  /* hero */
  .hero { padding: 40px 0 36px; }
  .hero-content p { font-size: 1rem; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; text-align: center; }

  /* sections */
  .section { padding: 48px 0; }

  /* cards */
  .card-grid { grid-template-columns: 1fr; gap: 16px; }

  /* footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* CTA banner */
  .cta-banner { padding: 48px 0; }
  .cta-banner-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .cta-banner-actions .btn { text-align: center; }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE-ONLY LINE BREAKS — hidden on desktop
───────────────────────────────────────────────────────────── */
/* br tags inside headings show on mobile, hidden on wider screens */
@media (min-width: 561px) {
  h2 br, h3 br { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   ACCESSIBILITY
───────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
