/* ═══════════════════════════════════════════
   shared.css — oulipo.xyz shared styles
   ═══════════════════════════════════════════ */

/* Cargo Fonts */
@font-face {
  font-display: block;
  font-family: "Standard";
  src: url("https://type.cargo.site/files/Standard-Book.woff") format("woff");
  font-style: normal;
  font-weight: normal;
}
@font-face {
  font-display: block;
  font-family: "Standard";
  src: url("https://type.cargo.site/files/Standard-Bold.woff") format("woff");
  font-style: normal;
  font-weight: bold;
}
@font-face {
  font-display: block;
  font-family: "Terminal Grotesque";
  src: url("https://type.cargo.site/files/TerminalGrotesque.woff")
    format("woff");
  font-style: normal;
  font-weight: normal;
}
@font-face {
  font-display: block;
  font-family: "Diatype Variable";
  src: url("https://type.cargo.site/files/Cargo-DiatypePlusVariable.woff2")
    format("woff2-variations");
  font-style: normal;
  font-weight: 200 1000;
}
@font-face {
  font-display: block;
  font-family: "Diatype Mono Variable";
  src: url("https://type.cargo.site/files/Cargo-DiatypePlusVariable.woff2")
    format("woff2-variations");
  font-style: normal;
  font-weight: 200 1000;
}

/* Base */
html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: rgba(0, 0, 0, 0.85);
  font-family: Standard, sans-serif;
  font-size: 1.3rem;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

a {
  color: rgba(0, 0, 0, 0.85);
  text-decoration: underline;
}

a:hover {
  opacity: 0.7;
}

a:active {
  opacity: 0.7;
}

/* Typography */
h1 {
  font-family: "Terminal Grotesque", sans-serif;
  font-style: normal;
  font-weight: 400;
  margin: 0;
  font-size: 7rem;
  line-height: 0.9;
  color: rgba(0, 0, 0, 0.85);
  letter-spacing: 0;
}

h2 {
  font-family: "Diatype Variable", sans-serif;
  font-style: normal;
  margin: 0;
  color: #000000;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 700;
}

.caption {
  font-size: 1.2rem;
  font-weight: 400;
  color: #000000;
  font-family: "Diatype Mono Variable", monospace;
  font-style: normal;
  line-height: 1.25;
  letter-spacing: 0em;
  font-variation-settings:
    "slnt" 0,
    "MONO" 1;
}

.caption a {
  color: #000000;
  text-decoration: underline;
}

hr {
  background: rgba(0, 0, 0, 0.75);
  border: 0;
  height: 1px;
  display: block;
  margin: 2rem 0;
}

/* Layout */
.page {
  padding: 4rem;
  max-width: 100%;
}

.page-content {
  max-width: 100%;
}

/* Cargo button style — outlined with slight radius */
.button-8 {
  display: inline-block;
  font-family: Standard, sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.85);
  background: transparent;
  border: 0.2rem solid rgba(0, 0, 0, 0.85);
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.button-8:hover {
  opacity: 0.7;
  color: rgba(0, 0, 0, 0.85);
}

/* Cargo layout splits — asymmetric grids */
.split-5-7 {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2rem;
  align-items: start;
}

.split-3-8 {
  display: grid;
  grid-template-columns: 3fr 8fr;
  gap: 2rem;
  align-items: start;
}

.split-8-4 {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 2rem;
  align-items: start;
}

/* Footer social icons */
.site-footer-icons {
  border-top: 1px solid rgba(0, 0, 0, 0.75);
  padding-top: 2rem;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}

.site-footer-icons a {
  font-family: Standard, sans-serif;
  font-size: 1rem;
  color: rgba(55, 55, 55, 0.85);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.site-footer-icons a:hover {
  opacity: 0.7;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 4rem;
  z-index: 200;
  font-family: Standard, sans-serif;
  font-size: 1.3rem;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.site-header a {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.85);
}

.site-header a:hover {
  opacity: 0.7;
}

.site-header.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Menu Toggle Button */
.menu-toggle {
  position: fixed;
  top: 1.5rem;
  right: 4rem;
  z-index: 200;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.menu-toggle.hidden {
  opacity: 0;
  visibility: hidden;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.85);
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.menu-toggle:hover {
  opacity: 0.7;
}

/* Side Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.25);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Side Menu Drawer */
.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  height: 100%;
  background-color: #ffffff;
  z-index: 999;
  padding: 2rem 4rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.side-menu.active {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.85);
}

.menu-home {
  font-family: Standard, sans-serif;
  font-size: 1.3rem;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.85);
}

.menu-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: rgba(0, 0, 0, 0.85);
}

.menu-close:hover {
  opacity: 0.7;
}

.menu-section {
  margin-bottom: 0;
}

.menu-section a {
  display: block;
  font-family: Standard, sans-serif;
  font-size: 1.3rem;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.15;
}

.menu-section a:hover {
  opacity: 0.7;
}

.menu-divider {
  border: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.85);
  margin: 0.75rem 0;
}

/* Responsive grid collapse */
@media (max-width: 900px) {
  .split-5-7,
  .split-3-8,
  .split-8-4 {
    grid-template-columns: 1fr;
  }
}

/* Shared Responsive */
@media (max-width: 768px) {
  .side-menu {
    width: 100%;
    padding: 2rem;
  }

  .menu-toggle {
    right: 2rem;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 2rem;
  }

  h1 {
    font-size: 4.5rem;
  }

  .site-header {
    left: 1.5rem;
    top: 1rem;
  }

  .menu-toggle {
    top: 1rem;
    right: 1.5rem;
  }
}
