/* ————————————————————————————————
   Wunderkind Studio — v2
   Style reference: wearecollins.com
   Serif display: Instrument Serif (≈ Portrait Text)
   Sans UI: Inter (≈ Graphik)
   ———————————————————————————————— */

:root {
  --bg: #F8F8F7;
  --ink: #140700;
  --muted: #77726E;
  --hairline: rgba(20, 7, 0, 0.14);
  --ph-bg: #EFEEEC;
  --ph-dark: #161514;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.container {
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

/* ——— Buttons / pills ——— */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.55em 1.15em;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.pill:hover { background: var(--ink); color: var(--bg); }

.pill--icon { padding: 0.55em 0.9em; font-size: 0.9rem; line-height: 1; }

/* Contact pill morphs on hover to reveal the email; click copies it */
.copy-email { white-space: nowrap; }

.ce-default,
.ce-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.45s var(--ease-out), opacity 0.25s ease;
}

.ce-default { max-width: 130px; opacity: 1; }

.copy-email:hover .ce-default,
.copy-email.copied .ce-default { max-width: 0; opacity: 0; }

.copy-email:hover .ce-reveal,
.copy-email.copied .ce-reveal { max-width: 260px; opacity: 1; }

.copy-email--static .ce-reveal { max-width: none; opacity: 1; }

.pill--light { color: var(--bg); border-color: rgba(248, 248, 247, 0.5); }
.pill--light:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.pill--static { cursor: default; }
.pill--static:hover { background: transparent; color: var(--bg); border-color: rgba(248, 248, 247, 0.5); }

/* ——— Header ——— */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1.25rem, 4vw, 3rem);
  transition: transform 0.5s var(--ease-out), background 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(248, 248, 247, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.site-header.is-hidden { transform: translateY(-110%); }

.wordmark {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.header-tag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 1020px) {
  .header-tag { display: none; }
}

/* ——— Type ——— */

.hero-statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.9vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin-inline: auto;
  order: 1;
}

.hero-statement em, .statement em { font-style: italic; }

.statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin-top: 1.2rem;
}

.section-label { font-size: 0.95rem; font-weight: 600; }
.section-label.centered { text-align: center; }

.muted { color: var(--muted); }

.spaced {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ——— Split-word reveal ——— */

.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.split .w-inner {
  display: inline-block;
  transform: translateY(118%);
  transition: transform 1s var(--ease-out);
  transition-delay: var(--wd, 0s);
}

.split.in .w-inner { transform: none; }

/* ——— Generic reveal ——— */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.in { opacity: 1; transform: none; }

/* ——— Placeholders (assets to be dropped in) ——— */

.ph {
  position: relative;
  background: var(--ph-bg);
  border-radius: 18px;
  overflow: hidden;
}

.ph::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(20, 7, 0, 0.22);
  border-radius: 12px;
  pointer-events: none;
}

.ph-chip {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20, 7, 0, 0.55);
  border: 1px solid rgba(20, 7, 0, 0.25);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  background: rgba(248, 248, 247, 0.6);
}

.ph-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(20, 7, 0, 0.4);
}

.ph--dark { background: var(--ph-dark); }
.ph--dark::before { border-color: rgba(248, 248, 247, 0.2); }
.ph--dark .ph-chip {
  color: rgba(248, 248, 247, 0.6);
  border-color: rgba(248, 248, 247, 0.3);
  background: rgba(20, 7, 0, 0.4);
}
.ph--dark .ph-note { color: rgba(248, 248, 247, 0.42); }

/* ——— Hero ——— */

.hero {
  position: relative;
  min-height: 72svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 5.5rem;
}

.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100svh; /* runs past the hero to the bottom of the first viewport */
  z-index: 0;
  display: block;
  pointer-events: none;
}

.hero-statement,
.hero-foot { position: relative; z-index: 1; }

/* flexible spacers: slightly more room above the statement than below it */
.hero::before { content: ""; flex-grow: 1.4; min-height: 1.5rem; }
.hero::after { content: ""; flex-grow: 1; min-height: 2.5rem; order: 2; }

.hero-foot {
  order: 3;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.hero-foot .muted:first-child { font-size: 0.88rem; }

.awards {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.9rem;
  max-width: 46rem;
}

.award {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.laurel {
  height: 20px;
  width: auto;
  opacity: 0.85;
  flex: 0 0 auto;
}

.laurel--r { transform: scaleX(-1); }

/* ——— Sections ——— */

.section { padding-block: clamp(6rem, 12vw, 12rem); }

/* ——— About ——— */

#about .statement { margin-bottom: clamp(2rem, 4vw, 3.5rem); }

.about-copy {
  max-width: 44ch;
  margin-left: auto;
  color: rgba(20, 7, 0, 0.8);
  font-size: 1.02rem;
}

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  margin-top: clamp(3rem, 6vw, 5.5rem);
}

.stats li {
  padding: 1.8rem 1.6rem 0 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats li + li { border-left: 1px solid var(--hairline); }

.stat-num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 14ch;
}

/* ——— The magic word: the only color on the site ——— */

.magic-word {
  position: relative;
  isolation: isolate;
}

/* soft aurora bloom breathing behind the word; leans toward the cursor */
.magic-word::before {
  content: "";
  position: absolute;
  inset: -0.55em -0.7em;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(222, 107, 139, 0.4),
    rgba(214, 146, 63, 0.22) 45%,
    rgba(123, 111, 217, 0.16) 72%,
    transparent 78%
  );
  filter: blur(14px);
  transform: translate(var(--gx, 0px), var(--gy, 0px));
  animation: magic-breathe 5s ease-in-out infinite;
}

@keyframes magic-breathe {
  0%, 100% { opacity: 0.7; scale: 1; }
  50% { opacity: 1; scale: 1.16; }
}

/* iridescent ink: a slowly cycling gradient fill on the letters */
.magic-word .w-inner {
  background: linear-gradient(100deg, #a85fd0, #de6b8b 28%, #d6923f 55%, #7b6fd9 82%, #a85fd0);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: magic-hue 7s linear infinite;
}

@keyframes magic-hue {
  to { background-position: 220% 0; }
}

.sparkle {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: sparkle-float 1.6s ease-out forwards;
}

@keyframes sparkle-float {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--sx, 0px), var(--sy, -24px)) scale(1) rotate(90deg); }
}

/* ——— Disciplines list ——— */

.disc-list {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--hairline);
}

.disc { border-top: 1px solid var(--hairline); }

.disc-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2rem;
  padding: 1.15rem 0;
}

.disc-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  letter-spacing: -0.01em;
  transition: transform 0.5s var(--ease-out), color 0.3s ease;
}

.disc:hover .disc-name { transform: translateX(10px); }

.disc-tag {
  font-size: 0.92rem;
  color: var(--muted);
  text-align: right;
  transition: color 0.3s ease;
}

.disc:hover .disc-tag { color: var(--ink); }

.disc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease-out);
}

.disc-body > .disc-detail { min-height: 0; overflow: hidden; }

.disc:hover .disc-body { grid-template-rows: 1fr; }

@media (hover: none) {
  .disc-body { grid-template-rows: 1fr; }
}

.disc-detail > p {
  max-width: 58ch;
  font-size: 0.95rem;
  color: rgba(20, 7, 0, 0.72);
  padding-bottom: 1.6rem;
}

/* ——— Work: horizontal snap rail ——— */

.work-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.rail-nav { display: flex; gap: 0.7rem; }

.rail {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: max(clamp(1.25rem, 4vw, 3rem), calc((100% - 1680px) / 2 + 3rem));
  scroll-padding-inline: max(clamp(1.25rem, 4vw, 3rem), calc((100% - 1680px) / 2 + 3rem));
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }

.rail-card {
  flex: 0 0 auto;
  width: min(600px, 82vw);
  scroll-snap-align: start;
}

.rail-media {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ph-dark);
}

.rail-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-metric {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(248, 248, 247, 0.92);
  border-radius: 999px;
  padding: 0.45em 1em;
}

.rail-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin-top: 1.3rem;
}

.rail-tag { font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; }

.rail-desc {
  font-size: 0.92rem;
  color: rgba(20, 7, 0, 0.75);
  margin-top: 0.7rem;
  max-width: 56ch;
}

.rail-card--cta {
  aspect-ratio: 16 / 11;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(1.8rem, 3vw, 2.6rem);
}

.rail-cta-text {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.rail-cta-text em { font-style: italic; }

/* ——— Press marquee ——— */

.press {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
}

.press-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20, 7, 0, 0.35);
  margin-bottom: clamp(1.1rem, 2vw, 1.5rem);
}

.press-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.6rem clamp(2rem, 3.8vw, 3.5rem);
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  max-width: 1240px;
  margin-inline: auto;
}

.press-logo {
  height: 22px;
  width: auto;
  flex: 0 0 auto;
  opacity: 0.78;
}

.press-logo--wide { height: 25px; }

/* ——— Footer ——— */

.site-footer {
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  padding-block: clamp(7rem, 13vw, 12rem) 3rem;
  border-radius: 28px 28px 0 0;
}

.footer-statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-inline: auto;
}

.footer-cta {
  display: inline-block;
  margin-top: 2.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  color: var(--bg);
  text-decoration: none;
  border-bottom: 1px solid rgba(248, 248, 247, 0.6);
  padding-bottom: 3px;
  transition: opacity 0.25s ease;
}

.footer-cta:hover { opacity: 0.65; }

.footer-cta .arrow {
  font-style: normal;
  display: inline-block;
  transition: transform 0.4s var(--ease-out);
}

.footer-cta:hover .arrow { transform: translateX(6px); }

.footer-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: clamp(3rem, 6vw, 5rem);
}

.footer-meta {
  margin-top: clamp(4rem, 8vw, 7rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.wordmark--light { color: var(--bg); }

.footer-legal { font-size: 0.75rem; color: rgba(248, 248, 247, 0.55); }

/* ——— Reduced motion ——— */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .split .w-inner { opacity: 1; transform: none; transition: none; }
  .rail { scroll-behavior: auto; }
  .magic-word::before, .magic-word .w-inner { animation: none; }
  .sparkle { display: none; }
}

/* ——— Responsive ——— */

@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats li { border-left: 0; padding-inline: 0 1rem; }
  .stats li:nth-child(even) { border-left: 1px solid var(--hairline); padding-left: 1.6rem; }
  .stats li:nth-child(n+3) { margin-top: 2.2rem; }
  .about-copy { margin-left: 0; margin-top: 2rem; }
  .disc-head { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 0.3rem 1rem; }
  .disc-tag { text-align: left; }
  .work-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .hero { min-height: 66svh; }
  .rail-card { width: 84vw; }
  .press-logo { height: 17px; }
  .press-logo--wide { height: 20px; }
  .footer-pills { flex-direction: column; align-items: center; }
}
