@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --u: 8px;
  --dockh: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Didact Gothic', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  padding-bottom: calc(var(--dockh) + 16px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: 'Poiret One', 'Didact Gothic', 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 400;
  line-height: 1.18;
  margin: 0;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s linear, color 0.15s linear;
}

a:hover {
  background: var(--ink);
  color: var(--paper);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 8px;
  top: -80px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  transition: top 0.2s;
}

.skip:focus {
  top: 8px;
  color: var(--paper);
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 96px 0 40px;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}

.hero-slash {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 34%;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 58% 100%, 0 100%);
}

.hero-rule {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--ink);
}

.hero-in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-h1 {
  font-size: clamp(2.4rem, 8.6vw, 5.8rem);
  letter-spacing: 0.06em;
  max-width: 15ch;
}

.hero-sub {
  margin: 20px 0 0;
  max-width: 36ch;
  font-size: 0.94rem;
  line-height: 1.65;
  border-top: 1px solid var(--ink);
  padding-top: 12px;
}

/* ---------- GRID ---------- */

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}

.main-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  padding-block: 56px;
  align-items: start;
}

.rail {
  grid-column: 1 / span 3;
}

.body {
  grid-column: 4 / span 9;
}

.rail-in {
  position: sticky;
  top: 24px;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.rail small,
.prose small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  margin-bottom: 8px;
}

.rail-h {
  font-size: 1.2rem;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-list li {
  border-bottom: 1px solid var(--ink);
}

.rail-list a {
  display: block;
  padding: 11px 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ---------- PROSE ---------- */

.prose {
  max-width: 68ch;
  overflow-wrap: break-word;
}

.prose > section {
  padding-block: clamp(30px, 5vw, 58px);
  border-top: 2px solid var(--ink);
  scroll-margin-top: 16px;
}

.prose > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  margin-bottom: 18px;
}

.prose h3 {
  font-size: 1.2rem;
  margin: 30px 0 12px;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 6px solid var(--ink);
  font-size: 1.05rem;
}

.prose figure {
  margin: 24px 0;
}

.prose figcaption {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  margin-top: 8px;
  border-top: 1px solid var(--ink);
  padding-top: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--ink);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  border-bottom-width: 2px;
  letter-spacing: 0.08em;
}

/* ---------- FOOTER ---------- */

.foot {
  border-top: 2px solid var(--ink);
  margin-top: 24px;
  padding-top: 48px;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px 16px;
}

.f-col:nth-child(1) {
  grid-column: 1 / span 4;
}

.f-col:nth-child(2) {
  grid-column: 5 / span 4;
}

.f-col:nth-child(3) {
  grid-column: 9 / span 4;
}

.foot h3 {
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.address,
address {
  font-style: normal;
  line-height: 1.6;
  word-break: break-word;
  font-size: 0.95rem;
}

.f-nav dl {
  margin: 0;
}

.f-nav dt {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  margin-top: 12px;
}

.f-nav dt:first-child {
  margin-top: 0;
}

.f-nav dd {
  margin: 0;
}

.f-nav dd a,
.f-quick a {
  display: block;
  padding: 9px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.f-quick ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sub {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.sub input {
  flex: 1 1 130px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.sub button {
  min-height: 44px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  letter-spacing: 0.2em;
  cursor: pointer;
}

.sub button:hover {
  background: var(--paper);
  color: var(--ink);
}

.f-bar {
  border-top: 1px solid var(--ink);
  margin-top: 40px;
  padding-block: 16px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.f-bar p {
  margin: 0;
}

/* ---------- DOCK ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
}

.dock-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  overflow: hidden;
}

.dock-mark:hover {
  background: var(--paper);
  color: var(--ink);
}

.dock-glyph {
  font-family: 'Poiret One', 'Didact Gothic', sans-serif;
  font-size: 1.35rem;
  line-height: 1;
}

.dock-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.dock-toggle {
  min-height: 44px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  cursor: pointer;
  transition: background-color 0.15s linear, color 0.15s linear;
}

.dock-toggle[aria-expanded='true'] {
  background: var(--paper);
  color: var(--ink);
}

.dock-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: 22px 20px calc(var(--dockh) + 24px + env(safe-area-inset-bottom, 0px));
  max-height: 82vh;
  overflow-y: auto;
  transform: translateY(102%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  visibility: hidden;
}

body.dock-open .dock-panel {
  transform: translateY(0);
  visibility: visible;
}

.dock-panel nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.dock-dt {
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin: 0 0 8px;
}

.dock-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dock-group a {
  display: block;
  padding: 11px 0;
  min-height: 42px;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
}

/* ---------- REVEAL ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ---------- BREAKPOINTS ---------- */

@media (max-width: 899px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-block: 34px;
  }

  .rail,
  .body {
    grid-column: 1 / -1;
  }

  .body {
    order: 1;
  }

  .rail {
    order: 2;
  }

  .rail-in {
    position: static;
  }

  .rail-h {
    font-size: 1rem;
  }

  .rail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .rail-list li {
    border: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
  }

  .rail-list a {
    padding: 9px 12px;
    min-height: 40px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .foot-grid .f-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 45vh;
    padding: 84px 0 32px;
  }

  .hero-slash {
    width: 22%;
  }

  .hero-in {
    padding: 0 18px;
  }

  .wrap {
    padding-inline: 18px;
  }

  .dock-panel nav {
    grid-template-columns: 1fr;
  }

  .prose > section {
    padding-block: 30px;
  }
}

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

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

  .dock-panel,
  .skip {
    transition: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
