/* ==========================================================
   layout.css — the big building blocks of every page
   ----------------------------------------------------------
   1. Container (keeps content centered and not too wide)
   2. Header + navigation
   3. Sections (the stacked parts of each page)
   4. Footer
   ========================================================== */


/* ---------- 1. Container ---------- */
.container {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: 820px;
}


/* ---------- 2. Header + navigation ----------
   The header sticks to the top while you scroll. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 16px 0;
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

/* main.js adds "is-scrolled" once you scroll down a bit */
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Your hand-drawn "bino." logo in the top left */
.logo {
  display: block;
  flex-shrink: 0;
}

.logo img {
  height: 48px;  /* change this number to make the logo bigger or smaller */
  width: auto;
}

.nav {
  margin-left: auto; /* pushes the menu to the right side */
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a:not(.button) {
  text-decoration: none;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav a:not(.button):hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* The "Menu" button only shows on phones
   (".nav-tools" in front makes this rule stronger than the .button style) */
.nav-tools .menu-button {
  display: none;
}

/* ---- Phone layout for the header (screens smaller than 860px) ---- */
@media (max-width: 860px) {
  .nav-tools .menu-button {
    display: inline-flex;
  }

  .logo img {
    height: 40px;
  }

  /* The nav becomes a dropdown panel under the header */
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 26px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(28, 26, 23, 0.12);
    font-size: 20px;
  }

  .nav a:not(.button) {
    color: var(--ink);
  }

  /* main.js adds the class "is-open" when you tap Menu */
  .nav.is-open {
    display: flex;
  }
}


/* ---------- 3. Sections ---------- */
.section {
  padding: 110px 0;
}

/* A section with a slightly darker background */
.section-soft {
  background: var(--soft);
}

.section-intro {
  max-width: 660px;
  margin-bottom: 56px;
}

.section-intro.is-centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-intro .label {
  margin-bottom: 14px;
}

.section-intro p {
  color: var(--muted);
  font-size: 20px;
  margin: 0;
}

/* A heading row with a link on the right ("See all work →") */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.section-head .section-intro {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .section {
    padding: 72px 0;
  }

  .section-intro {
    margin-bottom: 40px;
  }
}


/* ---------- 4. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.3fr;
  gap: 40px;
}

.logo-footer img {
  height: 60px;
}

.footer-tagline {
  margin: 18px 0 0;
  max-width: 300px;
  color: var(--muted);
}

.footer-title {
  display: block;
  margin-bottom: 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-grid a {
  text-decoration: none;
}

.footer-grid a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  margin: 56px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}
