/* Hive Communications — styles
   Mobile-first, accessible (WCAG 2.1 AA), no external fonts/JS. */

:root {
  --ink:        #1a1a1a;   /* body text on white: 15.9:1 */
  --ink-soft:   #4a4a4a;   /* secondary text: 8.6:1 */
  --bg:         #ffffff;
  --bg-alt:     #fafafa;
  --gold:       #e0a020;   /* matches the "We're All Connected" tagline; used for the divider */
  --gold-deep:  #7a5200;   /* gold for text on white: 5.7:1 (AA) */
  --blue:       #9bd0ef;   /* bee-wing blue (decorative) */
  --line:       #e6e6e6;
  --maxw:       70rem;
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* Visible focus ring for keyboard users */
:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header / logo */
.site-header {
  position: relative;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 1.5rem 1.5rem;
}
.logo-link { display: inline-block; line-height: 0; }
.logo {
  width: clamp(120px, 30vw, 180px);
  height: auto;
  display: inline-block;
  /* The logo art has built-in whitespace below the tagline; on mobile, pull the
     card bottom up to tighten the gap. Its #fafafa background matches the header,
     so this blends seamlessly. Reset at the desktop breakpoint below. */
  margin-bottom: -1.5rem;
  vertical-align: bottom;
}

/* Hero */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.portrait {
  margin: 0;
  text-align: center;
  flex-shrink: 0;
}
.portrait img {
  width: clamp(180px, 50vw, 240px);
  height: auto;
  border-radius: 50%;
  border: 5px solid var(--gold);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.14);
  background: var(--bg-alt);
}
.portrait figcaption {
  margin-top: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.portrait figcaption span {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.portrait figcaption .contact-email,
.portrait figcaption .contact-phone {
  margin-top: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gold-deep);
  text-decoration: none;
  word-break: break-word;
}
.portrait figcaption .contact-email:hover,
.portrait figcaption .contact-phone:hover {
  color: var(--ink);
}

.hero-copy { max-width: 40rem; }

.hero-copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  padding-bottom: 0.95rem;   /* reserves room for the full-bleed divider */
  position: relative;
  color: var(--ink);
}
.hero-copy h1::after {
  content: "";
  height: 4px;
  background: var(--gold);
  /* Mobile: full-bleed divider across the whole page.
     Absolutely positioned so its 100vw width can't stretch the text container. */
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
}
.hero-copy p {
  margin: 0;
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 1.75rem 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.site-footer .service-area {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: var(--ink);
}
.site-footer .copyright { margin: 0; }

/* Tablet / desktop: portrait left, copy right */
@media (min-width: 48rem) {
  .hero {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    padding-top: 3.5rem;
  }
  .logo { margin-bottom: 0; }
  .hero-copy h1 { padding-bottom: 0; }
  .hero-copy h1::after {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 0.85rem;
    border-radius: 2px;
  }
}

/* ---------------------------------------------------------------------------
   Primary navigation (hamburger)
   No-JS fallback: the toggle is hidden and the menu shows as a simple inline
   row. With JS (html.js), it becomes a collapsible hamburger dropdown.
--------------------------------------------------------------------------- */
.site-nav {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 50;
}

.nav-toggle { display: none; }

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}
.nav-menu a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}
.nav-menu a:hover { background: rgba(0, 0, 0, 0.06); }
.nav-menu a[aria-current="page"] { color: var(--gold-deep); }

/* JS-enhanced hamburger */
.js .nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.js .nav-toggle:hover { background: rgba(0, 0, 0, 0.06); }
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.js .nav-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 184px;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}
.js .nav-menu.open { display: flex; }
.js .nav-menu a { font-size: 1rem; padding: 0.65rem 0.9rem; }

/* ---------------------------------------------------------------------------
   Gallery
--------------------------------------------------------------------------- */
.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}
.gallery h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.gallery-intro { margin: 0 0 1.75rem; color: var(--ink-soft); }
.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-empty { margin: 1.5rem 0 0; }

/* ---------------------------------------------------------------------------
   Simple content page (e.g. Testimonials) + "Coming soon" placeholder
--------------------------------------------------------------------------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}
.page h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.coming-soon {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  color: var(--gold-deep);
  margin: 2.5rem 0;
}

/* ---------------------------------------------------------------------------
   Lightbox
--------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 3vw, 2rem);
  background: rgba(0, 0, 0, 0.9);
}
.lightbox.open { display: flex; }
.lightbox-figure {
  margin: 0;
  max-width: min(92vw, 1100px);
  text-align: center;
}
.lightbox-img {
  max-width: 88vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #111;
}
.lightbox-caption {
  margin: 0.6rem 0 0;
  color: #f2f2f2;
  font-size: 0.95rem;
  line-height: 1.4;
}
.lightbox-counter {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #d6d6d6;
  font-size: 0.85rem;
}
.lightbox button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  font-size: 1.9rem;
  line-height: 1;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.9rem;
  line-height: 1;
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

/* Respect reduced-motion and high-contrast preferences */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
