:root {
  --background: #ffffff;
  --text: #231f20;
  --control-background: #ffffff;
  --control-border: #231f20;
  --page-width: 1000px;
  --content-width: 800px;
  --gutter: clamp(12px, 4vw, 64px);
}

:root.is-dark {
  --background: #050505;
  --text: #ffffff;
  --control-background: #050505;
  --control-border: #ffffff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Courier, "Courier New", "Nimbus Mono PS", monospace;
  font-synthesis: none;
  font-weight: 400;
}

button {
  font: inherit;
  font-weight: 400;
}

.site {
  min-height: 100vh;
  padding: clamp(18px, 5vw, 48px) 0 clamp(20px, 5vw, 56px);
}

.sequence {
  width: min(calc(100vw - (var(--gutter) * 2)), var(--page-width));
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.site-header {
  position: absolute;
  z-index: 2;
  top: 41%;
  right: 4%;
  width: 14.1%;
}

.site-brand {
  display: block;
  width: 100%;
  line-height: 0;
}

.site-brand-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: none;
}

.site-brand:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.product-sheet,
.price-sheet {
  width: min(100%, var(--content-width));
  justify-self: center;
}

.hero-frame {
  position: relative;
}

.hero-image,
.box-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.product-title,
.price-title {
  margin: 22px 0 18px;
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0;
}

.product-title {
  font-size: 36px;
  line-height: 1;
}

.intro-copy,
.example-copy,
.video-label,
.price-sheet,
.legal-footer {
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0;
}

.intro-copy {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.28;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
  hyphens: auto;
}

.example-copy {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.2;
}

.box-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.box-tile {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #ffffff;
  cursor: zoom-in;
}

.box-grid img {
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  background: #ffffff;
}

.box-tile:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.video-label {
  margin: 20px 0 -2px;
  text-align: center;
  font-size: 22px;
  line-height: 1;
}

.media-block {
  position: relative;
  width: min(100%, var(--content-width));
  margin: 0;
  aspect-ratio: var(--media-aspect, auto);
  justify-self: center;
}

.media {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: var(--media-aspect, auto);
  object-fit: contain;
  object-position: center;
  border: 0;
  background: #ffffff;
}

video.media {
  background: #f3f3f3;
}

.price-sheet {
  padding-top: 4px;
  text-align: center;
}

.price-title {
  margin: 0 0 24px;
  font-size: 22px;
  line-height: 1;
}

.price-box {
  border: 1px solid var(--text);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.4;
}

.price-table th,
.price-table td {
  padding: 2px 6px;
  font-weight: 400;
  white-space: nowrap;
  text-align: center;
}

.price-table thead th {
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--text);
}

.price-table th:nth-child(4),
.price-table td:nth-child(4) {
  border-left: 1px solid var(--text);
}

.price-table tbody tr:first-child td {
  padding-top: 8px;
}

.price-table tbody tr:last-child td {
  padding-bottom: 8px;
}

.frame-notes {
  border-top: 1px solid var(--text);
  padding: 7px 6px 8px;
  font-size: 14px;
  line-height: 1.25;
}

.frame-notes p,
.shipping-note,
.contact-block p,
.legal-footer p {
  margin: 0;
}

.shipping-note {
  margin-top: 7px;
  text-align: right;
  font-size: 12px;
  line-height: 1.2;
}

.contact-block {
  margin-top: 28px;
  font-size: 20px;
  line-height: 1.45;
}

.contact-email,
.footer-email {
  position: relative;
  color: inherit;
  text-decoration: none;
}

.contact-email::after,
.footer-email::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: opacity 120ms ease, transform 180ms ease;
}

.contact-email:hover::after,
.contact-email:focus-visible::after,
.footer-email:hover::after,
.footer-email:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.legal-footer {
  margin-top: 92px;
  font-size: 11px;
  line-height: 1.25;
}

.controls {
  position: fixed;
  z-index: 10;
  top: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  display: flex;
  gap: 8px;
  align-items: center;
}

.theme-switch {
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--control-background);
  color: var(--text);
  cursor: pointer;
}

.theme-switch {
  position: relative;
  width: 58px;
  height: 30px;
  padding: 3px;
  background: linear-gradient(90deg, #ffffff 0 50%, #050505 50% 100%);
}

.theme-switch::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid #ffffff;
  border-radius: 4px;
  background: #050505;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

:root.is-dark .theme-switch::before {
  transform: translateX(26px);
  border-color: #050505;
  background: #ffffff;
}

.theme-switch:focus-visible,
.contact-email:focus-visible,
.footer-email:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.image-zoom {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 48px);
  background: rgba(255, 255, 255, 0.84);
  opacity: 0;
  transition: opacity 180ms ease;
  cursor: zoom-out;
}

:root.is-dark .image-zoom {
  background: rgba(5, 5, 5, 0.76);
}

.image-zoom[hidden] {
  display: none;
}

.image-zoom.is-open {
  opacity: 1;
}

.image-zoom-media {
  display: block;
  width: auto;
  max-width: min(88vw, 920px);
  max-height: 82vh;
  background: #ffffff;
  opacity: 0;
  transform: scale(0.68);
  transition: transform 260ms ease, opacity 160ms ease;
}

.image-zoom.is-open .image-zoom-media {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 540px) {
  :root {
    --gutter: 10px;
  }

  .site {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .sequence {
    gap: 18px;
  }

  .product-title {
    margin-top: 18px;
    margin-bottom: 14px;
    font-size: 25px;
  }

  .intro-copy {
    margin-bottom: 20px;
    font-size: 12px;
  }

  .example-copy {
    font-size: 11px;
  }

  .box-grid {
    gap: 7px;
  }

  .video-label {
    margin-top: 16px;
    font-size: 16px;
  }

  .price-title {
    margin-bottom: 18px;
    font-size: 16px;
  }

  .price-table {
    font-size: 9px;
  }

  .price-table th,
  .price-table td {
    padding-left: 2px;
    padding-right: 2px;
  }

  .frame-notes {
    font-size: 10px;
  }

  .shipping-note {
    font-size: 9px;
  }

  .contact-block {
    margin-top: 22px;
    font-size: 15px;
  }

  .legal-footer {
    margin-top: 64px;
    font-size: 7px;
  }

  .controls {
    right: 10px;
  }

  .theme-switch {
    width: 54px;
    height: 28px;
  }

  .theme-switch::before {
    width: 20px;
    height: 20px;
  }

  :root.is-dark .theme-switch::before {
    transform: translateX(24px);
  }

}

@media (prefers-reduced-motion: reduce) {
  .contact-email::after,
  .footer-email::after,
  .image-zoom,
  .image-zoom-media {
    transition: none;
  }
}
