:root {
  --bg: #f6f1e8;
  --ink: #0b0b0b;
  --muted: #7c776f;
  --line: rgba(11, 11, 11, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, .magazine:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

.site-header {
  position: relative;
  z-index: 10;
  padding: 28px 5vw 0;
}

.nav {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 20px;
  text-transform: uppercase;
  font-size: 12px;
}

.nav a { white-space: nowrap; }
.nav a:nth-child(3) { justify-self: end; }
.brand {
  justify-self: center !important;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.06em;
}

main { width: min(100%, 1100px); margin: 0 auto; }
.hero {
  min-height: 690px;
  padding: 60px 24px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 400;
}

.hero-sub {
  margin: 36px 0 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 400;
  text-transform: uppercase;
}

.magazine-stage {
  position: relative;
  width: min(78vw, 440px);
  height: 340px;
  display: grid;
  place-items: center;
  perspective: 1200px;
  user-select: none;
  touch-action: pan-y;
}

.magazine {
  --rotation: -14deg;
  position: relative;
  width: 188px;
  height: 270px;
  transform-style: preserve-3d;
  transform: rotateY(var(--rotation)) rotateX(2deg) rotateZ(-2deg);
  cursor: grab;
  transition: transform 120ms ease-out;
}
.magazine:active { cursor: grabbing; }

.magazine-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: #f1f0ec;
  border: 1px solid rgba(0,0,0,.22);
  box-shadow: 0 18px 28px rgba(0,0,0,.12);
  overflow: hidden;
}

.magazine-front { transform: translateZ(8px); padding: 18px 14px 12px; }
.magazine-back { transform: rotateY(180deg) translateZ(8px); background: #deddd8; }
.magazine-spine {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 270px;
  transform-origin: left center;
  transform: rotateY(-90deg) translateX(-8px);
  background: #d5d3ce;
  border: 1px solid rgba(0,0,0,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.cover-kicker { font-size: 6px; letter-spacing: .18em; }
.cover-title {
  margin-top: 2px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.07em;
}
.cover-image {
  position: relative;
  height: 170px;
  margin-top: 8px;
  overflow: hidden;
}
.cover-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.cover-caption { margin-top: 8px; font-size: 6px; letter-spacing: .12em; }
.back-grid {
  position: absolute;
  inset: 18px;
  background-image:
    linear-gradient(rgba(0,0,0,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.09) 1px, transparent 1px);
  background-size: 14px 14px;
}
.back-copy {
  position: absolute;
  bottom: 18px;
  left: 18px;
  font-size: 28px;
  font-weight: 900;
  line-height: .86;
  letter-spacing: -.06em;
}
.shadow {
  position: absolute;
  bottom: 33px;
  width: 240px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.16);
  filter: blur(14px);
  transform: translateX(8px);
}

.rotate-hint { margin-top: -6px; font-size: 10px; }
.rotate-hint > span { display: block; margin-bottom: 4px; }
.hint-line { display: flex; align-items: center; gap: 8px; justify-content: center; }
.hint-line span { display: inline-block; width: 82px; height: 1px; background: var(--ink); }

.links {
  width: min(92%, 520px);
  margin: 4px auto 0;
}
.action-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  font-size: 15px;
  transition: padding-left 160ms ease;
}
.action-link:hover { padding-left: 8px; }

.about {
  width: min(90%, 560px);
  margin: 56px auto 0;
  padding: 0 0 48px;
  text-align: center;
}
.about p {
  margin: 0 auto;
  max-width: 460px;
  font-size: 15px;
  line-height: 1.5;
}
.about strong {
  font-weight: 700;
}
.socials {
  margin-top: 38px;
  display: flex;
  justify-content: center;
  gap: 54px;
  text-transform: uppercase;
  font-size: 13px;
}
.socials a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 700px) {
  .site-header { padding-top: 20px; }
  .nav {
    grid-template-columns: 1fr 1fr;
    row-gap: 14px;
    font-size: 10px;
  }
  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 32px;
  }
  .nav a:nth-child(1) { grid-column: 1; grid-row: 2; }
  .nav a:nth-child(3) { grid-column: 2; grid-row: 2; justify-self: end; }

  .hero { padding-top: 50px; min-height: 640px; }
  h1,
  .hero-sub { font-size: clamp(38px, 11vw, 56px); }
  .magazine-stage { height: 320px; }
  .magazine { width: 174px; height: 250px; }
  .magazine-spine { height: 250px; }
  .cover-image { height: 152px; }
  .links { width: calc(100% - 48px); }
  .socials { gap: 24px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .magazine, .action-link { transition: none; }
}
