:root {
  color-scheme: light;
  --ivory: #f7f4ef;
  --forest: #2f5d50;
  --ink: #243a34;
  --clay: #a96a5b;
  --line: #2f5d5040;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Manrope, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 500 1rem/1.65 var(--sans); }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.035em; line-height: .99; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--clay); outline-offset: 5px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - clamp(32px, 9vw, 144px), 1300px); margin-inline: auto; }

.first-screen {
  min-height: min(100svh, 900px);
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--ivory);
}
.hero-art, .hero-light, .first-screen::before {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: clamp(470px, 68svh, 660px);
  pointer-events: none;
}
.hero-art { z-index: -3; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 37%; }
.first-screen::before {
  content: "";
  z-index: -1;
  background:
    linear-gradient(0deg, var(--ivory), #f7f4efae 20%, transparent 48%),
    linear-gradient(90deg, #f7f4eff7, #f7f4efd2 25%, #f7f4ef2e 50%, transparent 64%);
}
.hero-light {
  z-index: -2;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse 18% 29% at 50% 45%, #f6d0a653, transparent);
  opacity: 0;
  animation: travel-light 4.8s ease-in-out .35s both;
}
@keyframes travel-light {
  0% { opacity: 0; transform: translate(-27%, -6%); }
  28% { opacity: .72; }
  72% { opacity: .76; }
  100% { opacity: 0; transform: translate(40%, 4%); }
}
.hero-header { padding-top: clamp(12px, 2.8svh, 28px); }
.brand { display: block; width: clamp(185px, 20vw, 274px); height: auto; }
.hero-body { padding-top: clamp(10px, 2.1svh, 21px); }
.hero-copy { max-width: min(46vw, 570px); }
.hero h1 { font-size: clamp(2.8rem, 4.75vw, 4.95rem); }
.hero h1 span { white-space: nowrap; }
.hero-copy p { margin-top: .6rem; font-size: clamp(.95rem, 1.45vw, 1.2rem); font-weight: 700; }

.hub { padding-block: clamp(20px, 4svh, 42px) clamp(24px, 4svh, 45px); }
.hub h2 { font-size: clamp(2.15rem, 3.7vw, 3.65rem); }
.links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(10px, 1.6vw, 22px);
  margin-top: clamp(12px, 2svh, 22px);
}
.hub-card { text-decoration: none; }
.featured-card {
  appearance: none;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  position: relative;
  border: 1px solid #b7a991;
  border-radius: 13px;
  overflow: hidden;
  background: #fffcf5;
  box-shadow: 0 3px 0 #9a8b72, 0 9px 16px #243a3420;
  color: inherit;
  text-align: left;
  font: inherit;
  padding: 0;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.featured-card:is(:hover, :focus-visible) {
  transform: translateY(-3px);
  border-color: var(--forest);
  box-shadow: 0 3px 0 var(--forest), 0 12px 22px #243a342c;
}
.card-art {
  height: clamp(72px, 15svh, 140px);
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid #b7a991;
}
.pigment { background-image: url(assets/card-pigment.webp); }
.sketch { background-image: url(assets/card-sketch.webp); }
.portrait { background-image: url(assets/card-portrait.webp); }
.sculpture { background-image: url(assets/card-sculpture.webp); }
.card-copy { display: block; padding: clamp(9px, 1.1vw, 16px); }
.card-title {
  display: block;
  color: var(--forest);
  font: 600 clamp(1.35rem, 2vw, 2.02rem)/1.02 var(--serif);
}
.card-text { display: block; margin-top: .5rem; font-size: .875rem; line-height: 1.37; }
.card-only-text { margin-top: 0; }
.route-toggle .card-copy { padding-right: 35px; }
.route-toggle::after {
  content: "+";
  position: absolute;
  inset: auto 13px 12px auto;
  font: 600 1.18rem/1 var(--sans);
  color: var(--forest);
}
.discovery-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(12px, 4vw, 45px);
  border: 0;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
}
.discovery-dialog[open] { display: grid; place-items: center; }
.discovery-dialog::backdrop { background: #152820b3; }
body:has(.discovery-dialog[open]) { overflow: hidden; }
.paint-burst { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.discovery-panel {
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 860px);
  max-height: min(100%, 860px);
  border: 1px solid #b7a991;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ivory);
  box-shadow: 0 18px 75px #15282066;
}
.discovery-dialog.is-animated .discovery-panel {
  animation: open-discovery .58s .16s cubic-bezier(.22,.74,.27,1) both;
}
@keyframes open-discovery {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.discovery-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(15px, 3vw, 30px) clamp(16px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(112deg, #eae2d6, var(--ivory) 65%);
}
.discovery-header h2, .discovery-header h1 { font-size: clamp(2rem, 5vw, 3.7rem); }
.discovery-close, .discovery-back, .discovery-next {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--forest);
  border-radius: 6px;
  color: var(--forest);
  background: var(--ivory);
  font: 700 .875rem/1.2 var(--sans);
  cursor: pointer;
}
.discovery-close:hover, .discovery-back:hover {
  color: var(--ivory);
  background: var(--forest);
}
.discovery-next { margin-inline-start: auto; color: var(--ivory); background: var(--forest); min-width: 100px; }
.discovery-next:hover { background: var(--ink); }
.discovery-content {
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(16px, 4vw, 42px);
}
.discovery-copy { max-width: 69ch; }
.discovery-copy p + p { margin-top: 1em; }
.discovery-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 42px);
  border-top: 1px solid var(--line);
}
.discovery-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.discovery-link {
  display: block;
  padding: clamp(12px, 2vw, 18px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffcf5;
  text-decoration: none;
}
.discovery-link:hover { border-color: var(--forest); text-decoration: underline; text-underline-offset: 4px; }
.discovery-link .card-title { font-size: clamp(1.35rem, 2.75vw, 1.75rem); }
.tests-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 45px);
  background: linear-gradient(120deg, #152820c2, #243a34aa), url("assets/visual-language.webp") center / cover no-repeat;
}
.tests-page .paint-burst { position: fixed; }
.tests-panel { max-height: none; }
.site-footer { background: var(--ink); color: var(--ivory); padding-block: 16px; font-size: .875rem; }

@media (min-width: 980px) and (max-height: 800px) {
  .hero h1 { font-size: clamp(2.75rem, 3.8vw, 3.65rem); }
  .hero-body { padding-top: 10px; }
  .brand { width: 218px; }
  .hub { padding-top: 17px; }
  .hub h2 { font-size: clamp(2rem, 3.35vw, 3rem); }
  .card-art { height: 82px; }
  .card-copy { padding: 11px; }
  .featured-card .card-title { font-size: clamp(1.35rem, 1.85vw, 1.8rem); }
}
@media (max-width: 980px) {
  .hero-copy { max-width: min(52vw, 488px); }
  .card-copy { padding: 10px; }
  .route-toggle .card-copy { padding-right: 28px; }
  .route-toggle::after { right: 9px; }
}
@media (max-width: 720px) {
  .hero-art, .hero-light, .first-screen::before { height: clamp(270px, 76vw, 450px); }
  .hero-art img { object-position: 58% 37%; }
  .first-screen::before {
    background:
      linear-gradient(0deg, var(--ivory) 2%, #f7f4efc9 29%, transparent 67%),
      linear-gradient(90deg, #f7f4eff9, #f7f4efb8 37%, #f7f4ef17 81%);
  }
  .brand { width: clamp(170px, 45vw, 230px); }
  .hero-body { padding-top: 12px; }
  .hero-copy { max-width: min(78vw, 420px); }
  .hero h1 { font-size: clamp(2.35rem, 8.9vw, 4rem); }
  .hero-copy p { margin-top: .65rem; line-height: 1.32; }
  .hub { padding-top: 24px; }
  .hub h2 { font-size: clamp(2rem, 7.8vw, 3.1rem); }
  .links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-title { font-size: clamp(1.2rem, 5.2vw, 1.65rem); hyphens: auto; overflow-wrap: anywhere; }
  .card-art { height: clamp(64px, 19vw, 105px); }
  .card-copy { padding: 8px 9px 10px; }
  .featured-card .card-text { display: none; }
  .discovery-links { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .brand { width: 155px; }
  .hero-copy { max-width: 88vw; }
  .hero h1 { font-size: 2.05rem; }
  .hub { padding-top: 19px; }
  .hub h2 { font-size: 1.85rem; }
  .card-title { font-size: 1.1rem; }
  .card-art { height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-light { animation: none; }
  .featured-card { transition: none; }
  .discovery-dialog.is-animated .discovery-panel { animation: none; }
}
