/* ============================================================
   KOTIA - HOME (THE CORRIDOR)
   ============================================================ */

/* ---------- WP-0+WP-2 MERGED: MASK OPENER + PROCESS SCRUB ---------- */

.hero { position: relative; height: 480vh; }
.hero-pin {
  position: sticky; top: 0; height: 100dvh;
  overflow: hidden;
}

.hero-media {
  position: absolute; inset: 0;
}
.hero-media video, .hero-media .media-placeholder {
  width: 100%; height: 100%; object-fit: cover;
}

/* Placeholder until Veo footage arrives: animated corridor gradient,
   three keyed variants so MOVED/CLEARED/STORED read as distinct chapters. */
.media-placeholder {
  background: linear-gradient(115deg, #1c2a2e 0%, #2c3438 34%, #4a4438 62%, #71583a 100%);
  position: relative;
  transition: background 0.6s var(--ease-inout);
}
.media-placeholder[data-chapter-bg="cleared"] {
  background: linear-gradient(115deg, #221c1a 0%, #3a2c26 34%, #4a3830 62%, #5a3f2a 100%);
}
.media-placeholder[data-chapter-bg="stored"] {
  background: linear-gradient(115deg, #171a1c 0%, #2a2d2e 34%, #3a3530 62%, #4a3e2c 100%);
}
.media-placeholder::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    100deg, transparent 0 120px,
    rgba(226, 219, 203, 0.05) 120px 122px
  );
  animation: roadDrift 14s linear infinite;
}
.media-placeholder::after {
  content: "PLACEHOLDER \2014 VEO FOOTAGE SLOT";
  position: absolute; right: 1.2rem; bottom: 1.2rem;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em;
  color: rgba(226, 219, 203, 0.5);
}
@keyframes roadDrift {
  to { transform: translateX(-244px); }
}

/* SVG text mask: video visible only through KOTIA letters, scale opens it */
.hero-mask {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}
.hero-mask-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-mask-svg .mask-bg { fill: var(--bg); transition: fill 0.4s var(--ease-inout); }
.hero-mask-svg text {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -0.01em;
}
/* Media container (videos later) */
.hero-media {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  background: var(--ink);
}
.chapter-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.chapter-video.active {
  opacity: 1;
}

.hero-scrim {
  position: absolute; inset: 0; z-index: 3;
  background: var(--scrim);
  opacity: 0;
}

/* Process label: small mono readout tracking which chapter is active,
   crossfades alongside the mask word so both always agree. */
.process-label {
  position: absolute; left: var(--pad-x); top: calc(var(--nav-h) + 1.6rem); z-index: 4;
  font-size: 11px; letter-spacing: 0.14em; color: var(--text-dim);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.process-label.in { opacity: 1; transform: none; }

.hero-mask-svg text[data-mask-word] {
  transition: opacity 0.35s var(--ease-inout);
}

.hero-copy {
  position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 12vh; z-index: 4;
  opacity: 0; transform: translateY(30px);
  max-width: 640px;
}
.hero-copy h1 {
  font-size: var(--text-hero); line-height: 0.98;
  color: var(--bone);
}
:root[data-theme="light"] .hero-copy h1 { color: var(--ink); }
.hero-copy p {
  margin: 1.4rem 0 2rem; font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--bone); opacity: 0.85; max-width: 46ch;
}
:root[data-theme="light"] .hero-copy p { color: var(--ink); }
.hero-ctas { display: flex; align-items: center; gap: 1.8rem; flex-wrap: wrap; }
.hero-copy .link-hairline { color: var(--bone); }
:root[data-theme="light"] .hero-copy .link-hairline { color: var(--ink); }

/* ---------- WP-1: TRUST STRIP ---------- */

.trust.marquee-section {
  overflow: hidden;
  white-space: nowrap;
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  display: flex;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: scroll-marquee 25s linear infinite;
  will-change: transform;
}
.marquee-track:hover {
  animation-play-state: paused;
}
.marquee-content {
  display: flex;
  align-items: center;
}
.marquee-content span {
  display: inline-block;
  margin-right: 0.75rem;
}
.trust-primary {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
  font-weight: 500;
}
.trust-secondary {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.marquee-sep {
  color: var(--accent);
  margin-left: 1.5rem;
  margin-right: 2.25rem !important;
  font-size: 1.2rem;
}
@keyframes scroll-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- WP-3: FLEET RAIL ---------- */

.fleet-rail-section {
  position: relative;
  background: var(--bg);
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.fleet-rail-section .wp-label {
  padding-top: 6rem;
  flex: 0 0 auto;
}
.fleet-track-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
}
.fleet-track {
  display: flex;
  gap: 3rem;
  will-change: transform;
}
.fleet-card {
  flex: 0 0 auto;
  width: 26vw;
  min-width: 320px;
  max-width: 460px;
}
.fleet-card.aspect-wide {
  width: 40vw;
  min-width: 480px;
  max-width: 720px;
}
.card-img {
  width: 100%;
  height: clamp(360px, 50vh, 560px);
  background: var(--bg-raised);
  overflow: hidden;
  border-radius: var(--radius);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-copy {
  margin-top: 1.5rem;
}
.card-copy h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--bone);
}
:root[data-theme="light"] .card-copy h3 { color: var(--ink); }
.card-copy p {
  color: var(--text-dim);
  font-size: 1rem;
}

/* ---------- WP-4: SERVICES SPLIT ---------- */

.services-split-section {
  display: flex;
  position: relative;
  border-top: 1px solid var(--line);
}
.services-sticky {
  flex: 0 0 50%;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.services-sticky .container {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.services-sticky-copy {
  margin-top: auto;
  margin-bottom: 20vh;
}
.services-sticky-copy h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.1;
  color: var(--bone);
}
:root[data-theme="light"] .services-sticky-copy h2 { color: var(--ink); }

.services-scroll {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
}
.service-card {
  display: block;
  padding: 4rem var(--pad-x);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.service-card .card-img {
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 4px;
  background: var(--bg-alt);
  overflow: hidden;
  margin-bottom: 2rem;
}
.service-card:hover .card-img img {
  transform: scale(1.05);
}
.service-card .card-img img {
  transition: transform 0.6s var(--ease-out);
}
.service-card h3 {
  font-size: 2rem;
  color: var(--bone);
  margin-bottom: 1rem;
}
:root[data-theme="light"] .service-card h3 { color: var(--ink); }

@media (max-width: 900px) {
  .services-split-section { flex-direction: column; }
  .services-sticky { flex: none; position: relative; height: auto; border-right: none; padding-bottom: 4rem; }
  .services-scroll { flex: none; }
}

/* ---------- WP-5: PROCESS ACCORDION ---------- */
.process-accordion-section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}
.accordion-wrapper {
  margin-top: 3rem;
  max-width: 800px;
}
.accordion-item {
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.accordion-item:hover {
  background-color: var(--bg-raised);
}
.accordion-header {
  width: 100%;
  background: none;
  border: none;
  padding: 1.8rem 1rem;
  font-size: 1.5rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--bone);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  text-align: left;
}
:root[data-theme="light"] .accordion-header { color: var(--ink); }
.accordion-icon {
  font-size: 1.2rem;
  color: var(--text-dim);
  transition: transform var(--dur-base) var(--ease-out);
}
.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
  color: var(--accent);
}
.accordion-panel {
  height: 0;
  overflow: hidden;
}
.accordion-content {
  padding: 0 1rem 1.8rem 1rem;
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ---------- WP-6: ARRIVAL (FORM) ---------- */
.arrival-section {
  position: relative;
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
#webgl-arrival {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.arrival-content-layer {
  position: relative;
  z-index: 1;
}
.arrival-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
}
.arrival-copy h2 {
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--bone);
}
:root[data-theme="light"] .arrival-copy h2 { color: var(--ink); }
.mono-note {
  margin-top: 2rem;
  color: var(--accent);
}
.glass-panel {
  background: rgba(10, 10, 13, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
:root[data-theme="light"] .glass-panel {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
.quote-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.quote-form input, .quote-form select, .quote-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
:root[data-theme="light"] .quote-form input, 
:root[data-theme="light"] .quote-form select, 
:root[data-theme="light"] .quote-form textarea {
  background: rgba(0, 0, 0, 0.02);
}
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: transparent;
}
.quote-form textarea {
  resize: vertical;
}
.form-submit {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  width: 100%;
}
@media (max-width: 900px) {
  .arrival-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
