/* layout.css — header, footer, structural grids */

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--ff-display); font-weight: 700; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand b { font-size: 1.12rem; letter-spacing: -.02em; line-height: 1; }
.brand span { display: block; font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--red); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.nav-links a {
  display: inline-block; padding: 9px 13px; border-radius: 999px;
  font-size: .92rem; font-weight: 500; color: var(--ink-soft);
}
.nav-links a:hover { background: var(--paper); color: var(--red); }
.nav-links a.is-active { background: var(--ink); color: #fff; }
.nav-links a.is-active:hover { color: #fff; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; flex: none;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: .25s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: #cfd4e8; margin-top: 90px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding: 64px 0 44px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; letter-spacing: .04em; }
.site-footer p { color: #aab1d0; font-size: .95rem; }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: #cfd4e8; font-size: .94rem; }
.footer-nav a:hover { color: #fff; }
.footer-brand .brand b { color: #fff; }
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff;
}
.social-row a:hover { background: var(--red); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  font-size: .85rem; color: #8c93b6;
}
.footer-bottom a { color: #aab1d0; }
.footer-bottom a:hover { color: #fff; }

/* ---- Section rhythm ---- */
.section { padding: 84px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { margin: 14px 0 12px; }

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 22px 22px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .22s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; border-radius: 12px; }
}
@media (max-width: 620px) {
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}
