/* Ansel Studio — spatial, shader-backed landing */

:root {
  --bg: #0D0D0B;
  --bg-elevated: #141410;
  --bg-glass: rgba(20, 20, 16, 0.55);
  --text: #F5F0E8;
  --muted: #A89F90;
  --parchment: #C9BFA8;
  --line: rgba(245, 240, 232, 0.12);
  --red: #E20612;
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --narrow: 640px;
  --space: clamp(1.25rem, 3vw, 2.25rem);
  --section: clamp(5rem, 12vw, 8.5rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

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;
  overflow-x: hidden;
  position: relative;
}

/* Full-viewport FX canvas — behind content */
#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 191, 168, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
  will-change: transform;
}

body.has-pointer .cursor-glow.is-on {
  opacity: 1;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--parchment);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}

h2 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

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

.wrap.narrow {
  width: min(100% - 2 * var(--space), var(--narrow));
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: var(--space);
  top: var(--space);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 11, 0.55);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.75rem;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: var(--text);
}

/* Hero — asymmetric stage */

.hero {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(4rem, 10vw, 7rem);
  min-height: min(92vh, 920px);
  display: flex;
  align-items: center;
  perspective: 1400px;
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "copy figure"
    "aside figure";
  gap: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 3rem);
  align-items: end;
}

@media (min-width: 961px) {
  .hero-copy {
    margin-right: -12%;
  }
  .hero-figure {
    margin-left: -4%;
  }
}

.hero-copy {
  grid-area: copy;
  position: relative;
  z-index: 3;
  padding-bottom: 1rem;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-figure {
  grid-area: figure;
  margin: 0;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-aside {
  grid-area: aside;
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.55;
  align-self: start;
  padding-top: 0.5rem;
}

.hero-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1.25rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.05em;
  margin-bottom: 1.35rem;
  font-weight: 400;
  text-transform: lowercase;
  line-height: 0.95;
}

.title-layer {
  display: block;
  font-size: clamp(2.8rem, 8.5vw, 5.1rem);
  letter-spacing: -0.035em;
  will-change: transform;
  transform: translateZ(0);
  transform-style: preserve-3d;
}

.title-a {
  color: var(--text);
  opacity: 0.92;
}

.title-b {
  color: var(--parchment);
  margin-left: 0.08em;
  font-style: italic;
  mix-blend-mode: soft-light;
  text-shadow: 0 0 42px rgba(201, 191, 168, 0.22);
}

.title-c {
  color: var(--text);
  margin-left: 0.18em;
  font-size: clamp(2.2rem, 6.5vw, 3.85rem);
  opacity: 0.88;
}

.hero-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 32rem;
  margin-bottom: 1.85rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Film gate framing */
.film-gate {
  position: relative;
  padding: 0.65rem;
  background: rgba(13, 13, 11, 0.35);
  border: 1px solid rgba(245, 240, 232, 0.14);
  transform-style: preserve-3d;
  transition:
    padding 0.9s var(--ease-out),
    border-color 0.9s ease,
    box-shadow 0.9s ease;
}

.film-gate-inner {
  position: relative;
  overflow: hidden;
  background: #111;
  aspect-ratio: 4 / 3;
}

.film-gate-inner img,
.film-gate-inner .hero-instrument {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-instrument {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-instrument.is-live {
  opacity: 1;
}

/* JPG always sizes the gate; canvas layers on top when live */
.hero-fallback {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
  transform: scale(1.02);
  transition: transform 0.7s var(--ease-out), opacity 0.45s ease;
  display: block;
}

.hero-fallback.is-underlay {
  /* stay in flow for aspect sizing; dim slightly under live canvas */
  opacity: 0.94;
}

.hero-fallback.is-visible {
  opacity: 0.94;
}

.hero-figure:hover .hero-fallback {
  transform: scale(1.06);
}

/* Gate widen signature */
.film-gate.is-wide {
  padding: 0.35rem 1.15rem;
  border-color: rgba(201, 191, 168, 0.42);
  box-shadow: 0 0 0 1px rgba(201, 191, 168, 0.12), 0 20px 60px rgba(0, 0, 0, 0.35);
}

.film-gate.is-wide .gate-mark {
  opacity: 0.9;
  width: 18px;
  height: 18px;
}

body.gate-open .film-vignette {
  background:
    radial-gradient(ellipse at center, transparent 28%, rgba(13, 13, 11, 0.35) 100%),
    linear-gradient(180deg, rgba(201, 191, 168, 0.08) 0%, transparent 35%, transparent 70%, rgba(13, 13, 11, 0.4) 100%);
}

.film-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(13, 13, 11, 0.55) 100%),
    linear-gradient(180deg, rgba(13, 13, 11, 0.15) 0%, transparent 30%, transparent 70%, rgba(13, 13, 11, 0.35) 100%);
}

.gate-mark {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--parchment);
  border-style: solid;
  opacity: 0.55;
  pointer-events: none;
}

.gate-tl { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.gate-tr { top: 4px; right: 4px; border-width: 1px 1px 0 0; }
.gate-bl { bottom: 4px; left: 4px; border-width: 0 0 1px 1px; }
.gate-br { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--ease-out);
  position: relative;
  will-change: transform;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-primary:hover {
  background: #c40510;
  color: #fff;
  border-color: #c40510;
}

.btn-ghost {
  background: rgba(245, 240, 232, 0.03);
  color: var(--text);
  border-color: var(--line);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  border-color: var(--parchment);
  color: var(--text);
}

/* Sections */

.section {
  padding: var(--section) 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
  max-width: 38rem;
}

.spatial-head {
  position: relative;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.75rem;
}

.overlap-title {
  position: relative;
  margin-bottom: 0.85rem;
  line-height: 1;
}

.overlap-back {
  display: block;
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  color: rgba(245, 240, 232, 0.06);
  text-transform: lowercase;
  line-height: 0.9;
  user-select: none;
  pointer-events: none;
}

.overlap-front {
  display: block;
  margin-top: -0.55em;
  margin-left: 0.15em;
  font-size: clamp(1.85rem, 4.2vw, 2.65rem);
  color: var(--text);
  position: relative;
  z-index: 1;
}

.section-lede {
  color: var(--muted);
  margin-top: 0.85rem;
}

/* Studies — asymmetric + 3D hover */

.study-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  perspective: 1200px;
}

.study-card {
  grid-column: span 4;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
  cursor: pointer;
}

.study-card:focus-visible {
  outline: 1px solid var(--parchment);
  outline-offset: 3px;
}

.study-card:nth-child(1) {
  margin-top: 0;
}

.study-card:nth-child(2) {
  margin-top: clamp(1.5rem, 4vw, 3.5rem);
}

.study-card:nth-child(3) {
  margin-top: clamp(0.5rem, 2vw, 1.5rem);
}

.study-card:hover {
  border-color: rgba(201, 191, 168, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.study-media {
  position: relative;
  overflow: hidden;
  background: #111;
}

.study-img-wrap {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.study-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.7s var(--ease-out);
  will-change: transform;
}

.study-card:hover .study-img-wrap img {
  transform: scale(1.12);
}

.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  background: var(--bg-glass);
  color: var(--parchment);
  border: 1px solid rgba(245, 240, 232, 0.18);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 0.4rem 0.55rem;
}

.study-body {
  padding: 1.25rem 1.15rem 1.4rem;
  transform: translateZ(20px);
}

.study-body p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Offer */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.offer-card {
  padding: 1.65rem 1.4rem;
  border: 1px solid var(--line);
  background: rgba(20, 20, 16, 0.35);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, transform 0.4s var(--ease-out);
}

.offer-card:hover {
  border-color: rgba(201, 191, 168, 0.28);
  transform: translateY(-4px);
}

.offer-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Process */

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.process-list li {
  border-top: 1px solid var(--line);
  padding-top: 1.35rem;
  display: grid;
  gap: 0.75rem;
  transition: transform 0.4s var(--ease-out);
}

.process-list li:hover {
  transform: translateY(-3px);
}

.step-num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--red);
}

.process-list p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* FAQ */

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

.faq-list summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.15rem;
  list-style: none;
  color: var(--text);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details p {
  margin-top: 0.85rem;
  color: var(--muted);
  padding-right: 1.5rem;
}

/* Contact */

.contact-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
}

.contact-form label span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(20, 20, 16, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  padding: 0.75rem 0.85rem;
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid var(--parchment);
  outline-offset: 0;
  border-color: var(--parchment);
}

.contact-form textarea {
  resize: vertical;
  min-height: 7rem;
}

.contact-form .btn {
  justify-self: start;
  margin-top: 0.25rem;
}

.contact-note {
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

/* Footer */

.site-footer {
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
}

.footer-brand,
.footer-tag {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-brand a {
  color: var(--muted);
  text-decoration: none;
}

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

.footer-tag {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--parchment);
}

/* Scroll reveal */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px) translateZ(-40px);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0) translateZ(0);
}

/* Responsive */

@media (max-width: 960px) {
  .hero {
    min-height: 0;
    padding-top: clamp(2.5rem, 6vw, 4rem);
  }

  .hero-stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "figure"
      "copy"
      "aside";
    align-items: start;
  }

  .hero-figure {
    max-width: 28rem;
    justify-self: start;
  }

  .hero-aside {
    display: none;
  }

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

  .study-card {
    grid-column: span 1;
    margin-top: 0 !important;
  }

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

  .process-list {
    grid-template-columns: 1fr 1fr;
  }

  .overlap-back {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 13, 11, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--space) 1rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .cursor-glow {
    display: none;
  }
}



/* ---------- Study room (full-viewport spatial) ---------- */

.study-room {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}

.study-room[hidden] {
  display: none !important;
}

.study-room.is-open {
  opacity: 1;
  pointer-events: auto;
}

.study-room-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 6, 0.55);
  backdrop-filter: blur(18px) saturate(0.85);
  -webkit-backdrop-filter: blur(18px) saturate(0.85);
  cursor: pointer;
}

.study-room-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  transform: translateY(28px) scale(0.94) translateZ(-40px);
  opacity: 0;
  transition:
    transform 0.55s var(--ease-out),
    opacity 0.45s var(--ease-out);
  transform-style: preserve-3d;
  perspective: 1200px;
}

.study-room.is-open .study-room-stage {
  transform: translateY(0) scale(1) translateZ(0);
  opacity: 1;
}

.study-room.no-motion,
.study-room.no-motion .study-room-stage {
  transition: none !important;
}

.study-room-close {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: rgba(13, 13, 11, 0.72);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.study-room-close:hover {
  border-color: var(--parchment);
}

.study-room-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
}

.study-room-frame {
  position: relative;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(245, 240, 232, 0.16);
  aspect-ratio: 4 / 3;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.study-room-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.study-room-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(13, 13, 11, 0.5) 100%);
}

.study-room-copy {
  margin-top: 1.15rem;
  max-width: 36rem;
  padding: 0 0.15rem;
}

.study-room-copy h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.35rem;
}

.study-room-note {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

body.room-open {
  overflow: hidden;
}

body.room-open .site-header,
body.room-open main,
body.room-open .site-footer {
  filter: blur(2px);
  transition: filter 0.4s ease;
}

@media (max-width: 640px) {
  .study-room-stage {
    width: 100%;
  }
  .study-room-close {
    top: 0.35rem;
    right: 0.35rem;
  }
}

/* Reduced motion — pause shaders/parallax/reveal animation */

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

  #fx {
    display: none !important;
  }

  .cursor-glow {
    display: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .title-layer,
  .hero-figure,
  .study-card,
  .study-img-wrap img,
  .film-gate-inner img,
  .btn,
  .offer-card,
  .process-list li {
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  .hero-figure:hover .film-gate-inner img,
  .hero-figure:hover .hero-fallback,
  .study-card:hover .study-img-wrap img {
    transform: none !important;
  }

  .hero-instrument {
    display: none !important;
  }

  .hero-fallback,
  .hero-fallback.is-underlay {
    opacity: 0.94 !important;
    position: relative !important;
  }

  .film-gate.is-wide {
    padding: 0.65rem !important;
    box-shadow: none !important;
  }

  .study-room,
  .study-room-stage {
    transition: none !important;
  }

  body.room-open .site-header,
  body.room-open main,
  body.room-open .site-footer {
    filter: none !important;
  }

  .title-b {
    mix-blend-mode: normal;
    text-shadow: none;
  }
}
