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

html { font-size: 16px; }

body {
  background: #1A1A1A;
  overflow: hidden;
  font-family: 'Zalando Sans SemiExpanded', sans-serif;
  color: #E0E0E0;
}

#site {
  width: 100vw;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Cinematic fade overlay */
#overlay {
  position: fixed;
  inset: 0;
  background: #1A1A1A;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
}

.panel {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1A1A1A;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.scrim {
  position: absolute;
  inset: 0;
  background: rgba(26,26,26,0.52);
  z-index: 1;
  pointer-events: none;
}

.content {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: url(#grain-filter);
  background: white;
  opacity: 0.04;
  z-index: 10;
}

/* Animation base state — hidden */
.anim {
  opacity: 0;
  transform: translateY(16px);
}

.anim.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.85s cubic-bezier(0.16,1,0.3,1),
              transform 0.85s cubic-bezier(0.16,1,0.3,1);
}

/* Panel fade in when active — no overlay needed */
.panel {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1A1A1A;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.panel.active {
  opacity: 1;
}

/* Rules and dividers */
.top-rule {
  position: absolute;
  top: 80px;
  left: 80px;
  right: 80px;
  height: 1px;
  background: #353A3E;
  transform-origin: left;
  transform: scaleX(0) !important;
  transition: transform 0.9s ease !important;
}

.panel.active .top-rule {
  transform: scaleX(1) !important;
}

.rule-h {
  height: 1px;
  background: #353A3E;
  transform-origin: left;
  transform: scaleX(0) !important;
  transition: transform 0.8s ease 0.4s !important;
}

.panel.active .rule-h {
  transform: scaleX(1) !important;
}

.col-divider {
  width: 1px;
  background: #353A3E;
  align-self: stretch;
  transform-origin: top;
  transform: scaleY(0) !important;
  transition: transform 1.0s ease 0.2s !important;
  opacity: 1 !important;
}

.panel.active .col-divider {
  transform: scaleY(1) !important;
}

/* Section labels */
.sec-label {
  position: absolute;
  top: 40px;
  left: 80px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: #353A3E;
  text-transform: uppercase;
  transition-delay: 0.1s;
}

.timecode {
  position: absolute;
  top: 40px;
  right: 80px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #353A3E;
  text-transform: uppercase;
  transition-delay: 0.1s;
}

.corner-br {
  position: absolute;
  bottom: 40px;
  right: 80px;
  width: 16px;
  height: 16px;
  border-bottom: 1px solid #353A3E;
  border-right: 1px solid #353A3E;
  transition-delay: 0.15s;
}

/* Copy lines */
.copy-line {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #BFBFBF;
  line-height: 1.4;
  transition-delay: 0.5s;
}

#manifesto-c2 { transition-delay: 0.65s; }

/* Capabilities columns */
.cap-col {
  flex: 1;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition-delay: 0.35s;
}
#cap-col1 { padding-left: 0; transition-delay: 0.3s; }
#cap-col3 { padding-right: 0; transition-delay: 0.5s; }

.col-num {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: #BFBFBF;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.col-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #E0E0E0;
  line-height: 1.05;
  margin-bottom: 18px;
}

.col-rule {
  width: 40px;
  height: 1px;
  background: #BFBFBF;
  margin-bottom: 14px;
}

.col-desc {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #BFBFBF;
  line-height: 1.6;
}

/* Work grid */
.work-title {
  position: absolute;
  top: 56px;
  left: 80px;
  font-size: 68px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #E0E0E0;
  line-height: 1;
  transition-delay: 0.1s;
}

#work-grid {
  position: absolute;
  top: 160px;
  left: 80px;
  right: 80px;
  bottom: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.card {
  background: #222526;
  border: 1px solid #353A3E;
  position: relative;
  overflow: hidden;
}

#wc1 { grid-column: 1; grid-row: 1 / 3; }
#wc2 { grid-column: 2; grid-row: 1; }
#wc3 { grid-column: 3; grid-row: 1; }
#wc4 { grid-column: 2; grid-row: 2; }
#wc5 { grid-column: 3; grid-row: 2; }

.card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(26,26,26,0.85), transparent);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #BFBFBF;
  text-transform: uppercase;
}

/* Process */
.proc-headline {
  position: absolute;
  top: 100px;
  left: 80px;
  font-size: 76px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #E0E0E0;
  line-height: 1;
  transition-delay: 0.1s;
}

.step {
  display: flex;
  align-items: flex-start;
  padding: 22px 80px;
  border-top: 1px solid #353A3E;
  gap: 56px;
}

.step-num {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: #BFBFBF;
  text-transform: uppercase;
  min-width: 56px;
  padding-top: 4px;
}

.step-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #E0E0E0;
  min-width: 260px;
  line-height: 1.05;
}

.step-desc {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #BFBFBF;
  line-height: 1.55;
  max-width: 540px;
  padding-top: 5px;
}

/* Studio */
.studio-left {
  width: 50%;
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition-delay: 0.2s;
}

.studio-right {
  width: 50%;
  padding: 60px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition-delay: 0.35s;
}

#aperture-canvas {
  display: block;
  width: 100%;
  height: 480px;
  border: 1px solid #353A3E;
}

/* Contact */
.contact-eyebrow {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: #BFBFBF;
  text-transform: uppercase;
  transition-delay: 0.1s;
  margin-right: -0.18em;
  white-space: nowrap;
}

.contact-cta {
  font-size: 88px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #E0E0E0;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #BFBFBF;
  transition-delay: 0.5s;
}

.contact-info .sep { color: #353A3E; font-size: 14px; }

.contact-wordmark {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: #353A3E;
  text-transform: uppercase;
  white-space: nowrap;
  transition-delay: 0.6s;
}

/* Scroll hint */
#scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transition: opacity 1s ease 2.5s;
}

.panel.active #scroll-hint {
  opacity: 1;
}

.scroll-text {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: #E0E0E0;
  text-transform: uppercase;
  margin-right: -0.35em;
}

.scroll-line {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, #E0E0E0, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%   { opacity: 0; transform: scaleY(0.3) translateY(-8px); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: scaleY(1) translateY(4px); }
}

/* Fix cursor */
#site { cursor: default; }

/* Contact Modal */
#contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.97);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  backdrop-filter: blur(8px);
}

#contact-modal.open {
  opacity: 1;
  pointer-events: all;
}

#contact-modal-inner {
  width: 100%;
  max-width: 720px;
  padding: 64px;
  position: relative;
  transform: translateY(24px);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

#contact-modal.open #contact-modal-inner {
  transform: translateY(0);
}

#modal-close {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: #353A3E;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  transition: color 0.2s ease;
}

#modal-close:hover { color: #E0E0E0; }

#modal-title {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #E0E0E0;
  line-height: 1;
  margin-bottom: 14px;
}

#modal-sub {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #BFBFBF;
  margin-bottom: 48px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.form-row .form-group { margin-bottom: 0; }

.form-group label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: #353A3E;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid #353A3E;
  color: #E0E0E0;
  font-family: 'Zalando Sans SemiExpanded', sans-serif;
  font-size: 17px;
  font-weight: 300;
  padding: 12px 0;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #353A3E;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: #BFBFBF;
}

.form-group select option {
  background: #1A1A1A;
  color: #E0E0E0;
}

.form-group textarea {
  resize: none;
}

#modal-submit {
  background: #E0E0E0;
  border: none;
  color: #1A1A1A;
  font-family: 'Zalando Sans SemiExpanded', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 18px 48px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

#modal-submit:hover {
  background: #BFBFBF;
}

#form-success {
  padding: 48px 0;
  text-align: center;
}

#form-success p:first-child {
  font-size: 36px;
  font-weight: 700;
  color: #E0E0E0;
  margin-bottom: 12px;
}

#form-success p:last-child {
  font-size: 18px;
  font-weight: 300;
  color: #BFBFBF;
}

#modal-contact-line {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #222526;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #353A3E;
}

.modal-sep { color: #222526; }

/* Audio toggle */
#audio-toggle {
  position: fixed;
  bottom: 32px;
  left: 40px;
  z-index: 100;
  background: none;
  border: 1px solid #BFBFBF;
  color: #BFBFBF;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  padding: 8px 14px;
  cursor: pointer;
  font-family: 'Zalando Sans SemiExpanded', sans-serif;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease;
}
#audio-toggle:hover {
  color: #E0E0E0;
  border-color: #E0E0E0;
}

/* Entry gate */
#entry-gate {
  position: fixed;
  inset: 0;
  background: #1A1A1A url(FRAIM_WEBSITE_ASSETS/entry_bg.png) center center / cover no-repeat;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.2s cubic-bezier(0.16,1,0.3,1);
}

#entry-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26,26,26,0.72);
  z-index: 0;
}

#entry-inner {
  position: relative;
  z-index: 1;
}

#entry-gate.hidden {
  opacity: 0;
  pointer-events: none;
}

#entry-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#entry-logo {
  width: 280px;
  height: auto;
  opacity: 0;
  animation: entryFade 1.4s cubic-bezier(0.16,1,0.3,1) 0.3s forwards;
}

#entry-line {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: #E0E0E0;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: -0.3em;
  margin-top: 48px;
  opacity: 0;
  animation: entryFade 1.4s cubic-bezier(0.16,1,0.3,1) 0.7s forwards;
}

#entry-btn {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  animation: entryFade 1.4s cubic-bezier(0.16,1,0.3,1) 1.4s forwards;
}

#entry-btn:hover .entry-btn-text { color: #E0E0E0; }

.entry-btn-text {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: #E0E0E0;
  text-transform: uppercase;
  margin-right: -0.35em;
  font-family: 'Zalando Sans SemiExpanded', sans-serif;
}

.entry-btn-line {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, #E0E0E0, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes entryFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#entry-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  opacity: 0;
  animation: entryFadeCentered 1.4s cubic-bezier(0.16,1,0.3,1) 1.4s forwards;
}

.entry-scroll-text {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: #E0E0E0;
  text-transform: uppercase;
  margin-right: -0.35em;
  font-family: 'Zalando Sans SemiExpanded', sans-serif;
}

.entry-scroll-line {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, #E0E0E0, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* Cinematic section transition overlay */
#transition-overlay {
  position: fixed;
  inset: 0;
  background: #1A1A1A;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#transition-overlay.fade-in {
  opacity: 1;
}

/* Cinematic panel entry */
@keyframes panelEntry {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes videoEntry {
  0%   { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes scrimFlash {
  0%   { background: rgba(26,26,26,0.82); }
  40%  { background: rgba(26,26,26,0.62); }
  100% { background: rgba(26,26,26,0.52); }
}

.panel.active {
  animation: panelEntry 0.55s cubic-bezier(0.16,1,0.3,1) forwards;
}

.panel.active .bg-video {
  animation: videoEntry 1.4s cubic-bezier(0.16,1,0.3,1) forwards;
}

.panel.active .scrim {
  animation: scrimFlash 1.2s cubic-bezier(0.16,1,0.3,1) forwards;
}

/* FIX 2026-06-12: entryFade keyframe was overriding translateX(-50%) on the Enter hint (forwards fill). Dedicated centered keyframe preserves X. */
@keyframes entryFadeCentered {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
