@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap");

:root {
  --ink: #17120e;
  --muted: #746a5f;
  --paper: #f5f0e7;
  --paper-deep: #e9dfd1;
  --line: rgba(23, 18, 14, 0.16);
  --accent: #bf741f;
  --accent-bright: #df9843;
  --white: #fffaf3;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 5rem);
  background:
    radial-gradient(circle at 87% 8%, rgba(223, 152, 67, 0.17), transparent 22rem),
    var(--paper);
  overflow: hidden;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 6.5rem;
  border-bottom: 1px solid var(--line);
}

.brand,
.header-link {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  gap: 0.9rem;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 2.9rem;
  height: 2.9rem;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(191, 116, 31, 0.55);
  border-radius: 50%;
  background: var(--ink);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.header-link {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  transition: color 180ms ease, border-color 180ms ease;
}

.header-link:hover,
.header-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.75fr);
  gap: clamp(3rem, 10vw, 10rem);
  min-height: 31rem;
  padding: clamp(4rem, 9vw, 8.5rem) 0 clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.intro-copy {
  align-self: end;
}

.eyebrow,
.contents-label,
.policy-meta,
.date-block span {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0 0 2.2rem;
  color: var(--accent);
}

.eyebrow span {
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
}

h1 {
  max-width: 8ch;
  margin: 0;
  font-size: clamp(4.8rem, 11vw, 10.5rem);
  font-weight: 700;
  letter-spacing: -0.085em;
  line-height: 0.8;
}

h1 em {
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.08em;
}

.intro-lede {
  max-width: 31rem;
  margin: 3.1rem 0 0;
  color: var(--muted);
  font-size: clamp(0.93rem, 1.3vw, 1.08rem);
  line-height: 1.8;
}

.intro-lede a,
.section-content a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.intro-lede a:hover,
.intro-lede a:focus-visible,
.section-content a:hover,
.section-content a:focus-visible {
  color: var(--accent);
}

.intro-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 20rem;
}

.logo-frame {
  position: relative;
  width: min(100%, 21rem);
  aspect-ratio: 1;
  padding: 1.25rem;
  background:
    linear-gradient(135deg, rgba(255, 250, 243, 0.76), rgba(191, 116, 31, 0.16)),
    var(--ink);
  box-shadow: 1rem 1rem 0 var(--paper-deep);
  transform: rotate(3deg);
}

.logo-frame::before,
.logo-frame::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.logo-frame::before {
  inset: 0.8rem;
  border: 1px solid rgba(223, 152, 67, 0.65);
}

.logo-frame::after {
  right: -1.2rem;
  bottom: -1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
}

.logo-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.date-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-end;
  margin-top: 2.5rem;
}

.date-block span {
  color: var(--muted);
}

.date-block strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 0.34fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 8vw, 9rem);
  padding: clamp(4rem, 8vw, 8rem) 0;
}

.contents {
  align-self: start;
  position: sticky;
  top: 2rem;
}

.contents-label {
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.contents nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  border-left: 1px solid var(--line);
}

.contents a {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.contents a::before {
  position: absolute;
  top: 0.55em;
  left: -1px;
  width: 3px;
  height: 3px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 180ms ease;
}

.contents a:hover,
.contents a:focus-visible {
  color: var(--ink);
  transform: translateX(0.25rem);
}

.contents a:hover::before,
.contents a:focus-visible::before {
  opacity: 1;
}

.policy {
  min-width: 0;
  max-width: 55rem;
}

.policy-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.35rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.policy-section {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2.8rem, 6vw, 5.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.section-number {
  padding-top: 0.35rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.73rem;
}

.section-content h2 {
  margin: 0 0 1.3rem;
  font-size: clamp(1.5rem, 2.7vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.section-content p {
  max-width: 43rem;
  margin: 0;
  color: #51483f;
  font-size: clamp(0.98rem, 1.25vw, 1.1rem);
  line-height: 1.95;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 1.5rem;
  align-items: center;
  min-height: 8rem;
  margin: 0 calc(clamp(1.25rem, 4vw, 5rem) * -1);
  padding: 2rem clamp(1.25rem, 4vw, 5rem);
  color: var(--paper);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.site-footer a {
  justify-self: center;
  color: var(--accent-bright);
  text-transform: none;
  letter-spacing: 0;
}

.site-footer span {
  justify-self: end;
  color: rgba(245, 240, 231, 0.55);
}

.back-to-top {
  position: fixed;
  z-index: 5;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2.5rem);
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  color: var(--paper);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0.75rem 1.7rem rgba(23, 18, 14, 0.2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.7rem);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.back-to-top span {
  place-self: center;
  font-size: 1.3rem;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 4px;
}

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 600ms ease, transform 600ms ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 5.2rem;
  }

  .brand-name {
    max-width: 8rem;
    font-size: 0.61rem;
    line-height: 1.35;
  }

  .intro {
    display: flex;
    flex-direction: column;
    gap: 3.7rem;
    min-height: auto;
    padding-top: 4.5rem;
  }

  h1 {
    font-size: clamp(4.4rem, 20vw, 7rem);
  }

  .intro-aside {
    align-items: flex-start;
    min-height: auto;
  }

  .logo-frame {
    width: min(74vw, 19rem);
  }

  .date-block {
    align-items: flex-start;
  }

  .reading-layout {
    display: block;
    padding-top: 3.7rem;
  }

  .contents {
    position: static;
    margin-bottom: 4rem;
  }

  .contents nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1rem;
  }

  .policy-meta {
    flex-direction: column;
    gap: 0.55rem;
    line-height: 1.4;
  }

  .policy-section {
    grid-template-columns: 2.3rem minmax(0, 1fr);
    gap: 0.9rem;
    padding: 2.8rem 0;
  }

  .section-content p {
    font-size: 0.98rem;
    line-height: 1.82;
  }

  .site-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
  }

  .site-footer a,
  .site-footer span {
    justify-self: auto;
  }
}

@media (max-width: 390px) {
  .contents nav {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}