/* =========================
   Bo Tree Site – styles.css
   ========================= */

/* --------- Base / Reset --------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
:root {
  --text-900: #111827;   /* neutral-900 */
  --text-700: #374151;   /* neutral-700 */
  --text-600: #4b5563;   /* neutral-600 */
  --line-200: #e5e7eb;   /* neutral-200 */
  --line-300: #d1d5db;   /* neutral-300 */
  --brand-link: #0ea5e9; /* sky-500 */
  --brand-link-hover: #0284c7;
  --btn-bg: #111827;
  --btn-fg: #ffffff;
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji",
               "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  color: var(--text-900);
  line-height: 1.6;
  background: #ffffff;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* --------- Layout --------- */
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* --------- Top Navigation (sticky + mobile-friendly) --------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-200);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px; /* helps when wrapping at small widths */
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-left { gap: 12px; }
.nav-right { gap: 22px; }

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-logo span {
  font-weight: 600;
  font-size: 18px;
  color: var(--text-900);
}

.nav-link {
  display: inline-block;            /* bigger tap target */
  text-decoration: none;
  color: var(--text-700);
  font-weight: 500;
  padding: 6px 10px;                /* touch-friendly */
  border-radius: 8px;               /* subtle */
  transition: color .15s ease, background-color .15s ease, opacity .15s ease;
}
.nav-link:hover { color: var(--text-900); background-color: rgba(17,24,39,0.04); }
.nav-link:focus-visible {
  outline: 2px solid #93c5fd;       /* sky-300 */
  outline-offset: 2px;
  border-radius: 10px;
}

/* Mobile spacing & stacking for even layout */
@media (max-width: 640px) {
  .navbar-inner {
    flex-wrap: wrap;                /* allow items to wrap */
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
  }

  .nav-left {
    width: 100%;
    justify-content: center;
    margin-bottom: 6px;
  }

  .nav-logo img { height: 28px; }

  .nav-right {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;                /* links can wrap to next line */
    justify-content: center;        /* center the group */
    gap: 14px;                      /* even spacing between links */
  }

  .nav-link {
    font-size: 16px;
    padding: 8px 12px;              /* larger tap target on small screens */
  }
}

/* --------- Hero section with background logo --------- */
.hero {
  position: relative;
  min-height: 100svh;               /* fill first viewport */
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line-200);
  background: #fff;                 /* plain background under the logo overlay */
}

/* Default: logo covers entire hero; 20% opacity */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/logo-bg.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.2;                     /* 20% */
  pointer-events: none;
}

/* OPTIONAL: If you want the logo only in the top half of the hero,
   add the class `hero--half-bg` to the same hero section in HTML. */
.hero.hero--half-bg::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;                      /* only top half shows logo */
  background-size: contain;         /* adjust scaling to fit inside half */
  background-position: center top;  /* anchor to the top visually */
}

/* Hero title */
h1.hero-title {
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.25;
  text-align: center;
  color: var(--text-900);
  padding: 0 16px;
  margin: 0;
  z-index: 1; /* above ::before */
}

/* --------- Content below hero --------- */
.below-hero {
  background: #ffffff;
  padding: 48px 0 64px 0;
}

/* Typography blocks */
.prose {
  font-size: 17px;
  color: #1f2937; /* neutral-800 */
}
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }

/* Utility if you want a centered, narrow paragraph under hero (home page) */
.centered-below-hero {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.inline-link {
  color: var(--brand-link);
  text-decoration: none;
  border-bottom: 1px solid rgba(14,165,233,0.35);
  transition: color .15s ease, border-color .15s ease;
}
.inline-link:hover { color: var(--brand-link-hover); }

/* --------- Footer --------- */
.site-footer {
  margin-top: 56px;
  border-top: 1px dashed var(--line-300); /* “simple partial line” separator */
  padding: 18px 0 28px 0;
  background: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-left,
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  width: 22px;
}
.social-link img, .social-link svg {
  display: block;
  height: 22px;
  width: 22px;
}

.addr-row { white-space: nowrap; }

/* --------- Contact page (grid + card + form) --------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 3.5vw, 30px);
}
@media (max-width: 880px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-card {
  border: 1px solid var(--line-200);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}

label {
  display: block;
  font-size: 14px;
  color: var(--text-700);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border: 1px solid var(--line-300);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: #fff;
}
textarea { min-height: 140px; resize: vertical; }

input:focus, textarea:focus {
  border-color: #93c5fd;                          /* sky-300 */
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);    /* blue-500 @ 15% */
}

button.btn {
  display: inline-block;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: filter .15s ease, opacity .15s ease, transform .02s ease;
}
button.btn:hover { filter: brightness(0.96); }
button.btn:active { transform: translateY(1px); }
button.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.helper {
  font-size: 13px;
  color: #6b7280; /* neutral-500 */
  margin-top: 6px;
}
.error { color: #b91c1c; }   /* red-700 */
.success { color: #065f46; } /* emerald-900 */

/* --------- Tables (future proofing) --------- */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line-200); text-align: left; }
th { color: var(--text-600); font-weight: 600; }

/* --------- Images (sane defaults) --------- */
img { max-width: 100%; height: auto; }

/* --------- Print tweaks (optional) --------- */
@media print {
  .navbar, .site-footer { display: none !important; }
  .hero { min-height: auto; }
}

@media (max-width: 640px) {
  .footer-grid { 
    grid-template-columns: 1fr; 
    text-align: center;           /* center text in both left and right sections */
  }

  .footer-left, 
  .footer-right {
    align-items: center;          /* center flex children horizontally */
  }

  .social-row {
    justify-content: center;      /* center LinkedIn icon row */
  }
}

/* keep the sentence + link on one continuous line */
.hero-line {
  white-space: nowrap;          /* no wrapping */
  text-align: center;
  margin: 0 auto;
  max-width: none;              /* don't cap width */
  overflow-x: auto;             /* allow horizontal scroll on tiny screens */
  -webkit-overflow-scrolling: touch;
}

/* optional: slightly shrink text on very small screens to reduce scrolling */
@media (max-width: 380px) {
  .hero-line { font-size: 15px; }
}

@media (min-width: 641px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* two equal columns */
    justify-items: center;           /* center content in each column */
    align-items: center;
  }

  .footer-left,
  .footer-right {
    text-align: center;              /* center text within each column */
  }
}

.intro-text {
  line-height: 1.5;        /* Comfortable spacing */
  margin: 0 auto;
  white-space: normal;     /* Allows wrapping */
  text-align: left;        /* Default: left-aligned for mobile */
}

/* Centered only for desktop screens */
@media (min-width: 641px) {
  .intro-text {
    text-align: center;
  }
}

.intro-text a {
  color: #0056b3;              /* Link color */
  text-decoration: none;
  margin-left: 0.3em;          /* Tiny gap between sentence and link */
}

.intro-text a:hover {
  text-decoration: underline;
}

/* Collapsible Disclaimer */
.disclaimer {
  display: block;
  max-width: 1200px;
  margin: 15px auto;              /* reduced from 30px to 15px */
  border-top: 1px dashed #d1d5db;
  padding: 10px 0 20px;           /* reduced from 40px to 20px */
  font-size: 0.75rem;
  color: #4b5563;
}

.disclaimer summary {
  list-style: none;                  /* hide default marker */
  cursor: pointer;
  display: flex;
  justify-content: center;           /* center horizontally */
  align-items: center;               /* vertically center text + icon */
  gap: 8px;
  user-select: none;
  outline: none;
}

.disclaimer summary::-webkit-details-marker { display: none; }

.disclaimer summary span {
  font-weight: 600;
}

.disclaimer .chev {
  width: 18px; height: 18px; flex: 0 0 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  transition: transform .2s ease;
}

/* rotate chevron when open */
.disclaimer[open] .chev { transform: rotate(180deg); }

.disclaimer-content {
  margin-top: 10px;
  padding: 0 4px;
}

.disclaimer-content p {
  margin: 0 0 10px 0;
  text-align: justify;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .disclaimer { font-size: 0.7rem; padding-top: 8px; }
  .disclaimer-content { padding: 0 2px; }
}