:root {
  --bg: #e8e8e3;
  --surface: #dcdcd6;
  --ink: #181715;
  --muted: #5c5b55;
  --accent: #bfb21a;
  --accent-press: #a99d12;
  --accent-ink: #181715;
  --field: #181715;
  --field-ink: #e8e8e3;
  --field-muted: #a3a199;

  --display: "Gambarino", "Times New Roman", serif;
  --text: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4.5rem, 10vw, 11rem);

  --m: clamp(16px, 2vw, 28px);
  --col-gap: clamp(16px, 2vw, 32px);
  --gap: clamp(120px, 13vw, 200px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.h-head {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-head);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: var(--accent-press); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:focus-visible { outline-color: var(--ink); }

/* Top line */
.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--m);
  font-size: var(--step-small);
}
.top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
  transition: text-decoration-color 0.25s var(--ease), text-underline-offset 0.25s var(--ease);
}
.top a:hover { text-decoration-color: currentColor; text-underline-offset: 0.2em; }
.top nav { display: flex; gap: 22px; }

/* Hero */
.hero {
  padding: clamp(150px, 26vh, 300px) var(--m) 0;
}
.hero-line {
  display: flex;
  align-items: baseline;
  gap: 0.16em;
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-display);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.hero-line .slot { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.hero-line img {
  width: 100%;
  height: 0.68em;
  object-fit: cover;
  object-position: 50% 52%;
  filter: grayscale(1) contrast(1.05);
}
.hero-foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 28px;
  margin-top: 44px;
  align-items: start;
}
.hero-sub { grid-column: 1 / 7; grid-row: 1; font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; }
.hero-cap { grid-column: 8 / 13; grid-row: 1; text-align: right; font-size: var(--step-small); color: var(--muted); }
.hero-foot .btn { grid-column: 1 / 7; grid-row: 2; justify-self: start; }

/* Sections */
main > section { margin-top: var(--gap); padding-inline: var(--m); }
main > section.hero { margin-top: 0; }

/* What it adds up to */
.sum {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.sum-pin { grid-column: 1 / 6; grid-row: 1; align-self: start; }
.sum-pin .statement { margin-top: 32px; font-size: var(--step-lead); line-height: 1.35; max-width: 26ch; }
.sum-list { display: contents; list-style: none; }
.sum-item { margin-top: clamp(72px, 8vw, 128px); align-self: start; }
.sum-item.a { grid-column: 8 / 12; grid-row: 1 / span 2; margin-top: 0; }
.sum-item.b { grid-column: 2 / 6; grid-row: 2 / span 2; }
.sum-item.c { grid-column: 8 / 13; grid-row: 3 / span 2; }
.sum-item.d { grid-column: 1 / 5; grid-row: 4 / span 2; }
.sum-item img, .feel-fig img, .st-pic img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.sum-item figcaption, .feel-fig figcaption, .st-cap {
  margin-top: 10px;
  font-size: var(--step-small);
  color: var(--muted);
}
.sum-item h3 { margin-top: 28px; font-size: var(--step-lead); font-weight: 500; line-height: 1.25; max-width: 24ch; }
.sum-item p { margin-top: 12px; max-width: 44ch; }

/* Pick a feeling */
.feel {
  background: var(--field);
  color: var(--field-ink);
  padding-block: clamp(96px, 10vw, 160px);
}
.feel-intro { margin-top: 20px; max-width: 44ch; }
.feel-stage {
  position: relative;
  margin-top: clamp(40px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.feel-words { grid-column: 1 / 6; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; }
.fw {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font-family: var(--display);
  font-size: var(--step-display);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--field-muted);
  cursor: pointer;
  text-align: left;
  transition: color 0.25s var(--ease), transform 0.35s var(--ease);
}
.fw:hover { color: var(--field-ink); transform: translateX(0.04em); }
.fw[aria-pressed="true"] { color: var(--field-ink); }
.fw:active { transform: translateX(0.02em) scale(0.99); }
.feel-panel { display: contents; }
.feel-panel[hidden] { display: none; }
.feel-fig { grid-column: 6 / 10; grid-row: 1; align-self: start; margin-top: 2vw; }
.feel-fig .frame { overflow: hidden; }
.feel-fig img { animation: drift 16s ease-in-out infinite alternate; }
.feel-fig figcaption { color: var(--field-muted); }
.feel-facts { grid-column: 10 / 13; grid-row: 1; align-self: end; }
.feel-facts h3 { font-size: var(--step-lead); font-weight: 500; line-height: 1.2; }
.feel-facts p { margin-top: 16px; }
.js .feel-panel:not([hidden]) .feel-fig img { animation: swap 0.7s var(--ease) both, drift 16s ease-in-out 0.7s infinite alternate; }
.js .feel-panel:not([hidden]) .feel-facts { animation: rise 0.6s var(--ease) 0.08s both; }

@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes swap { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* The studies */
.studies {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.st-pic { grid-column: 1 / 6; position: sticky; top: 12vh; align-self: start; }
.st-pic figure { position: relative; aspect-ratio: 4 / 5; max-width: 34vw; }
.st-pic img { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity 0.45s var(--ease), transform 1.2s var(--ease); transform: scale(1.03); }
.st-pic img.on { opacity: 1; transform: scale(1); }
.st-list { grid-column: 7 / 13; }
.grp { margin-top: 56px; }
.grp + .grp { margin-top: 104px; }
.grp h3 { font-size: var(--step-lead); font-weight: 500; line-height: 1.25; }
.grp ul { list-style: none; margin: 28px 0 0; padding: 0; }
.grp li { margin-top: 30px; }
.grp li a, .grp li .n {
  display: inline-block;
  padding: 10px 0;
  margin: -10px 0;
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.4375rem);
  line-height: 1.3;
  font-weight: 500;
}
.grp li a {
  text-decoration-line: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
  transition: text-underline-offset 0.25s var(--ease), color 0.25s var(--ease);
}
.grp li a::after { content: " \2197"; font-weight: 400; }
.grp li a:hover { text-underline-offset: 0.32em; }
.grp .j { display: block; margin-top: 6px; font-size: var(--step-small); color: var(--muted); }
.grp li p { margin-top: 8px; max-width: 52ch; }

/* Limits */
.limits {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.limits h2 { grid-column: 1 / -1; }
.qs { grid-column: 5 / 13; margin-top: 80px; }
.qs details { margin-top: 12px; transition: background-color 0.3s var(--ease); }
.qs details[open] { background: var(--surface); padding: 0 24px 24px; margin-inline: -24px; }
.qs summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding-block: 12px;
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.5rem);
  line-height: 1.3;
}
.qs summary::-webkit-details-marker { display: none; }
.qs summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.qs details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.qs summary:hover { color: var(--muted); }
.qs details p { max-width: 48ch; animation: rise 0.45s var(--ease) both; }

/* Footer */
.foot {
  margin-top: var(--gap);
  background: var(--field);
  color: var(--field-ink);
  display: grid;
  grid-template-rows: auto clamp(72px, 9vw, 160px) auto auto;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: 0 var(--m);
}
.foot-top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-top: clamp(96px, 10vw, 160px);
}
.foot-ask { grid-column: 1 / 8; }
.foot-ask h2 { max-width: 12ch; }
.foot-ask .btn { margin-top: 36px; }
.foot-links { grid-column: 10 / 13; list-style: none; margin: 0; padding: 0; }
.foot-links a, .foot-credits a, .foot-credits summary { text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-links a:hover, .foot-credits a:hover { color: var(--accent); }
.foot-credits {
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 32px;
  padding: 48px 0 20px;
  font-size: var(--step-small);
  color: var(--field-muted);
}
.foot-credits details { flex: 1 1 100%; }
.foot-credits summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.foot-credits ul { list-style: none; margin: 8px 0 0; padding: 0; columns: 2; column-gap: 32px; }
.foot-credits li { padding: 4px 0; break-inside: avoid; }
.foot-credits li a { display: inline-block; padding: 12px 0; }
.foot-credits p a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.foot-mark {
  grid-row: 4;
  font-family: var(--display);
  font-size: 16.4vw;
  line-height: 0.8;
  letter-spacing: -0.03em;
  white-space: nowrap;
  transform: translateY(26%);
  margin-left: -0.04em;
}

/* Motion: entrances and the shutter, only when the script runs */
.js [data-reveal] > *,
.js .sum-item[data-reveal] > * { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js [data-reveal].in > * { opacity: 1; transform: none; }
.js [data-reveal].in > :nth-child(2) { transition-delay: 0.08s; }
.js [data-reveal].in > :nth-child(3) { transition-delay: 0.16s; }
.js .limits details[data-reveal] > p { transition: none; }

.js .hero-line .slot img { clip-path: inset(0 100% 0 0); transform: scale(1.12); transition: clip-path 1.1s cubic-bezier(0.7, 0, 0.2, 1) 0.15s, transform 1.5s var(--ease) 0.15s; }
.js.ready .hero-line .slot img { clip-path: inset(0 0 0 0); transform: none; }
.js .hero-line .hw { display: inline-block; opacity: 0; transform: translateY(0.12em); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }
.js .hero-line .hw:last-child { transition-delay: 0.12s; }
.js.ready .hero-line .hw { opacity: 1; transform: none; }
.js .hero-foot > * { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease) 0.5s, transform 0.8s var(--ease) 0.5s; }
.js .hero-foot > .hero-cap { transition-delay: 0.6s; }
.js .hero-foot > .btn { transition-delay: 0.68s, 0.68s; }
.js.ready .hero-foot > * { opacity: 1; transform: none; }
.js.ready .hero-foot > .btn:hover { transform: translateY(-2px); transition-delay: 0s; }

/* Without the script, the feelings simply stack */
html:not(.js) .feel-stage { display: block; }
html:not(.js) .feel-panel { display: block; margin-top: 64px; }
html:not(.js) .feel-fig { max-width: 420px; }

/* Tablet */
@media (max-width: 1000px) {
  .feel-words { grid-column: 1 / 7; }
  .feel-fig { grid-column: 7 / 13; margin-top: 0; }
  .feel-facts { grid-column: 1 / 13; grid-row: 2; align-self: start; margin-top: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .feel-facts h3 { grid-column: 1 / -1; }
  .feel-facts p:first-of-type { grid-column: 1; }
  .qs { grid-column: 3 / 13; }
  .sum-pin { grid-column: 1 / 7; }
  .sum-item.a { grid-column: 8 / 13; }
  .sum-item.b { grid-column: 1 / 6; }
  .sum-item.c { grid-column: 7 / 13; }
  .sum-item.d { grid-column: 1 / 6; }
  .foot-ask { grid-column: 1 / 9; }
  .foot-links { grid-column: 9 / 13; }
}

/* Phone */
@media (max-width: 700px) {
  .top nav { gap: 16px; }
  .top .long { display: none; }
  .hero { padding-top: 112px; }
  .hero-line { flex-wrap: wrap; font-size: 21vw; row-gap: 0.12em; column-gap: 0; }
  .hero-line .slot { order: 2; flex: 0 0 100%; }
  .hero-line .hw:first-child { order: 1; }
  .hero-line .hw:last-child { order: 3; margin-left: auto; }
  .hero-line img { height: auto; aspect-ratio: 2 / 1; object-position: 50% 50%; }
  .hero-foot { display: block; margin-top: 32px; }
  .hero-sub { font-size: 1.1875rem; }
  .hero-foot .btn { margin-top: 24px; width: 100%; justify-content: center; }
  .hero-cap { text-align: left; margin-top: 20px; }

  .sum, .studies, .limits { display: block; }
  .sum-list { display: block; margin: 0; padding: 0; }
  .sum-item { margin-top: 80px; width: 84%; }
  .sum-item.b { width: 92%; margin-left: auto; }
  .sum-item.c { width: 76%; }
  .sum-item.d { width: 88%; margin-left: auto; }

  .feel-stage { display: block; }
  .fw { font-size: 15vw; padding-block: 2px; min-height: 44px; }
  .feel-facts { display: block; margin-top: 36px; }
  .feel-fig { width: 72%; margin: 40px 0 0 auto; }
  .feel-panel:not([hidden]) { display: flex; flex-direction: column-reverse; }

  .st-pic { position: static; width: 64%; margin-left: auto; }
  .st-cap { display: none; }
  .st-pic figure { max-width: none; }
  .st-list { margin-top: 56px; }
  .grp + .grp { margin-top: 80px; }

  .qs { margin-top: 40px; }
  .qs details[open] { margin-inline: calc(-1 * var(--m)); padding: 0 var(--m) 24px; }
  .qs summary { font-size: 1.1875rem; }

  .foot-top { display: block; }
  .foot-ask h2 { font-size: 11vw; }
  .foot-ask .btn { width: 100%; justify-content: center; }
  .foot-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 0 20px; }
  .foot-credits ul { columns: 1; }
  .foot-mark { font-size: 26vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] > *, .js .hero-line .hw, .js .hero-foot > * { opacity: 1 !important; transform: none !important; }
  .js .hero-line .slot img { clip-path: none !important; transform: none !important; }
}
