@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syncopate:wght@400;700&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #fafaf8;
  color: #1a1a1a;
}

body {
  font-family: 'Space Mono', 'Courier New', monospace;
  background: #fafaf8;
  color: #1a1a1a;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(26,26,26,0.03) 28px,
      rgba(26,26,26,0.03) 29px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 48px,
      rgba(26,26,26,0.02) 48px,
      rgba(26,26,26,0.02) 49px
    );
}

/* ===== SCROLL OFFSET for fixed bottom nav ===== */
section[id] { scroll-margin-top: 20px; scroll-margin-bottom: 140px; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Syncopate', 'Arial Narrow', sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

h2 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.3rem); }

p { font-size: 1rem; line-height: 1.75; }

a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { opacity: 0.65; }

/* ===== PAGE SHELL ===== */
.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 130px;
}

/* ===== MAIN CANVAS ===== */
.main-canvas { flex: 1; }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== BOTTOM FIXED NAV ASIDE ===== */
.bottom-nav-aside {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #1a1a1a;
  color: #fafaf8;
  border-top: 3px solid #4a4a4a;
  box-shadow: 0 -4px 0 0 rgba(26,26,26,0.15), 0 -6px 0 0 rgba(250,250,248,0.08);
}

/* aside > nav: the bottom-nav-bar is the direct nav inside aside */
.bottom-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
}

.bn-left, .bn-right {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* aside > nav > ... > a tap targets ≥40px */
.bn-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  color: #fafaf8;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  transition: none;
}
.bn-link:hover {
  color: #fafaf8;
  border-color: #4a4a4a;
  background: rgba(250,250,248,0.08);
  opacity: 1;
  transform: rotate(-0.8deg);
}

.bn-brand {
  flex-shrink: 0;
  text-align: center;
}
.bn-brand-text {
  font-family: 'Syncopate', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fafaf8;
  white-space: nowrap;
}
.bn-logo-mark { height: 32px; width: auto; }

/* Search row */
.bn-search-row {
  padding: 0.35rem 1rem;
  border-top: 1px dashed #4a4a4a;
}
.bn-search {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}
.bn-search-input {
  flex: 1;
  background: transparent;
  border: 1px solid #4a4a4a;
  border-right: none;
  color: #fafaf8;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  outline: none;
  min-height: 44px;
}
.bn-search-input::placeholder { color: #4a4a4a; }
.bn-search-btn {
  background: #4a4a4a;
  border: 1px solid #4a4a4a;
  color: #fafaf8;
  font-size: 1rem;
  padding: 0 0.9rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: none;
}
.bn-search-btn:hover { background: #fafaf8; color: #1a1a1a; transform: rotate(1deg); }

/* aside > nav (mobile wrap) > ul > li > a */
.bn-nav-mobile-wrap {
  display: none;
  border-top: 1px dashed #4a4a4a;
}
.bn-nav-mobile {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0.4rem 1rem;
  gap: 0.25rem;
}
.bn-nav-mobile li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.8rem;
  color: #fafaf8;
  text-decoration: none;
  font-size: 0.72rem;
  border: 1px solid #4a4a4a;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #fafaf8;
  display: flex;
  align-items: stretch;
}

.hero-article {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 70vh;
}

.hero-text-layer {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 5rem 1.5rem 6rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: #4a4a4a;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border-bottom: 2px solid #1a1a1a;
  display: inline-block;
  padding-bottom: 0.2rem;
  transform: rotate(-0.5deg);
}

.hero-h1 {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #1a1a1a;
  margin-bottom: 1.2rem;
  line-height: 1.1;
  transform: rotate(-0.3deg);
}

.hero-desc {
  font-size: 1.05rem;
  color: #4a4a4a;
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  color: #fafaf8;
  font-family: 'Syncopate', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  padding: 0.85rem 2.2rem;
  text-decoration: none;
  border: 2px solid #1a1a1a;
  min-height: 48px;
  transform: rotate(0.4deg);
  transition: none;
}
.hero-cta:hover {
  background: #fafaf8;
  color: #1a1a1a;
  transform: rotate(-0.6deg) translateY(-2px);
  opacity: 1;
  box-shadow: 4px 4px 0 #1a1a1a;
}

.hero-slash {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: #1a1a1a;
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 2;
}

.hero-img-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0.12;
  filter: grayscale(1) contrast(1.2);
  will-change: transform;
}
.hero-img-layer .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== CONTENT SECTION ===== */
.content-section {
  background: #fafaf8;
  padding: 3rem 0 4rem;
}

.content-article section {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 2px dashed #4a4a4a;
  position: relative;
}
.content-article section:last-child {
  border-bottom: none;
}

.content-article h2 {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(1.15rem, 2.8vw, 1.65rem);
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  border-left: 4px solid #1a1a1a;
  transform: rotate(-0.2deg);
  display: inline-block;
}

.content-article h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.content-article p {
  color: #1a1a1a;
  margin-bottom: 1rem;
  max-width: 72ch;
}

.content-article ul, .content-article ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.content-article li { margin-bottom: 0.4rem; line-height: 1.7; }

.content-article a {
  color: #1a1a1a;
  font-weight: 700;
  text-underline-offset: 4px;
}

.content-article .card,
.content-article [class*="card"] {
  background: #1a1a1a;
  color: #fafaf8;
  border-radius: 28px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #1a1a1a;
  color: #fafaf8;
  padding: 3rem 1.5rem 1.5rem;
  position: relative;
}
.site-footer::before {
  content: '';
  display: block;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    #fafaf8 0, #fafaf8 18px,
    #4a4a4a 18px, #4a4a4a 36px
  );
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-top: 1.5rem;
}

.footer-brand-huge {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fafaf8;
  line-height: 1.05;
  margin-bottom: 1rem;
  transform: rotate(-0.5deg);
  display: inline-block;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #4a4a4a;
  line-height: 1.6;
}

.footer-col-title {
  font-family: 'Syncopate', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: #fafaf8;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid #4a4a4a;
  padding-bottom: 0.3rem;
}

.subtitle,
p.subtitle,
.footer-col-sub {
  font-size: 0.75rem;
  color: #4a4a4a;
  margin-bottom: 0.8rem;
  font-style: italic;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
}
.footer-nav-list li { margin-bottom: 0.4rem; }
.footer-nav-list a {
  color: #fafaf8;
  text-decoration: none;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.1rem 0;
  border-bottom: 1px dashed transparent;
}
.footer-nav-list a:hover {
  border-bottom-color: #4a4a4a;
  opacity: 0.8;
}

.footer-about-text {
  font-size: 0.8rem;
  color: #4a4a4a;
  line-height: 1.6;
}

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid #4a4a4a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo-img { height: 28px; width: auto; opacity: 0.8; }
.footer-logo-text {
  font-family: 'Syncopate', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #fafaf8;
}

.footer-bottom-nav a {
  color: #4a4a4a;
  text-decoration: none;
  font-size: 0.78rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
}
.footer-bottom-nav a:hover { color: #fafaf8; opacity: 1; }

.footer-copyright {
  font-size: 0.75rem;
  color: #4a4a4a;
  text-align: right;
}

/* ===== BRAND ===== */
.brand-logo { height: 36px; width: auto; }
.brand-text {
  font-family: 'Syncopate', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

/* ===== HAND-DRAWN DECORATIONS ===== */
.hero-text-layer::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4.5rem;
  transform: translateX(-50%) rotate(-1deg);
  width: 60px;
  height: 3px;
  background: #1a1a1a;
  display: block;
}

.content-article section::before {
  content: '';
  display: block;
  width: 38px;
  height: 12px;
  background: rgba(74,74,74,0.18);
  transform: rotate(-2.5deg) translateY(-6px);
  margin-bottom: 0.5rem;
  border: 1px solid rgba(26,26,26,0.12);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-copyright { text-align: left; }

  .bn-left, .bn-right { display: none; }
  .bn-nav-mobile-wrap { display: block; }

  .hero-h1 { font-size: 1.5rem; }
  .hero-text-layer { padding: 3.5rem 1rem 5rem; }

  .content-article h2 { font-size: 1.1rem; }

  .page-shell { padding-bottom: 180px; }
}

@media (max-width: 375px) {
  .bn-search-input { font-size: 0.72rem; }
  .hero-h1 { font-size: 1.3rem; letter-spacing: 0.04em; }
  .footer-brand-huge { font-size: 1.5rem; }
}
