/* =========================================================
   Layout
   ========================================================= */

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  gap: var(--sp-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}

.brand .mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: none;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.nav-main ul {
  display: flex;
  gap: var(--sp-4);
}

.nav-main a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 0.25rem 0;
}
.nav-main a:hover { color: var(--ink); }
.nav-main a.is-active { color: var(--ink); font-weight: 600; }

.header-ctas {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.header-ctas .tel {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: none;
}

@media (min-width: 920px) {
  .header-ctas .tel { display: inline-flex; }
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .nav-main { display: none; }
  .nav-toggle { display: flex; }
  .header-ctas .btn-ghost { display: none; }
}

/* Mobile drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 150;
  padding: var(--sp-4);
  flex-direction: column;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-5);
}
.mobile-nav ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.mobile-nav a {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.mobile-nav__close { color: var(--paper); width: 40px; height: 40px; }
.mobile-nav__footer {
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-on-ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ---- Sections ---- */
section { padding: var(--sp-6) 0; }
section.tight { padding: var(--sp-5) 0; }

@media (max-width: 640px) {
  section { padding: var(--sp-5) 0; }
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--sp-5);
}
.section-head h2 {
  font-size: var(--fs-display-m);
  margin-top: var(--sp-2);
}
.section-head p {
  margin-top: var(--sp-2);
  font-size: var(--fs-body-l);
  color: var(--ink-soft);
}

.bg-ink { background: var(--ink); color: var(--paper); }
.bg-ink h2, .bg-ink h3, .bg-ink h4 { color: var(--paper); }
.bg-ink .section-head p { color: rgba(250,246,238,0.72); }

.bg-dim { background: var(--paper-dim); }

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: rgba(250,246,238,0.78);
  padding: var(--sp-6) 0 var(--sp-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-5);
}

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

.footer-grid h4 {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
  font-weight: 600;
}

.footer-grid li { margin-bottom: 0.7rem; }
.footer-grid a:hover { color: var(--paper); }

.footer-brand p {
  margin-top: var(--sp-2);
  font-size: 0.9rem;
  max-width: 320px;
  color: rgba(250,246,238,0.65);
}

.footer-bottom {
  border-top: 1px solid var(--line-on-ink);
  padding-top: var(--sp-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: rgba(250,246,238,0.5);
}

/* ---- Grid helpers ---- */
.grid {
  display: grid;
  gap: var(--sp-4);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 920px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-6);
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-4); }
}

/* keep header items on one line */
.nav-main a, .header-ctas .tel, .header-ctas .btn { white-space: nowrap; }
