@import url('https://fonts.googleapis.com/css2?family=Anton&family=Epilogue:wght@400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  font-size: 17px;
  background: #fdfbf7;
  color: #1a1a1a;
}

body.body-root {
  font-family: 'Epilogue', 'Noto Serif SC', Georgia, serif;
  font-size: 1rem;
  line-height: 1.75;
  background: #fdfbf7;
  color: #1a1a1a;
  min-height: 100vh;
  overflow-x: hidden;
  /* paper noise texture */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: none;
}

a:hover {
  background: #1a1a1a;
  color: #fdfbf7;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

hr {
  border: none;
  border-top: 2px solid #1a1a1a;
  margin: 1.2rem 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Anton', 'Epilogue', sans-serif;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #1a1a1a;
}

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: #f5f5f5;
  border-right: 2px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem;
  z-index: 100;
  overflow-y: auto;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #1a1a1a;
}

.brand-logo {
  display: block;
  text-decoration: none;
}

.site-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-name {
  font-family: 'Anton', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #1a1a1a;
  word-break: break-all;
}

/* ===== NAV (header > nav > p > a) ===== */
.site-nav {
  flex: 1;
}

.site-nav p {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-nav p a {
  display: block;
  font-family: 'Epilogue', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #1a1a1a;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid #d0cfcb;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.site-nav p a:hover {
  background: #1a1a1a;
  color: #fdfbf7;
  padding-left: 1rem;
}

/* ===== LAYOUT BODY ===== */
.layout-body {
  margin-left: 220px;
  display: flex;
  flex: 1;
  align-items: flex-start;
}

.site-main {
  flex: 1;
  min-width: 0;
}

/* ===== HERO ===== */
.hero-band {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-bottom: 2px solid #1a1a1a;
}

.hero-slash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  clip-path: polygon(0 0, 52% 0, 42% 100%, 0 100%);
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4rem 3rem 4rem 3rem;
  gap: 2.5rem;
}

.hero-visual {
  flex: 0 0 38%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-paper-block {
  width: 100%;
  max-width: 260px;
  border: 2px solid #1a1a1a;
  padding: 2rem 1.5rem;
  background: #fdfbf7;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-paper-line {
  height: 10px;
  background: #1a1a1a;
  width: 100%;
}

.hero-paper-line.short {
  width: 55%;
}

.hero-paper-line.mid {
  width: 75%;
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero-h1 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: 1.2rem;
  color: #1a1a1a;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #2a2a2a;
  margin-bottom: 2rem;
  max-width: 460px;
}

.hero-cta {
  display: inline-block;
  font-family: 'Anton', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 2rem;
  background: #1a1a1a;
  color: #fdfbf7;
  text-decoration: none;
  border: 2px solid #1a1a1a;
  min-height: 44px;
  line-height: 1.4;
}

.hero-cta:hover {
  background: #fdfbf7;
  color: #1a1a1a;
}

/* ===== MAIN ARTICLE / SECTION ===== */
.main-article {
  width: 100%;
}

.page-content-section {
  padding: 3rem 3rem 3rem 3rem;
  max-width: 860px;
}

/* Content HTML styles */
.page-content-section h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-top: 2.5rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.page-content-section h2 + hr {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.page-content-section h3 {
  font-family: 'Epilogue', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.page-content-section h3 + hr {
  margin-top: 0;
  margin-bottom: 1rem;
}

.page-content-section p {
  margin-bottom: 1.1rem;
  font-size: 1rem;
  line-height: 1.8;
}

.page-content-section ul,
.page-content-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}

.page-content-section li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.page-content-section a {
  color: #1a1a1a;
  font-weight: 600;
}

.page-content-section blockquote {
  border-left: 4px solid #1a1a1a;
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: #f5f5f5;
  font-style: italic;
}

.page-content-section section {
  padding-top: 1.5rem;
  margin-bottom: 2rem;
  border-top: 1px solid #d0cfcb;
  scroll-margin-top: 80px;
}

.page-content-section section:first-child {
  border-top: none;
  padding-top: 0;
}

/* ===== ASIDE ===== */
.site-aside {
  flex: 0 0 220px;
  position: sticky;
  top: 1.5rem;
  align-self: flex-start;
  border-left: 2px solid #1a1a1a;
  background: #f5f5f5;
  min-height: 200px;
}

.aside-inner {
  padding: 1.5rem 1.2rem;
}

.aside-title {
  font-family: 'Anton', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.aside-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}

.aside-link {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: 'Epilogue', sans-serif;
  text-decoration: none;
  color: #1a1a1a;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #d0cfcb;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-link:hover {
  background: #1a1a1a;
  color: #fdfbf7;
  padding-left: 0.8rem;
}

.aside-note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: #555;
  line-height: 1.5;
}

/* ===== FOOTER (footer > div + nav + div) ===== */
.site-footer {
  margin-left: 220px;
  border-top: 2px solid #1a1a1a;
  background: #1a1a1a;
  color: #fdfbf7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 2rem;
  min-height: 56px;
}

.footer-logo a {
  font-family: 'Anton', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #fdfbf7;
  text-decoration: none;
}

.footer-logo a:hover {
  background: transparent;
  text-decoration: underline;
}

.footer-nav {
  font-size: 0.8rem;
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-nav a {
  color: #ccc;
  text-decoration: none;
  font-family: 'Epilogue', sans-serif;
  font-size: 0.8rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.3rem;
}

.footer-nav a:hover {
  color: #fdfbf7;
  background: transparent;
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.78rem;
  color: #aaa;
  font-family: 'Epilogue', sans-serif;
}

/* ===== STAGGER ANIMATION ===== */
@media (prefers-reduced-motion: no-preference) {
  .page-content-section article {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  .page-content-section article.in-view {
    opacity: 1;
    transform: translateY(0);
  }
  .aside-link {
    transition: none;
  }
  .hero-cta {
    transition: none;
  }
  .site-nav p a {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-content-section article {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .site-header {
    width: 180px;
  }
  .layout-body {
    margin-left: 180px;
  }
  .site-footer {
    margin-left: 180px;
  }
  .site-aside {
    flex: 0 0 180px;
  }
  .hero-inner {
    padding: 3rem 2rem;
  }
  .page-content-section {
    padding: 2rem 2rem;
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 56px;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-right: none;
    border-bottom: 2px solid #1a1a1a;
    z-index: 200;
    overflow: visible;
  }

  .header-brand {
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    gap: 0.5rem;
    min-height: 56px;
  }

  .brand-name {
    font-size: 0.85rem;
  }

  .site-nav {
    display: none;
  }

  .layout-body {
    margin-left: 0;
    margin-top: 56px;
    flex-direction: column;
  }

  .site-main {
    width: 100%;
  }

  .site-aside {
    flex: none;
    width: 100%;
    border-left: none;
    border-top: 2px solid #1a1a1a;
    position: static;
  }

  .site-footer {
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
  }

  .hero-band {
    min-height: 50vh;
  }

  .hero-slash {
    display: none;
  }

  .hero-inner {
    flex-direction: column;
    padding: 2.5rem 1.25rem 2rem;
    gap: 1.5rem;
  }

  .hero-visual {
    flex: none;
    width: 100%;
  }

  .hero-paper-block {
    max-width: 100%;
  }

  .hero-h1 {
    font-size: clamp(1.6rem, 8vw, 2.5rem);
  }

  .page-content-section {
    padding: 1.5rem 1.1rem;
  }

  .aside-inner {
    padding: 1.1rem 1rem;
  }

  .aside-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
}

@media (max-width: 380px) {
  .hero-h1 {
    font-size: 1.5rem;
  }
  .page-content-section {
    padding: 1rem 0.9rem;
  }
}
