@import url("./assets/fonts.css");

@font-face {
  font-family: 'Archivo Black';
  src: url('./assets/archivo-black-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #171410;
  --yellow: #ffd600;
  --paper: #f6f2e5;
  --blue: #203bde;
  --line: #d5d3c6;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Barlow", Arial, sans-serif;
  color-scheme: light;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  line-height: 1.45;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
input, select, textarea, button { min-width: 0; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #4664ff; outline-offset: 4px; }
button:focus-visible { outline-color: var(--ink); }
h1, h2, h3, p { margin: 0; }
section[id] { scroll-margin-top: 14px; }
.shell { width: min(100% - 48px, 1176px); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 10px 16px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }

.shop-header {
  color: var(--yellow);
  background: var(--ink);
  border-bottom: 4px solid var(--blue);
}
.shop-header__inner, .shop-footer .shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  min-height: 68px;
}
.shop-header__inner { width: min(100% - 2rem, 73rem); }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  width: max-content;
  font: 1.2rem/.83 'Archivo Black', Impact, 'Arial Black', sans-serif;
  letter-spacing: -.035em;
  text-decoration: none;
  text-transform: uppercase;
}
.window-mark {
  background: currentColor;
  border: 2px solid currentColor;
  box-shadow: 0 0 0 2px var(--ink) inset;
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}
.window-mark::before, .window-mark::after {
  position: absolute;
  content: "";
  background: var(--ink);
}
.window-mark::before { inset: 0 45%; }
.window-mark::after { inset: 45% 0; }
.shop-header nav { display: flex; align-items: center; gap: clamp(.7rem, 4vw, 2rem); }
.shop-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  font: 800 .83rem Arial, sans-serif;
  text-decoration-thickness: 2px;
}
.shop-header nav a:hover { text-decoration: underline; }

.finder {
  background: var(--yellow);
  border-bottom: 2px solid var(--ink);
  padding-block: clamp(32px, 5.8vw, 88px);
}
.finder__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: clamp(32px, 7vw, 100px);
  align-items: center;
}
.eyebrow {
  margin-bottom: 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .105em;
  line-height: 1.2;
  text-transform: uppercase;
}
.finder__label { color: #172b9d; }
h1, h2, h3 { font-family: var(--display); line-height: .98; }
.finder h1 {
  font-size: clamp(72px, 8.7vw, 125px);
  font-weight: 900;
  letter-spacing: -.016em;
}
.finder__description { margin-top: 13px; font-size: clamp(16px, 2vw, 21px); font-weight: 600; }
.mini-window { display: none; }
.finder-form {
  margin-top: 23px;
  padding: clamp(16px, 2.2vw, 27px);
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.units { border: 0; margin: 0 0 14px; padding: 0; }
.units legend, .finder-form label, .request-form label {
  display: block;
  font-size: .9rem;
  font-weight: 700;
}
.units legend { float: left; margin-right: 12px; padding: 7px 0; }
.units__options { display: flex; width: max-content; max-width: 100%; border: 1px solid var(--ink); }
.units__options label { display: inline-grid; cursor: pointer; }
.units__options label + label { border-left: 1px solid var(--ink); }
.units__options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.units__options span { display: block; min-height: 34px; padding: 6px 10px; line-height: 1.42; }
.units__options input:checked + span { background: var(--ink); color: var(--paper); }
.units__options input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; z-index: 1; }
.finder-form__measurements, .finder-form__action {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.finder-form__action { margin-top: 12px; align-items: end; }
.finder-form input:not([type=radio]), .finder-form select,
.request-form input:not([type=hidden]), .request-form select, .request-form textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  font-weight: 500;
}
.finder-form input[aria-invalid=true], .request-form input[aria-invalid=true] { border: 2px solid #a42513; }
.unit-copy, .request-form small { font-size: .9em; font-weight: 500; color: #535449; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 9px 13px;
  border: 1px solid var(--blue);
  border-radius: 0;
  background: var(--blue);
  color: white;
  font-family: var(--display);
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.button:hover { background: #132bb9; }
.button span { font-family: Arial, sans-serif; font-size: 1rem; }
.button:disabled { opacity: .7; cursor: wait; }
.form-error { margin-top: 8px; color: #9c2111; font-size: .95rem; font-weight: 700; }

.measure-card {
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--blue);
  color: white;
  box-shadow: 7px 7px 0 var(--ink);
}
.measure-card__header {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #8290ff;
  font-family: var(--display);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.measure-card__diagram {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.48;
  min-height: 220px;
  padding: 24px;
  isolation: isolate;
  background-image: linear-gradient(90deg, #ffffff20 1px, transparent 1px), linear-gradient(#ffffff20 1px, transparent 1px);
  background-size: 24px 24px;
}
.diagram-window {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 64%;
  height: 72%;
  margin: 8% 0 0 4%;
  padding: 9px;
  border: 1px solid white;
  background: #203bde;
  box-shadow: 0 0 0 3px #203bde, 0 0 0 4px white;
}
.diagram-window span {
  border: 1px solid white;
  background:
    linear-gradient(145deg, transparent 28%, #ffffffbb 28.5%, transparent 29%, transparent 35%, #ffffff80 35.5%, transparent 36%),
    linear-gradient(180deg, #7182ff, #2b43de 80%);
}
.diagram-window span + span { margin-left: 5px; }
.diagram-width, .diagram-height {
  position: absolute;
  color: white;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.diagram-width {
  left: 22%;
  right: 19%;
  top: 9%;
  text-align: center;
  border-bottom: 1px solid white;
}
.diagram-height {
  left: 11%;
  top: 24%;
  bottom: 13%;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  border-left: 1px solid white;
}
.diagram-width::before, .diagram-width::after, .diagram-height::before, .diagram-height::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-top: 1px solid white;
  border-left: 1px solid white;
}
.diagram-width::before { left: 0; bottom: -3px; transform: rotate(-45deg); }
.diagram-width::after { right: 0; bottom: -3px; transform: rotate(135deg); }
.diagram-height::before { left: -3px; top: 0; transform: rotate(45deg); }
.diagram-height::after { left: -3px; bottom: 0; transform: rotate(-135deg); }
.measure-card figcaption {
  border-top: 1px solid #8290ff;
  padding: 13px 16px 15px;
  font-size: .94rem;
  line-height: 1.25;
}

.board { padding-block: 54px; }
.board__heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin-bottom: 20px;
}
.board h1, .board h2, .size-request h1, .size-request h2 {
  font-size: clamp(45px, 5.5vw, 72px);
  letter-spacing: -.018em;
  font-weight: 800;
}
.board__heading a { color: var(--blue); font-weight: 700; padding: 8px 0; }
.board__rule {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--ink);
  padding: 9px 14px;
  color: var(--yellow);
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.search-status { margin-top: 12px; font-weight: 700; color: #2b3181; }
.board__loading { padding: 20px 0; }
.board__empty {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 20px 14px;
  gap: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.board__empty p { max-width: 60ch; }
.board__empty a, .stock-row__action { color: var(--blue); font-weight: 700; }
.stock-group h3 { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 1.65rem; }
.stock-row {
  display: grid;
  grid-template-columns: 76px 1fr minmax(112px, auto) auto;
  align-items: center;
  gap: 10px 21px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.stock-row img, .stock-row__photo-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 67px;
  object-fit: contain;
  background: #eeece2;
}
.stock-row__photo-empty { padding: 4px; font-size: .64rem; line-height: 1.15; text-align: center; }
.stock-row__size, .stock-row__price { display: block; font-family: var(--display); font-size: 1.74rem; line-height: 1.1; }
.stock-row__price { font-weight: 800; }
.stock-row p, .stock-row small { font-size: .88rem; line-height: 1.28; }
.stock-row__action { justify-self: end; padding-block: 9px; }
.sister { padding-top: 18px; font-size: .94rem; }
.sister a { color: var(--blue); font-weight: 700; }
.board__guide { margin-top: 1.1rem; }
.board__guide a { color: var(--blue); font-weight: 700; }
[data-window-page='stock'] .finder,
[data-window-page='request'] .finder,
[data-window-page='request'] .board { display: none; }
[data-window-page='request'] .size-request { border-top: 0; }

.size-request {
  border-top: 2px solid var(--ink);
  padding-block: clamp(40px, 6vw, 76px);
  background: #e9edff;
}
.size-request__grid {
  display: grid;
  grid-template-columns: minmax(220px, .78fr) minmax(0, 1.22fr);
  gap: clamp(24px, 5vw, 82px);
  align-items: start;
}
.size-request__intro p:not(.eyebrow) { margin-top: 14px; max-width: 39ch; }
.size-request__intro dl { margin-top: 22px; }
.size-request__intro dt { font-weight: 700; }
.size-request__intro dd { margin: 2px 0 12px; font-size: .94rem; }
.request-form {
  padding: clamp(15px, 3vw, 27px);
  border: 1px solid var(--ink);
  background: var(--paper);
  display: grid;
  gap: 14px;
}
.request-form__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.request-form__row--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#service-price { grid-column: 1 / -1; font-size: .92rem; color: #2b3181; }
.request-selection { padding: 10px 12px; border: 1px solid var(--blue); font-weight: 700; }
.request-form textarea { resize: vertical; }
.request-form button { justify-self: start; min-width: 185px; }
.photo-field span { font-size: .85rem; }
.request-confirmation { border: 1px solid var(--ink); background: var(--paper); padding: 24px; }
.request-confirmation h3 { margin-bottom: 8px; font-size: 2rem; }
.shop-footer { background: var(--ink); color: var(--yellow); }
.shop-footer .shell { min-height: 91px; }
.shop-footer p { font-size: .92rem; flex: 1; }
.shop-footer .shell > a:last-child { font-size: .94rem; font-weight: 700; }

@media (max-width: 780px) {
  .shell { width: min(100% - 36px, 620px); }
  .shop-header__inner { width: calc(100% - 2rem); min-height: 59px; }
  .finder__layout { grid-template-columns: 1fr; }
  .finder { padding-block: 29px 32px; }
  .finder__intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
  .finder h1 { font-size: clamp(60px, 13.3vw, 100px); }
  .mini-window {
    display: grid;
    place-items: center;
    width: clamp(48px, 14vw, 80px);
    aspect-ratio: 1;
    margin-right: 3px;
    border: 1px solid var(--ink);
    background: var(--blue);
    box-shadow: 3px 3px var(--ink);
  }
  .mini-window span {
    position: relative;
    width: 64%;
    height: 61%;
    border: 1px solid white;
    box-shadow: 0 0 0 2px var(--blue), 0 0 0 3px white;
    background: linear-gradient(145deg, transparent 29%, #ffffffc0 30%, transparent 32%, transparent 42%, #ffffffb0 43%, transparent 45%);
  }
  .mini-window span::before { position: absolute; content: ""; inset: 0 49%; background: white; }
  .measure-card { display: none; }
  .board { padding-block: 36px; }
  .size-request__grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .finder h1 { font-size: clamp(49px, 14.4vw, 68px); }
  .finder-form { margin-top: 18px; }
  .finder__description { margin-top: 10px; line-height: 1.25; }
  .units__options span { min-height: 44px; padding-block: 11px; }
  .units legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .finder-form__action { gap: 8px; }
  .board__heading { gap: 5px 14px; margin-bottom: 12px; }
  .board__heading a { padding: 5px 0; }
  .board__rule { padding-inline: 10px; }
  .board__empty { padding-inline: 10px; }
  .stock-row { grid-template-columns: 56px 1fr auto; gap: 8px 10px; padding-inline: 8px; }
  .stock-row img, .stock-row__photo-empty { height: 55px; }
  .stock-row__size, .stock-row__price { font-size: 1.38rem; }
  .stock-row__action { grid-column: 2 / -1; justify-self: start; padding: 5px 0 3px; }
  .request-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-form__row:not(.request-form__row--two) label:last-child { grid-column: 1 / -1; }
  .request-form__row--two { grid-template-columns: 1fr; }
  .shop-footer .shell { flex-wrap: wrap; gap: 10px 16px; padding-block: 15px; }
  .shop-footer p { flex-basis: 100%; order: 1; }
}

@media (max-width: 365px) {
  .shop-header__inner { width: calc(100% - 1.25rem); gap: .45rem; }
  .shop-header .wordmark { font-size: 1.04rem; }
  .shop-header nav { gap: .65rem; }
  .shop-header nav a { font-size: .76rem; }
}

@media (max-width: 360px) {
  .finder__intro { grid-template-columns: 1fr; }
  .mini-window { display: none; }
}
