/* S8 SPACE — cosmic portal identity. Notes: design/DESIGN_PLAN.md */
:root {
  --bg: #05060a;
  --surface: #0e1019;
  --line: rgba(200, 212, 255, 0.1);
  --text: #eef1f8;
  --muted: #8d94aa;
  --accent: #6f9bff;
  --accent-light: #a9c3ff;
  --violet: #9a7cff;
  --draft: #d06a8a;
  --error: #ff7a8a;

  --font-display: "Noto Serif Display", "Times New Roman", serif;
  --font-body: "Be Vietnam Pro", system-ui, sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
  --section-space: clamp(80px, 11vw, 152px);
  --radius: 8px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

.no-scroll {
  overflow: hidden;
}

.wrap {
  width: min(1320px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--text);
  color: var(--bg);
}

.skip-link:focus {
  top: 12px;
}

/* Buttons and links */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease);
}

.button:hover {
  background: var(--accent-light);
}

.button .icon {
  transition: transform 0.3s var(--ease);
}

.button:hover .icon {
  transform: translateX(3px);
}

.button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.button--small {
  padding: 9px 18px;
  font-size: 0.9375rem;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.3s;
}

.link:hover {
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(5, 6, 10, 0.6);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
}

.icon-button:hover {
  border-color: rgba(238, 241, 248, 0.4);
  background: rgba(5, 6, 10, 0.85);
}

.icon-button .icon {
  width: 20px;
  height: 20px;
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}

.site-header.is-solid {
  background: rgba(5, 6, 10, 0.86);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.3s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  position: relative;
  width: 16px;
  height: 10px;
}

.menu-toggle i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.menu-toggle i:first-child { top: 0; }
.menu-toggle i:last-child { top: 8.5px; }

.menu-toggle[aria-expanded="true"] i:first-child {
  top: 4.25px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] i:last-child {
  top: 4.25px;
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  align-content: center;
  padding: 96px 0 48px;
  background: var(--bg);
}

.menu__list {
  margin-block: 0;
  padding: 0;
  list-style: none;
}

.menu__list a {
  display: block;
  padding: 8px 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 300;
  font-stretch: 87.5%;
  text-decoration: none;
}

@media (max-width: 960px) {
  .nav,
  .site-header .button--small {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }
}

/* Cosmic portal: a fixed WebGL canvas (portal.js) behind one pinned scroll
   journey. Page content sits above it; the canvas fades out after the journey. */

.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #020306;
  pointer-events: none;
}

.cosmos canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Without WebGL: a still ring drawn in CSS */
.no-webgl .cosmos {
  background:
    radial-gradient(circle at 50% 50%, #020306 0 15vmin, rgba(170, 195, 255, 0.9) 15.6vmin, rgba(111, 155, 255, 0.45) 17vmin, rgba(154, 124, 255, 0.18) 21vmin, rgba(2, 3, 6, 0) 32vmin),
    #020306;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.portal {
  position: relative;
  height: 520vh;
}

.portal__sticky {
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.portal__type {
  padding: 0 var(--gutter);
  text-align: center;
  will-change: transform, opacity, filter;
}

.portal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 9.5rem);
  font-weight: 300;
  font-stretch: 87.5%;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 10%, #c4d3ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.portal__sub {
  margin: 24px 0 0;
  padding-left: 0.42em;
  font-size: clamp(0.75rem, 1.05vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(238, 241, 248, 0.7);
}

.portal__hint {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(238, 241, 248, 0.6);
  transform: translateX(-50%);
}

.portal__hint .icon {
  transform: rotate(180deg);
  animation: nudge 1.8s var(--ease) infinite;
}

@keyframes nudge {
  50% {
    transform: rotate(180deg) translateY(-4px);
  }
}

/* Load: the words arrive slowly, after the scene */
.js .portal__type > * {
  animation: rise 1.6s var(--ease) 0.35s both;
}

.js .portal__type > :nth-child(2) {
  animation-delay: 0.75s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
    letter-spacing: 0.12em;
  }
}

/* The far side of the portal: five disciplines over the new dimension */

.dimensions {
  position: relative;
  min-height: 120vh;
  padding-block: clamp(120px, 22vh, 220px) var(--section-space);
}

.dimensions__title {
  max-width: 12em;
  margin: 0 auto clamp(56px, 8vw, 112px);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 6rem);
  font-weight: 300;
  font-stretch: 87.5%;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(100deg, #ffffff 20%, #b9c9ff 55%, #b8a6ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.disciplines {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.discipline {
  position: relative;
  padding: 26px 22px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 16, 25, 0.6), rgba(14, 16, 25, 0.25));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.4s, box-shadow 0.5s var(--ease), translate 0.5s var(--ease);
}

/* light pooling from the top edge on hover */
.discipline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -10%, rgba(111, 155, 255, 0.28), rgba(154, 124, 255, 0.08) 45%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.discipline:hover {
  border-color: rgba(140, 175, 255, 0.45);
  box-shadow: 0 30px 80px -40px rgba(111, 155, 255, 0.65);
  translate: 0 -6px;
}

.discipline:hover::before {
  opacity: 1;
}

.discipline__num {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.discipline__icon {
  display: block;
  width: 34px;
  height: 34px;
  margin: 40px 0 22px;
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.4s, filter 0.4s;
}

.discipline:hover .discipline__icon {
  stroke: #ffffff;
  filter: drop-shadow(0 0 10px rgba(140, 175, 255, 0.9));
}

.discipline h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.discipline p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .disciplines {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .portal {
    height: 420vh;
  }

  .disciplines {
    grid-template-columns: 1fr;
  }

  .discipline__icon {
    margin: 20px 0 14px;
  }
}


/* Sections */

.section {
  padding-block: var(--section-space) 0;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 300;
  font-stretch: 87.5%;
  line-height: 1.05;
  text-wrap: balance;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
}

.draft {
  margin-left: 10px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--draft);
}

/* Reveal on scroll: a short fade-up */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease) var(--delay, 0ms), transform 0.7s var(--ease) var(--delay, 0ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Vision & mission */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.about__image {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__pair {
  display: grid;
  gap: 24px;
  margin: 36px 0 0;
}

.about__pair > div {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.about__pair dt {
  font-size: 0.875rem;
  color: var(--muted);
}

.about__pair dd {
  margin: 6px 0 0;
  font-size: 1.125rem;
  line-height: 1.5;
}


/* Featured projects: a 3D ring of photo cards in front of an LED wall */

.featured {
  position: relative;
  margin-top: var(--section-space);
  padding-block: clamp(64px, 8vw, 112px);
  overflow: hidden;
  isolation: isolate;
}

.featured__wall,
.contact-band__wall {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

/* Fade the wall into the page at the top and bottom, darken its edges. */
.featured::after,
.contact-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--bg), rgba(5, 6, 10, 0) 18%, rgba(5, 6, 10, 0) 82%, var(--bg)),
    radial-gradient(ellipse at center, rgba(5, 6, 10, 0) 35%, rgba(5, 6, 10, 0.7) 100%);
  pointer-events: none;
}

.featured__hint {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(238, 241, 248, 0.7);
}

.featured__more {
  margin-top: 24px;
}

.ring-stage {
  position: relative;
  height: clamp(440px, 64vh, 660px);
  perspective: 1600px;
  perspective-origin: 50% 42%;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  transition: transform 0.7s var(--ease);
}

.ring-stage.is-dragging {
  cursor: grabbing;
}

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card-w, 240px);
  height: calc(var(--card-w, 240px) * 1.3);
  margin-left: calc(var(--card-w, 240px) / -2);
  margin-top: calc(var(--card-w, 240px) * -0.65);
  transform-style: preserve-3d;
}

.ring__card {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: inherit;
  /* cards turned away from the viewer dim and fade, like the back of the stage */
  filter: brightness(calc(0.3 + 0.7 * max(var(--face, 1), 0)));
  opacity: calc(0.1 + 0.9 * max(var(--face, 1), 0));
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
  transition: box-shadow 0.4s var(--ease);
}

.ring__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ring__card span {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 14px 14px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  transition: opacity 0.4s;
}

.ring__card.is-front span,
.ring__card:hover span,
.ring__card:focus-visible span {
  opacity: 1;
}

.ring__card.is-front {
  box-shadow: 0 0 0 1px rgba(140, 175, 255, 0.45), 0 40px 90px -30px rgba(140, 175, 255, 0.4);
}

.ring__card.is-selected {
  box-shadow: 0 0 0 2px var(--accent-light), 0 40px 100px -20px rgba(140, 175, 255, 0.55);
}

/* With a project open, the ring makes room for the details panel. */
@media (min-width: 901px) {
  .ring-stage.has-selection {
    transform: translateX(-16%);
  }
}

.ring-panel {
  position: absolute;
  right: max(var(--gutter), calc((100% - 1320px) / 2));
  top: 50%;
  z-index: 2;
  width: min(380px, 34vw);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 16, 25, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translateY(-42%);
  animation: panel-in 0.45s var(--ease);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translate(16px, -42%);
  }
}

.ring-panel__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
}

.ring-panel__title {
  margin: 0 0 8px;
  padding-right: 32px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 400;
  font-stretch: 87.5%;
  line-height: 1.12;
}

.ring-panel__caption {
  margin: 0 0 14px;
  color: rgba(238, 241, 248, 0.78);
}

.ring-panel__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.ring-panel__tags li {
  padding: 3px 10px;
  border: 1px solid rgba(111, 155, 255, 0.4);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--accent);
}

.ring-panel__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 20px;
}

.ring-panel__thumbs button {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}

.ring-panel__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.ring-panel__thumbs button:hover img {
  transform: scale(1.08);
}

.project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.contact-band {
  position: relative;
  margin-top: var(--section-space);
  overflow: hidden;
  isolation: isolate;
}

.contact-band .contact {
  padding-top: clamp(72px, 9vw, 120px);
}

/* Partner logos */

.logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.logos li {
  display: grid;
  place-items: center;
  min-height: clamp(100px, 11vw, 150px);
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.logos img {
  width: auto;
  height: auto;
  max-width: 62%;
  max-height: 48px;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 0.3s;
}

.logos li:hover img {
  opacity: 1;
}

.logos__word {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-stretch: 75%;
  line-height: 1.2;
  color: rgba(238, 241, 248, 0.5);
}

/* Testimonials */

.quotes {
  max-width: 52em;
  margin-inline: auto;
  text-align: center;
}

.quotes__stage {
  display: grid;
}

.quote {
  grid-area: 1 / 1;
  margin: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s, visibility 0s 0.4s;
}

.quote.is-current {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.4s;
}

.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.3;
}

.quote blockquote p {
  margin: 0;
}

.quote figcaption {
  margin-top: 18px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.quote--empty blockquote {
  color: var(--muted);
}

.quotes__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
}

.quotes__dots {
  display: flex;
  gap: 8px;
}

.quotes__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color 0.3s;
}

.quotes__dots .is-active {
  background: var(--accent);
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 48px clamp(40px, 6vw, 96px);
  padding-bottom: var(--section-space);
}

.contact__list {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.contact__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.contact__list li > .icon {
  color: var(--accent);
}

.contact__list a {
  font-size: 1.125rem;
  text-decoration: none;
  transition: color 0.3s;
}

.contact__list a:hover {
  color: var(--accent-light);
}

.copy {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

.copy:hover {
  color: var(--text);
  border-color: rgba(238, 241, 248, 0.4);
}

.copy .icon {
  width: 15px;
  height: 15px;
}

.brief {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.brief-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.brief-form label {
  display: grid;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--muted);
}

.brief-form__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.brief-form__choices legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chip span {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
  color: rgba(238, 241, 248, 0.82);
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.chip:hover span {
  border-color: rgba(238, 241, 248, 0.35);
}

.chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

.brief-form input:not([type="radio"], [type="checkbox"]),
.brief-form textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(238, 241, 248, 0.2);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s;
}

.brief-form input:focus,
.brief-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.brief-form ::placeholder {
  color: rgba(141, 148, 170, 0.7);
}

.brief-form__wide {
  grid-column: 1 / -1;
}

.brief-form__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
}

.brief-form__foot p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.brief-form [aria-invalid="true"] {
  border-bottom-color: var(--draft) !important;
}

.brief-form__error {
  min-height: 1.2em;
  font-size: 0.8125rem;
  color: var(--error);
}

.brief-form__hint {
  margin: -8px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.brief-form__hint.is-error,
.brief-form__status.is-error {
  color: var(--error);
}

/* Honeypot for bots: off-screen, never focused by people. */
.brief-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.brief-done:focus {
  outline: none;
}

.brief-done h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  font-stretch: 87.5%;
}

.brief-done p {
  margin: 0;
  color: rgba(238, 241, 248, 0.8);
}

.brief-done a {
  color: var(--accent);
}

/* Footer, back to top, toast */

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 28px;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0 auto 0 0;
}

.site-footer a {
  display: inline-grid;
  color: var(--muted);
  transition: color 0.3s;
}

.site-footer a:hover {
  color: var(--text);
}

.to-top {
  position: fixed;
  right: clamp(16px, 2.4vw, 28px);
  bottom: clamp(16px, 2.4vw, 28px);
  z-index: 18;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(5, 6, 10, 0.85);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.to-top.is-on {
  opacity: 1;
  pointer-events: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 110;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Photo viewer */

.viewer {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 5, 9, 0.97);
  color: var(--text);
}

.viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: fade-in 0.3s var(--ease);
}

.viewer::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.viewer__top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px clamp(16px, 3vw, 32px);
}

.viewer__title {
  margin: 0;
  font-weight: 500;
}

.viewer__count {
  margin: 0 0 0 auto;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.viewer__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  padding: 0 clamp(12px, 7vw, 96px);
}

.viewer__stage img {
  max-width: 100%;
  max-height: calc(100vh - 190px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.viewer__stage img.is-shown {
  opacity: 1;
}

.viewer__nav {
  position: absolute;
  top: 50%;
  margin-top: -22px;
}

.viewer__nav--prev { left: clamp(8px, 2vw, 24px); }
.viewer__nav--next { right: clamp(8px, 2vw, 24px); }

.viewer__thumbs {
  display: flex;
  gap: 8px;
  padding: 12px clamp(16px, 3vw, 32px) 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.viewer__thumbs button {
  flex: none;
  width: 72px;
  height: 50px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.3s, border-color 0.3s;
}

.viewer__thumbs button:hover,
.viewer__thumbs .is-current {
  opacity: 1;
}

.viewer__thumbs .is-current {
  border-color: var(--accent);
}

.viewer__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Narrow screens */

@media (max-width: 900px) {
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  /* The details panel drops below the ring as a regular block */
  .ring-panel {
    position: relative;
    inset: auto;
    width: min(560px, calc(100% - 2 * var(--gutter)));
    margin: 8px auto 0;
    transform: none;
    animation: none;
  }

  .ring-stage {
    height: clamp(360px, 56vh, 520px);
  }

  .logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .brief-form {
    grid-template-columns: 1fr;
  }

  .viewer__stage {
    padding: 0;
  }

  .viewer__nav {
    top: auto;
    bottom: 84px;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .portal__type > *,
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  /* No flight through the portal: one still screen */
  .portal {
    height: 100vh;
  }

  .portal__hint {
    display: none;
  }

  .ring-stage,
  .ring-panel {
    transition: none;
    animation: none;
  }

  .viewer[open] {
    animation: none;
  }

  .viewer__stage img {
    transition: none;
  }
}
