:root {
  color-scheme: light;
  --paper: #eeebe3;
  --paper-deep: #e4e0d7;
  --ink: #15130f;
  --muted: #6e675c;
  --line: #bbb3a5;
  --line-soft: rgba(114, 104, 88, 0.24);
  --cobalt: #0047ff;
  --warn: #9b2f1f;
  --plaster: #f7f4ed;
  --display: Didot, "Bodoni 72", "Bodoni 72 Smallcaps", "Baskerville Display PT", "Times New Roman", serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --humanist: Avenir, "Gill Sans", "Trebuchet MS", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 96px 96px;
  color: var(--ink);
  font-family: var(--humanist);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--cobalt);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.site-shell {
  width: min(1560px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-link,
.skip-link {
  color: var(--ink);
  text-decoration: none;
}

.home-link:hover,
.skip-link:hover {
  color: var(--cobalt);
}

.topbar-rule {
  height: 1px;
  background: var(--line);
}

.topbar-label {
  color: var(--cobalt);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 0;
  min-height: min(88svh, 900px);
  border-bottom: 1px solid var(--line);
}

.hero-copy,
.hero-object {
  min-width: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 56px 64px 0;
}

.kicker,
.meter-label,
.fact-number,
.feature-rows span,
.input-label,
.control-block label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 26px;
  color: var(--cobalt);
}

.hero-title {
  max-width: 980px;
  margin: 0;
  color: var(--cobalt);
  font-family: var(--display);
  font-size: 10.4rem;
  font-weight: 500;
  line-height: 0.78;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.hero-title span {
  display: block;
}

.hero-lead {
  max-width: 700px;
  margin: 34px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.38rem;
  line-height: 1.32;
}

.hero-object {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 40px 0 40px 44px;
  border-left: 1px solid var(--line);
}

.plaster-figure {
  display: block;
  width: 100%;
  height: min(64svh, 620px);
  min-height: 480px;
  object-fit: contain;
}

.hero-object figcaption {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-object figcaption span {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.hero-object figcaption span:last-child {
  border-right: 0;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  margin: 24px 0 0;
}

.cell {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  border: 1px solid var(--line);
  background: rgba(238, 235, 227, 0.86);
  padding: 28px;
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.tall {
  min-height: 650px;
}

.cell-heading h2,
.fact-cell h3,
.faq-title-cell h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0;
}

.cell-heading h2,
.faq-title-cell h2 {
  color: var(--cobalt);
  font-size: 3.2rem;
  line-height: 0.94;
}

.fact-cell h3 {
  margin-top: 48px;
  color: var(--cobalt);
  font-size: 1.7rem;
  line-height: 1.02;
}

.cell-copy,
.fact-cell p,
.feature-rows p,
.faq-cell p,
.ritual-list p,
.control-note {
  color: var(--muted);
  font-family: var(--serif);
  line-height: 1.45;
}

.cell-copy {
  max-width: 680px;
  margin: 24px 0 24px;
  font-size: 1.16rem;
}

.input-cell {
  display: flex;
  flex-direction: column;
}

.input-label,
.control-block label {
  display: block;
  margin: 0 0 10px;
  color: var(--ink);
}

textarea {
  flex: 1;
  width: 100%;
  min-height: 310px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 18px 20px;
  background: rgba(247, 244, 237, 0.72);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.58;
  outline: none;
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0;
  border: 1px solid var(--line);
  border-top: 0;
}

button {
  min-height: 58px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: rgba(247, 244, 237, 0.55);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

button:last-child {
  border-right: 0;
}

button:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.primary-action {
  background: var(--cobalt);
  color: #fff;
}

.primary-action:hover:not(:disabled) {
  background: var(--cobalt);
}

.status {
  display: block;
  min-height: 30px;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.status[data-kind="warn"],
.status[data-kind="error"] {
  color: var(--warn);
}

.control-cell {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.control-block {
  display: block;
}

select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 14px;
  background: rgba(247, 244, 237, 0.72);
  color: var(--ink);
  outline: none;
}

.control-note {
  min-height: 60px;
  margin: 14px 0 0;
  font-size: 1rem;
}

.meter-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}

.meter-strip > div {
  min-width: 0;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: rgba(247, 244, 237, 0.48);
}

.meter-strip > div:last-child {
  border-right: 0;
}

.meter-value,
.meter-label {
  display: block;
}

.meter-value {
  color: var(--cobalt);
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 0.9;
}

.meter-label {
  margin-top: 8px;
  color: var(--muted);
}

.sliders {
  display: grid;
  gap: 18px;
  margin-top: auto;
}

.sliders label {
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sliders label > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cobalt);
}

.fact-number {
  color: var(--muted);
}

.fact-cell {
  min-height: 280px;
}

.fact-cell p {
  margin: 18px 0 0;
}

.image-panel {
  padding: 0;
  overflow: hidden;
}

.wave-relief {
  display: block;
  width: 100%;
  min-height: 300px;
  object-fit: cover;
  background: var(--paper-deep);
}

.ordered-cell,
.feature-cell,
.faq-title-cell,
.faq-cell {
  min-height: 410px;
}

.ritual-list {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.ritual-list li {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}

.ritual-list span {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  color: var(--cobalt);
  font-family: var(--display);
  font-size: 2.5rem;
}

.ritual-list p {
  align-self: center;
  margin: 0;
  padding: 16px 20px;
  font-size: 1.02rem;
}

.feature-rows {
  display: grid;
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.feature-rows div {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.feature-rows span {
  color: var(--cobalt);
}

.feature-rows p {
  margin: 0;
  font-size: 1.05rem;
}

.faq-title-cell h2 {
  margin-top: 34px;
}

.faq-cell {
  padding: 0;
}

details {
  border-bottom: 1px solid var(--line);
}

details:last-child {
  border-bottom: 0;
}

summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 94px;
  padding: 24px 28px;
  color: var(--cobalt);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.42rem;
  line-height: 1.12;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.1rem;
}

details[open] summary::after {
  content: "-";
}

.faq-cell p {
  max-width: 760px;
  margin: 0;
  padding: 0 28px 30px;
  font-size: 1rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 36px 0 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .site-shell {
    width: min(100% - 28px, 980px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    padding: 58px 0 38px;
  }

  .hero-title {
    font-size: 7.4rem;
  }

  .hero-object {
    padding: 26px 0 30px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .plaster-figure {
    height: 440px;
    min-height: 0;
  }

  .span-8,
  .span-7,
  .span-5,
  .span-4,
  .span-3 {
    grid-column: span 6;
  }

  .input-cell,
  .control-cell,
  .faq-cell,
  .faq-title-cell,
  .image-panel {
    grid-column: span 12;
  }
}

@media (max-width: 760px) {
  body {
    background-size: 68px 68px;
  }

  .site-shell {
    width: calc(100vw - 20px);
    overflow-x: clip;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
  }

  .topbar-rule {
    display: none;
  }

  .hero-copy {
    padding: 36px 0 24px;
  }

  .hero-title {
    font-size: 3.25rem;
  }

  .hero-lead {
    font-size: 1.12rem;
    max-width: min(320px, calc(100vw - 56px));
    overflow-wrap: break-word;
  }

  .plaster-figure {
    width: min(100%, 300px);
    height: 180px;
    margin: 0 auto;
  }

  .cell-copy,
  .fact-cell p,
  .feature-rows p,
  .faq-cell p,
  .ritual-list p,
  .control-note {
    max-width: min(100%, 320px);
    overflow-wrap: break-word;
  }

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

  .hero-object figcaption {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-self: center;
    width: calc(100vw - 20px);
    max-width: 100%;
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }

  .hero-object figcaption span {
    padding-inline: 8px;
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .span-12,
  .span-8,
  .span-7,
  .span-5,
  .span-4,
  .span-3 {
    grid-column: 1;
  }

  .cell {
    padding: 22px;
  }

  .tall {
    min-height: auto;
  }

  .cell-heading h2,
  .faq-title-cell h2 {
    font-size: 2.35rem;
  }

  textarea {
    min-height: 300px;
  }

  .action-row,
  .meter-strip,
  .feature-rows div {
    grid-template-columns: 1fr;
  }

  button,
  .meter-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  button:last-child,
  .meter-strip > div:last-child {
    border-bottom: 0;
  }

  .feature-rows div {
    gap: 10px;
  }

  .ritual-list li {
    grid-template-columns: 58px 1fr;
  }

  .ritual-list span {
    font-size: 1.8rem;
  }

  summary {
    min-height: 82px;
    padding: 20px 22px;
    font-size: 1.18rem;
  }

  .faq-cell p {
    padding: 0 22px 24px;
  }

  .site-footer {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 2.75rem;
  }

  .cell {
    padding: 18px;
  }

  .meter-value {
    font-size: 2rem;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 2.35rem;
  }
}
