/* =============================================================
   LAYOUT — page-level regions (nav, hero, grids, contact, footer)
   Depends on: tokens.css, base.css, components.css
   ============================================================= */

/* -------------------------------------------------------------
   Navigation
   ------------------------------------------------------------- */
nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(20, 7, 10, 0.9), rgba(20, 7, 10, 0.5));
  border-bottom: 1px solid var(--surface-line);
}
.nav-in {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height); gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: 1.18rem; letter-spacing: 0.2px;
  display: flex; align-items: center; gap: var(--space-2xs); white-space: nowrap;
}
.brand .dot { color: var(--color-brand); }
.nav-links { display: flex; gap: 1.6rem; font-size: 0.92rem; font-weight: var(--weight-medium); }
.nav-links a { color: var(--color-text-dim); text-decoration: none; transition: color var(--transition-fast); }
.nav-links a:hover { color: var(--color-accent-soft); }

/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle { display: none; background: transparent; cursor: pointer; }

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 40px; padding: 0 9px;
    border: 1px solid var(--surface-line); border-radius: var(--radius-sm);
  }
  .nav-toggle span {
    display: block; height: 2px; width: 100%; border-radius: 2px;
    background: var(--color-text);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }
  /* animate bars into an X when open */
  nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* links become a full-width dropdown panel */
  .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(20, 7, 10, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-line);
    max-height: 0; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: max-height var(--transition), opacity var(--transition),
                transform var(--transition), visibility var(--transition);
  }
  nav.open .nav-links { max-height: 80vh; opacity: 1; visibility: visible; transform: none; }
  .nav-links a {
    padding: 0.9rem var(--gutter);
    font-size: 1rem;
    border-top: 1px solid var(--surface-line);
  }
}

/* -------------------------------------------------------------
   Hero
   ------------------------------------------------------------- */
header.hero {
  position: relative;
  padding: clamp(4.5rem, 11vh, 8rem) 0 5.5rem;
  text-align: center;
}
/* Centered circular portrait at the top of the hero */
.hero-portrait {
  width: clamp(120px, 17vw, 172px);
  aspect-ratio: 1;
  margin: 0 auto 1.6rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-accent);
  box-shadow: 0 0 0 6px rgba(234, 185, 95, 0.12), var(--shadow-panel);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(234, 185, 95, 0.18), rgba(214, 90, 78, 0.18));
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-portrait .ph { font-size: 3rem; }

h1 .glow {
  color: var(--color-accent-soft);
  font-style: italic;
  font-weight: var(--weight-medium);
  text-shadow: 0 0 50px rgba(234, 185, 95, 0.35);
}
.hero p.lead {
  max-width: 580px; margin: 1.7rem auto 2.4rem;
  font-size: var(--text-lg); color: var(--color-text-dim);
}
.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.trust {
  display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap;
  margin-top: 3.2rem; color: var(--color-text-dim); font-size: 0.92rem;
}
.trust span { display: flex; align-items: center; gap: var(--space-2xs); }
.trust b { color: var(--color-accent); }

/* -------------------------------------------------------------
   Grids (cards, gallery, quotes)
   ------------------------------------------------------------- */
.cards   { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }
.quotes  { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }

/* Masonry gallery — keeps each photo's natural orientation */
.gallery { columns: 3 240px; column-gap: 1rem; }

.about-body p { color: var(--color-text-dim); font-size: var(--text-md); margin-bottom: 1rem; }

/* -------------------------------------------------------------
   Contact split
   ------------------------------------------------------------- */
.contact-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem; align-items: start;
}
.contact-line {
  display: flex; align-items: center; gap: var(--space-sm);
  margin-bottom: 0.9rem; font-size: 1.02rem;
}
.contact-line a { color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--surface-line); }
.contact-line a:hover { color: var(--color-accent-soft); }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

/* Form rows collapse on small screens */
@media (max-width: 560px) {
  .row2, .row3 { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */
footer {
  position: relative;
  border-top: 1px solid var(--surface-line);
  padding: 2.6rem 0; text-align: center;
  color: var(--color-text-dim); font-size: 0.9rem;
  /* solid-ish backdrop so text stays legible over the fixed forest scene */
  background: rgba(20, 7, 10, 0.72);
  backdrop-filter: blur(2px);
}
footer .brand { justify-content: center; margin-bottom: 0.7rem; font-size: 1.05rem; }
.social { display: flex; gap: 1rem; justify-content: center; margin: 0.6rem 0 1.1rem; }
.social a {
  display: inline-flex; width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--surface-line);
  color: var(--color-text); text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.social a:hover { border-color: var(--color-accent); color: var(--color-accent-soft); transform: translateY(-2px); }

/* -------------------------------------------------------------
   Hero entrance animations
   ------------------------------------------------------------- */
.hero .hero-portrait { animation: rise 0.8s 0s both; }
.hero .eyebrow { animation: rise 0.8s 0.05s both; }
.hero h1       { animation: rise 0.9s 0.15s both; }
.hero .lead    { animation: rise 0.9s 0.30s both; }
.hero .cta-row { animation: rise 0.9s 0.45s both; }
.hero .trust   { animation: rise 0.9s 0.60s both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
