@font-face {
  font-family: "Reedrift Variable";
  src: url("../fonts/Reedrift-VF.ttf?ver=0.18.17") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.reedrift-detail {
  --reedrift-accent: #111;
  --reedrift-accent-soft: rgba(17, 17, 17, .12);
  --reedrift-accent-faint: #f7f7f7;
  --reedrift-accent-contrast: #fff;
  padding: var(--header-h) 0 var(--footer-h);
  background: #fff;
  color: var(--ink);
}

.reedrift-detail [data-reedrift-level] {
  font-family: "Reedrift Variable", Arial, sans-serif;
  font-synthesis: none;
}

.reedrift-detail [data-reedrift-level="1"] { font-variation-settings: "WIND" 0; }
.reedrift-detail [data-reedrift-level="2"] { font-variation-settings: "WIND" 50; }
.reedrift-detail [data-reedrift-level="3"] { font-variation-settings: "WIND" 100; }

.reedrift-detail .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reedrift-project-header {
  margin-bottom: 0 !important;
  background: #fff;
}

.reedrift-screen {
  min-height: calc(100svh - var(--header-h));
  border-bottom: 1px solid var(--line);
}

.reedrift-banner-screen {
  min-height: 0;
  padding: 0 12px 12px;
  border-bottom: 0;
}

.reedrift-banner-screen .reedrift-image-card {
  width: 100%;
  aspect-ratio: 1863 / 899;
}

.reedrift-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 12px 12px;
}

.reedrift-gallery .reedrift-image-card { aspect-ratio: 1389 / 899; min-width: 0; }

.reedrift-image-card {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
}

.reedrift-image-card__image,
.reedrift-image-card__video,
.reedrift-image-card__preview {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.reedrift-banner-screen .reedrift-image-card__image,
.reedrift-gallery .reedrift-image-card__image {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: contain;
}

.reedrift-image-card__preview {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  filter: blur(18px);
  transform: none;
  transition: opacity 360ms ease;
  animation: reedrift-preview-failsafe 4.5s ease forwards;
}

.reedrift-card-media-is-loaded .reedrift-image-card__preview {
  opacity: 0;
  animation: none;
}

@keyframes reedrift-preview-failsafe {
  0%, 72% { opacity: 1; }
  100% { opacity: 0; }
}

.reedrift-image-card__video {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  background: transparent;
  transition: opacity 360ms ease;
}

.reedrift-image-card--video .reedrift-media-is-loaded {
  opacity: 1;
}

.reedrift-image-card--video.reedrift-video-is-playing .reedrift-image-card__video {
  opacity: 1;
}

.reedrift-media-loading {
  opacity: 0;
  filter: none;
  transform: none;
  transition: opacity 420ms ease;
  animation: reedrift-media-failsafe 1.2s ease forwards;
}

.reedrift-media-is-loaded {
  opacity: 1;
  filter: none;
  transform: scale(1);
  animation: none;
}

@keyframes reedrift-media-failsafe {
  0%, 30% { opacity: 0; }
  100% {
    opacity: 1;
  }
}

.reedrift-media-placeholder {
  position: absolute;
  inset: 0;
  min-height: 0;
  background:
    linear-gradient(135deg, transparent 49.9%, rgba(17,17,17,.12) 50%, transparent 50.1%),
    linear-gradient(45deg, transparent 49.9%, rgba(17,17,17,.12) 50%, transparent 50.1%),
    var(--mist);
}

.reedrift-tester-screen {
  min-height: calc(100svh - var(--header-h) - var(--footer-h));
  padding-bottom: 0;
  border-bottom: 0;
  background: #fff;
}

.reedrift-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  padding: 16px var(--page-pad);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.reedrift-level-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.reedrift-level-control legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.reedrift-level-control label { position: relative; min-width: 0; cursor: pointer; }
.reedrift-level-control input { position: absolute; opacity: 0; }

.reedrift-level-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reedrift-level-control input:checked + span { background: var(--reedrift-accent); color: var(--reedrift-accent-contrast); }
.reedrift-level-control input:focus-visible + span { outline: 2px solid var(--reedrift-accent); outline-offset: 2px; }

.reedrift-size-control {
  display: grid;
  grid-template-columns: max-content minmax(120px, 260px);
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
  font-size: 12px;
  font-weight: 700;
}

.reedrift-size-control output { white-space: nowrap; }
.reedrift-size-control input { width: 100%; accent-color: var(--reedrift-accent); cursor: ew-resize; }

.reedrift-size-row {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}

.reedrift-reset {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.reedrift-tester-field {
  height: 72svh;
  min-height: 0;
  max-height: 72svh;
  margin: 12px 12px 0;
  overflow: hidden;
  border: 1px solid var(--reedrift-accent);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px var(--reedrift-accent-soft);
  transition: border-color 260ms ease, box-shadow 260ms ease;
}

.reedrift-tester-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  margin: 0;
  padding: clamp(30px, 4vw, 64px);
  resize: none;
  overflow: auto;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #111;
  caret-color: #111;
  font-size: 100px;
  font-weight: 400;
  letter-spacing: normal;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  line-height: 1.4;
}

.reedrift-detail[data-reedrift-font-loading] .reedrift-tester-canvas {
  color: transparent;
  caret-color: transparent;
}

.reedrift-tester-canvas:focus-visible { box-shadow: inset 0 0 0 2px #111; }

@media (max-width: 900px) {
  .reedrift-detail { padding: var(--header-h) 0 var(--footer-h); }
  .reedrift-banner-screen { padding: 0 8px 8px; }
  .reedrift-image-grid { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0 8px 8px; }
  .reedrift-gallery .reedrift-image-card {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 1389 / 899;
    align-self: start;
  }
  .reedrift-gallery .reedrift-image-card__image,
  .reedrift-gallery .reedrift-image-card__preview { width: 100%; max-width: 100%; height: 100%; object-fit: contain; }
  .reedrift-tester-screen { min-height: 0; }
  .reedrift-controls { grid-template-columns: 1fr; gap: 14px; }
  .reedrift-size-control { grid-template-columns: max-content minmax(0, 1fr); gap: 6px; }
  .reedrift-size-control { flex: 1 1 auto; }
  .reedrift-size-row { grid-column: 1; justify-content: stretch; }
  .reedrift-reset { justify-self: end; }
  .reedrift-tester-field {
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 1280 / 1102;
  }
  .reedrift-tester-canvas { height: 100%; min-height: 0; max-height: 100%; font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .reedrift-detail * { scroll-behavior: auto !important; }
  .reedrift-media-loading { animation: none; opacity: 1; filter: none; transform: none; transition: none; }
  .reedrift-image-card__preview { opacity: 0; filter: none; transform: none; transition: none; }
}
