@font-face {
  font-family: Gallery;
  src: url("assets/gallery-heading.woff") format("woff");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: only light;
  --paper: #fbf7ed;
  --ink: #19233b;
  --cobalt: #2d49d4;
  --cobalt-dark: #233ac2;
  --muted: #555d6d;
  --line: #ded8cb;
  --gutter: clamp(18px, 4vw, 64px);
  --shell: 1320px;
  --radius: 16px;
  --display: Gallery, "Arial Black", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 21px; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
img { display: block; width: 100%; height: auto; }
:focus-visible { outline: 3px solid #576dff; outline-offset: 4px; }

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  background: white;
}

.shell { width: min(var(--shell), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.display {
  font: 800 clamp(2.15rem, 5vw, 4.65rem)/.99 var(--display);
  letter-spacing: -.075em;
}

.site-header { border-bottom: 1px solid var(--line); }
.header-layout {
  display: grid;
  min-height: 75px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.wordmark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  font: 800 1.46rem/1 var(--display);
  letter-spacing: -.05em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark img { width: 30px; height: 30px; }
.navigation, .footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 3.2vw, 46px);
}
.navigation a, .footer-nav a {
  padding-block: 8px;
  font-size: .94rem;
  font-weight: 700;
  text-decoration: none;
}
.navigation a:hover, .footer-nav a:hover, .quiet-link:hover, .work-title:hover { color: var(--cobalt); }
.saved-nav {
  display: inline-flex;
  min-height: 43px;
  justify-self: end;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: .94rem;
  font-weight: 700;
}
.saved-nav:hover, .saved-nav[aria-pressed="true"] { border-color: var(--cobalt); color: var(--cobalt); }
.saved-count {
  min-width: 22px;
  padding-inline: 5px;
  border-radius: 5px;
  background: var(--cobalt);
  color: white;
  font-size: .8rem;
  text-align: center;
}

.icon-bookmark {
  position: relative;
  display: inline-block;
  flex: none;
  width: 14px;
  height: 18px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%);
}
.icon-bookmark::after {
  position: absolute;
  inset: 2px 2px 4px;
  background: var(--icon-cutout, var(--paper));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%);
  content: "";
}
[aria-pressed="true"] > .icon-bookmark::after { display: none; }
.icon-search {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  margin: -4px 3px 0 0;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.icon-search::after {
  position: absolute;
  right: -6px;
  bottom: -3px;
  width: 8px;
  height: 2px;
  transform: rotate(45deg);
  transform-origin: center;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr);
  margin-top: clamp(20px, 3.2vw, 42px);
  border-radius: var(--radius);
  background: var(--cobalt);
  color: white;
}
.hero-copy {
  align-self: center;
  padding: clamp(28px, 3.8vw, 56px) clamp(28px, 4.6vw, 72px);
}
.hero .display {
  font-size: clamp(3.02rem, 6.6vw, 6.65rem);
  line-height: .87;
}
.hero .display span { display: block; }
.hero-copy p {
  margin-block: clamp(17px, 2.25vw, 33px) clamp(20px, 2.5vw, 35px);
  color: #f2f3ff;
  font-size: clamp(1.04rem, 1.6vw, 1.39rem);
  line-height: 1.35;
}
.search {
  display: flex;
  width: min(100%, 405px);
  min-height: 56px;
  padding: 5px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.search:focus-within { outline: 2px solid white; outline-offset: 4px; }
.search input {
  flex: 1;
  min-width: 0;
  padding: 6px 9px 6px 11px;
  border: none;
  border-radius: 5px;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search button {
  display: grid;
  width: 45px;
  flex: none;
  place-items: center;
  border: none;
  border-radius: 6px;
  background: var(--ink);
  color: white;
}
.search button:hover { background: var(--cobalt-dark); }
.search button:focus-visible { outline-offset: 1px; }
.hero-art {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #e3d8c8;
  text-align: left;
}
.hero-art picture {
  display: block;
  height: 100%;
  min-height: clamp(335px, 33vw, 475px);
}
.hero-art img {
  position: absolute;
  height: 100%;
  object-fit: cover;
  object-position: center 47%;
}
.hero-caption {
  position: absolute;
  right: clamp(13px, 2.1vw, 28px);
  bottom: clamp(13px, 2.1vw, 28px);
  left: clamp(13px, 2.1vw, 28px);
  display: flex;
  width: fit-content;
  max-width: calc(100% - 26px);
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
  padding: 10px 11px 10px 15px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.hero-caption strong, .hero-caption small { display: block; }
.hero-caption strong { font-size: 1rem; line-height: 1.25; }
.hero-caption small { margin-top: 1px; color: var(--muted); font-size: .8rem; }
.hero-card-open {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border-radius: 6px;
  background: #e5e9ff;
  color: var(--cobalt);
  font-size: 1.36rem;
  line-height: 1;
}
.hero-art:hover .hero-card-open { background: var(--cobalt); color: white; }

.collection { padding-block: clamp(34px, 4vw, 56px) clamp(47px, 6vw, 86px); }
.section-head, .catalog-controls, .comparison-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.section-head { margin-bottom: 21px; }
.quiet-link { font-weight: 700; text-underline-offset: .25em; }
.section-head .quiet-link { font-size: .94rem; }
.catalog-controls { align-items: center; margin-bottom: clamp(16px, 2vw, 25px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter, .glow-modes button, .dialog-light button {
  min-height: 43px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  font-size: .94rem;
  font-weight: 700;
}
.filter:hover, .dialog-light button:hover { border-color: var(--cobalt); color: var(--cobalt); }
.filter[aria-pressed="true"], .dialog-light button[aria-pressed="true"] {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: white;
}
.catalog-count { flex: none; margin-left: auto; color: var(--muted); font-size: .875rem; }
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.work { min-width: 0; }
.work-media { position: relative; }
.work-image {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #e3d8c8;
  text-align: left;
}
.work-image img {
  aspect-ratio: 1.39;
  object-fit: cover;
  transition: transform .24s ease;
}
.work-image:hover img { transform: scale(1.035); }
.image-note {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #19233be8;
  color: white;
  font-size: .8rem;
}
.save-work, .dialog-close button {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 9px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #19233b15;
  border-radius: 8px;
  background: var(--paper);
}
.save-work:hover, .save-work[aria-pressed="true"] { color: var(--cobalt); }
.work h3 { margin-top: 12px; }
.work-title {
  padding: 0;
  border: 0;
  background: transparent;
  font: 800 clamp(1.05rem, 2vw, 1.55rem)/1.15 var(--display);
  letter-spacing: -.04em;
  text-align: left;
}
.work p { margin-top: 4px; color: var(--muted); font-size: .92rem; }
.empty { padding-block: 30px; border-top: 1px solid var(--line); }
.empty p { margin-bottom: 14px; }

.button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 700;
  text-decoration: none;
}
.button-primary { --icon-cutout: var(--cobalt); background: var(--cobalt); color: white; }
.button-primary:hover { --icon-cutout: var(--cobalt-dark); background: var(--cobalt-dark); }
.button-outline { border-color: var(--line); background: transparent; }
.button-outline:hover { border-color: var(--cobalt); color: var(--cobalt); }

.glow {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}
.glow-copy { align-self: center; padding: clamp(22px, 4.5vw, 58px); }
.glow-copy .display { color: #d7ed9f; }
.glow-copy p { max-width: 32ch; margin-top: 19px; line-height: 1.45; }
.glow-copy .glow-instruction { margin-top: 10px; color: #cfd4e0; font-size: .9rem; }
.glow-modes { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.glow-modes button { border-color: #687087; }
.glow-modes button:hover, .glow-modes button[aria-pressed="true"] {
  border-color: #d7ed9f;
  background: #d7ed9f;
  color: var(--ink);
}
.comparison { min-width: 0; padding: 12px 12px 9px 0; }
.comparison-image {
  --day-share: 50%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.52;
  border-radius: 9px;
  background: #0e1524;
}
.comparison-image img { position: absolute; height: 100%; object-fit: cover; }
.comparison-day { clip-path: inset(0 calc(100% - var(--day-share)) 0 0); }
.comparison-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--day-share);
  display: grid;
  width: 2px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  background: white;
  color: var(--ink);
}
.comparison-divider span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: white;
  font-size: 1.22rem;
}
.comparison-image[data-edge] .comparison-divider { visibility: hidden; }
.comparison-image input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
}
.comparison-image:focus-within { outline: 3px solid white; outline-offset: 3px; }
.comparison-caption { padding: 7px 3px 0; color: #e0e2e8; font-size: .8rem; }

.formats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 20px;
  padding-block: clamp(35px, 6vw, 70px);
}
.formats .display, .studio .display { font-size: clamp(2.05rem, 4vw, 3.6rem); }
.formats-intro p { margin-top: 5px; color: var(--muted); }
.format-table { width: 100%; border-collapse: collapse; text-align: left; }
.format-table caption { padding-bottom: 5px; color: var(--muted); font-size: .9rem; text-align: left; }
.format-table th, .format-table td { padding: 8px clamp(4px, 1vw, 13px); border-bottom: 1px solid var(--line); }
.format-table thead th { font-size: .9rem; }
.format-table tbody th { color: var(--cobalt); }
.format-table td { white-space: nowrap; }

.studio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 65px);
  padding-bottom: clamp(38px, 7vw, 90px);
}
.studio-copy p { max-width: 40ch; margin-top: 14px; }
.studio-art { position: relative; }
.studio-art img { max-height: 300px; border-radius: 12px; object-fit: cover; }
.contacts { padding-bottom: 40px; }
.contacts .button { margin-top: 12px; }
.footer { border-top: 1px solid var(--line); }
.footer-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 22px;
}

dialog {
  position: fixed;
  width: min(900px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 28px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 22px 65px #0e152460;
}
dialog::backdrop { background: #0e1524c9; }
.dialog-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); }
.dialog-close button { font-size: 1.7rem; line-height: 1; }
.dialog-close button:hover { color: var(--cobalt); }
.dialog-image {
  position: relative;
  display: grid;
  min-height: 340px;
  align-items: center;
  background: #e9e3d8;
}
dialog[data-night] .dialog-image { background: #080f20; }
.dialog-image img { height: 100%; max-height: 620px; object-fit: contain; }
.dialog-copy { align-self: center; padding: 48px clamp(19px, 4vw, 38px) 25px; }
.dialog-copy .display { font-size: clamp(1.95rem, 4vw, 3.35rem); }
.dialog-colors { margin-block: 7px 16px; color: var(--muted); }
.dialog-light, .dialog-actions, .format-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.dialog-light { margin-top: 15px; }
.dialog-formats { margin: 19px 0 0; padding: 0; border: 0; }
.dialog-formats legend { padding: 0 0 6px; font-size: .94rem; font-weight: 700; }
.dialog-formats output { display: block; margin-top: 5px; }
#work-orientation { color: var(--muted); font-size: .88rem; }
.format-choices label { position: relative; cursor: pointer; }
.format-choices input { position: absolute; opacity: 0; }
.format-choices span {
  display: grid;
  min-width: 48px;
  min-height: 41px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}
.format-choices input:checked + span { border-color: var(--cobalt); background: #e5e9ff; color: var(--cobalt-dark); }
.format-choices input:focus-visible + span { outline: 3px solid #576dff; outline-offset: 2px; }
.dialog-actions { gap: 12px 15px; margin-top: 19px; }
.dialog-actions .quiet-link { padding-block: 5px; font-size: .94rem; }

@media (max-width: 900px) {
  .hero-copy { padding-inline: clamp(24px, 4vw, 42px); }
  .catalog-controls { flex-wrap: wrap; }
  .works { gap: 14px; }
  .work p { font-size: .875rem; }
}

@media (max-width: 700px) {
  .header-layout {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    padding-block: 10px 3px;
  }
  .navigation { grid-row: 2; grid-column: 1 / -1; gap: 20px; }
  .navigation a { font-size: .9rem; }
  .saved-nav { grid-row: 1; grid-column: 2; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 27px 20px 24px; }
  .hero .display { font-size: clamp(2.42rem, 8.8vw, 3.85rem); line-height: .99; }
  .hero .display span { display: inline; }
  .hero-copy p { margin-block: 13px 17px; }
  .hero-copy p br { display: none; }
  .hero-art { border-radius: 0 0 var(--radius) var(--radius); }
  .hero-art picture { min-height: 0; aspect-ratio: 1.62; }
  .hero-art img { object-position: center 45%; }
  .search { min-height: 53px; width: 100%; }
  .section-head { margin-bottom: 14px; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .glow { grid-template-columns: minmax(0, 1fr); }
  .glow-copy { padding: 25px 22px 19px; }
  .glow-copy .display br { display: none; }
  .glow-copy p { max-width: 38ch; margin-top: 11px; }
  .comparison { padding: 0 10px 8px; }
  .formats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .format-table thead th { font-size: .85rem; }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .dialog-layout { grid-template-columns: minmax(0, 1fr); }
  .dialog-image { min-height: 0; height: min(42vh, 360px); }
  .dialog-image img { max-height: min(42vh, 360px); }
  .dialog-copy { padding: 20px; }
}

@media (max-width: 380px) {
  .wordmark { font-size: 1.25rem; }
  .saved-nav { gap: 6px; padding-inline: 8px; }
  .hero .display { font-size: clamp(1.84rem, 8.6vw, 2.05rem); }
  .search input { padding-left: 6px; }
  .section-head { gap: 8px; }
  .section-head .quiet-link { font-size: .86rem; }
  .works { gap: 16px 10px; }
  .work p { font-size: .82rem; }
  .image-note { bottom: 6px; left: 6px; font-size: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
