:root {
  --paper: #f2efe6;
  --ink: #1c1c1c;
  --shade: #6a6a6a;
  --mid: #b7b3aa;
  --lift: #fbf7f6;
  --face: "Bodoni Moda", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--mid) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face);
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

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

:focus {
  outline: none;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: var(--lift);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.sheet {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.compass {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.compass path,
.study-draw path,
.study-draw circle,
.diagram-lines,
.diagram-lines path,
.diagram-lines circle,
.diagram-lines ellipse,
.lock-draw,
.lock-draw path,
.lock-draw circle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compass path {
  stroke-width: 1.5;
}

.topbar,
.hero {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 3vw 0.4rem;
}

.mark {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.8rem 1.1rem;
  margin: 0;
}

.name {
  font-style: italic;
  font-weight: 500;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.facts {
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.langs {
  display: flex;
  gap: 0.15rem;
}

.lang {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--face);
  font-style: normal;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  padding: 0.35rem 0.45rem;
  cursor: pointer;
}

.lang[aria-pressed="true"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.92fr);
  min-height: 0;
}

.hero-copy {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  column-gap: 0.6rem;
  align-content: center;
  padding: 2.5rem 2vw 3.5rem 4vw;
}

.index {
  grid-row: 1 / span 4;
  margin: 0;
  padding: 0.35rem 0 0;
  list-style: none;
}

.index li {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  line-height: 1.05;
}

.num {
  display: block;
  margin-bottom: 0.1rem;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

h1 {
  grid-column: 2;
  margin: 0;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(3.6rem, 6.4vw, 6.6rem);
  letter-spacing: -0.035em;
  line-height: 0.86;
}

h1 span {
  display: block;
}

.dek {
  grid-column: 2;
  max-width: 34rem;
  margin: 1.35rem 0 0;
  font-size: 1.28rem;
  line-height: 1.35;
}

.actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.7rem;
}

.actio,
.explora {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.7rem 1.7rem 0.6rem;
  border: 1px solid var(--ink);
  border-radius: 999px 999px 999px 999px / 64px 64px 42px 42px;
  font-family: var(--face);
  font-style: italic;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
}

.actio {
  background: var(--ink);
  color: var(--paper);
}

.explora {
  background: transparent;
  color: var(--ink);
  gap: 0.65rem;
}

.explora svg {
  width: 1.35rem;
  height: 1.35rem;
}

.explora circle,
.explora path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
}

.actio:hover {
  background: #333;
}

.explora:hover {
  background: #e7e2d8;
}

.sculpture {
  margin: 0;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

.sculpture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 58%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 100%);
}

.library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 3vw;
  border-top: 1px solid var(--ink);
}

.study {
  padding: 1.15rem 1.35rem 1.7rem;
  border-right: 1px solid var(--ink);
}

.study:last-child {
  border-right: 0;
}

.study-draw {
  display: block;
  width: 100%;
  height: 12.5rem;
}

.study-draw .fill-ink {
  fill: var(--ink);
  stroke: none;
}

.study-draw .fill-paper {
  fill: var(--lift);
}

.study-draw .fill-shade {
  fill: #d9d4ca;
  stroke: var(--ink);
}

.study-draw .fill-mid {
  fill: var(--mid);
  stroke: none;
}

.study h2,
.principle h2,
.lock-copy h2 {
  margin: 0.85rem 0 0.45rem;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.study p,
.principle-copy p,
.lock-copy > p {
  margin: 0;
  max-width: 42ch;
  font-size: 1.12rem;
}

.principle {
  display: grid;
  grid-template-columns: minmax(16rem, 0.72fr) minmax(18rem, 1.15fr);
  gap: 1rem 2rem;
  align-items: center;
  width: min(96rem, calc(100% - 6vw));
  margin: 1rem auto 0;
  padding: 3.5rem 0 2rem;
  min-height: 78vh;
}

.fig {
  margin: 0;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(4.5rem, 8vw, 7.5rem);
  letter-spacing: -0.04em;
  line-height: 0.8;
}

.principle-copy p {
  margin-top: 0.9rem;
}

.studio {
  color: var(--ink);
}

.diagram {
  width: 100%;
  height: auto;
}

.diagram-nodes circle {
  fill: var(--ink);
  stroke: none;
}

.lockplate {
  display: grid;
  grid-template-columns: minmax(18rem, 1.05fr) minmax(16rem, 0.85fr);
  gap: 2rem 3rem;
  align-items: center;
  width: min(96rem, calc(100% - 6vw));
  margin: 0 auto 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--ink);
}

.lock-draw {
  width: 100%;
  height: auto;
}

.lock-draw .fill-paper {
  fill: var(--lift);
}

.lock-draw .fill-shade {
  fill: #d5d0c6;
}

.contact-form {
  margin-top: 1.5rem;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
  max-width: 40rem;
}

.field.wide {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 1.05rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  caret-color: var(--ink);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%231C1C1C' stroke-width='1.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 0.85rem;
  padding-right: 2rem;
}

.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea {
  border-width: 2px;
}

.error,
.status {
  min-height: 1.2em;
  margin: 0.3rem 0 0;
  font-size: 1.02rem;
}

.submit {
  margin-top: 1.15rem;
  font-size: 1.35rem;
}

.sheet-missing .hero-copy {
  grid-template-columns: minmax(0, 1fr);
}

.sheet-missing h1,
.sheet-missing .actions {
  grid-column: 1;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .sculpture {
    order: -1;
    height: 58vw;
    min-height: 16rem;
  }

  .sculpture img {
    position: absolute;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
    object-position: 70% 60%;
  }

  .hero-copy {
    grid-template-columns: 1fr;
    padding: 0.5rem 1.25rem 2rem;
  }

  .index {
    grid-row: auto;
    display: flex;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
  }

  .index li {
    margin: 0;
  }

  h1,
  .dek,
  .actions {
    grid-column: 1;
  }

  .library {
    grid-template-columns: 1fr;
    margin: 0 1.25rem;
  }

  .study {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .study:last-child {
    border-bottom: 0;
  }

  .principle,
  .lockplate {
    grid-template-columns: 1fr;
    width: calc(100% - 2.5rem);
    min-height: 0;
  }

  .diagram {
    order: -1;
  }

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

  .field.wide {
    grid-column: auto;
  }

  .topbar {
    padding-inline: 1.25rem;
  }
}

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

  .actio,
  .explora {
    transition: none;
  }
}
