@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@300;700&family=Space+Mono&display=swap');

@font-face {
  font-family: 'Sligoil Micro';
  src: url('../fonts/Sligoil-Micro.woff2') format('woff2'),
       url('../fonts/Sligoil-Micro.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Sligoil Micro';
  src: url('../fonts/Sligoil-MicroMedium.woff2') format('woff2'),
       url('../fonts/Sligoil-MicroMedium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Sligoil Micro';
  src: url('../fonts/Sligoil-MicroBold.woff2') format('woff2'),
       url('../fonts/Sligoil-MicroBold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Velvelyne';
  src: url('../fonts/Velvelyne-Book.woff2') format('woff2'),
       url('../fonts/Velvelyne-Book.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

:root {
  --color-alt-1: #ffb7c5;
  --color-alt-2: #29b8e8;
  --color-alt-3: #e1cf54;
  --color-bg: #000488;
  --color-bg-shadow: #00004080;
  --color-bg-dark: #00007b;
}

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

body {
  background: var(--color-bg);
  color: #fff;
  font-family: 'Sligoil Micro', 'Space Mono', monospace;
  font-weight: 400;
  overflow-x: hidden;
}

#root { position: relative; }

/* Tweak: controls how far down the about section starts (= video scrub distance) */
#scrollSpacer { height: 200vh; }

.color-alt   { color: var(--color-alt-1); }
.color-alt-1 { color: var(--color-alt-1); }
.color-alt-2 { color: var(--color-alt-2); }

#aboutTracker {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
}

#principlesTracker {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
}

.fixed-layer {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
  will-change: height, transform;
  position: relative;
  z-index: 2;
}

.tagline-area {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
  z-index: 2;
}

.tagline-area--bottom {
  bottom: 0;
  height: 15vh;
}

.tagline-divider {
  position: absolute;
  bottom: -120px;
  left: 0;
  right: 0;
  height: 1px;
  background: #fff;
  opacity: 0;
  will-change: opacity, transform;
  display: none;
}

.tagline-area p {
  font-family: 'Sligoil Micro', 'Albert Sans', sans-serif;
  font-size: clamp(15px, 3.8vw, 20px);
  font-weight: 300;
  letter-spacing: 1px;
  text-align: center;
}

.tagline-craft { font-weight: 700; }
.tagline-code  { font-weight: 700; }

.tagline-bg {
  padding: 0.5em 1em;
  border-radius: 1em;
  background-color: rgba(0, 3, 80, var(--tagline-bg-alpha, 1));
}

@keyframes taglineRise {
  from { transform: translateY(18px); }
  to   { transform: translateY(0); }
}

.tagline-area p.rising {
  animation: taglineRise 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.logo-area img {
  display: block;
  width: auto;
  height: auto;
  max-height: 75%;
  max-width: 96%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px var(--color-bg-shadow));
}

.frame-area {
  position: absolute;
  left: 0;
  right: 0;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.frame-area video {
  display: block;
  width: auto;
  height: 50vh;
  object-fit: cover;
}

.frame-area img {
  display: block;
  width: auto;
  height: 100%;
}

.scroll-hint {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
  will-change: opacity;
}

.scroll-hint span {
  font-family: 'Velvelyne', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 300;
  opacity: 0.5;
  background-color: var(--color-alt-1);
  color: darkblue;
  padding: 0.6em 1em 0.4em;
  border-radius: 1.75em;
}

.bts-progress {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bts-progress.visible { opacity: 0.85; }

.bts-progress span,
#btsProgressNote {
  font-family: 'Velvelyne', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 300;
  opacity: 0.5;
  background-color: var(--color-alt-1);
  color: darkblue;
  padding: 0.6em 1em 0.4em;
  border-radius: 1.75em;
}

#btsProgressNote {
  position: fixed;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  background-color: rgb(0, 3, 80);
  color: white;
  text-transform: none;
  width: fit-content;
  max-width: 100vw;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 700px) {
  #btsProgressNote {
    width: calc(100vw - 48px);
  }
}

.bts-progress span a,
#btsProgressNote a {
  color: white;
  text-decoration: underline;
  text-decoration-color: white;
  pointer-events: all;
}

.scroll-hint .arrow {
  width: 16px;
  height: 28px;
  animation: bob 2s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-hint .arrow span { display: none; }

.scroll-hint .arrow::before {
  content: '';
  width: 2px;
  flex: 1;
  background: white;
  opacity: 0.7;
}

.scroll-hint .arrow::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid white;
  opacity: 0.7;
}

@keyframes bob {
  0%, 100% { transform: translateY(0);    opacity: 0.6; }
  50%       { transform: translateY(4px); opacity: 1.0; }
}

/* About section */
.about-section {
  position: relative;
  z-index: 2;
  padding: 0 20px 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  min-height: 75vh;
}

.about-inner {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  position: relative;
}

.about-content {
  max-width: 1100px;
  width: 100%;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-text {
  font-size: 32px;
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.9;
  text-align: center;
}

.about-text p          { margin-bottom: 1.2em; }
.about-text p:last-child { margin-bottom: 0; }

/* Pin slot — empty spacer the floating pin badge lands in, above the about text */
.pin-slot {
  flex-shrink: 0;
  width: 266px;
  height: 240px;
}

/* Pin badge — fixed position, parallaxes into place */
.pin-floating {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.pin-floating.visible { opacity: 1; }

.pin-floating img {
  width: 266px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 30px var(--color-bg-shadow));
}

@media (max-width: 700px) {
  .about-text        { font-size: 22px; }
  .pin-floating img  { width: 160px; }
  .pin-slot          { height: 140px; }
}

/* Principles section */
.principles-section {
  position: relative;
  z-index: 2;
  padding: 240px 20px;
  display: flex;
  justify-content: center;
}

.principles-content {
  max-width: 1100px;
  width: 100%;
}

.principle-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 60px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.principle-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.principle-divider {
  width: 2px;
  align-self: stretch;
}

.principle-row:nth-child(1) .principle-divider { background: var(--color-alt-3); }
.principle-row:nth-child(2) .principle-divider { background: var(--color-alt-1); }
.principle-row:nth-child(3) .principle-divider { background: var(--color-alt-2); }

.principle-media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.principle-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.principle-media .pixel-icon {
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  filter: invert(1);
  object-fit: unset;
}

.principle-text h3 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 0 0 20px;
}

.principle-text p {
  font-family: 'Velvelyne', sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.7;
  margin: 0;
}

.principle-text a {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .principle-row {
    grid-template-columns: 1fr;
    gap: 30px;
    justify-items: center;
    text-align: center;
  }
  .principle-text h3 { font-size: 22px; }
  .principle-divider { display: none; }
}

/* Section image */
.section-image {
  width: 100%;
  max-width: 1400px;
  overflow: hidden;
  position: relative;
}

.section-image img,
.section-image video {
  display: block;
  width: 100%;
  height: auto;
}

/* Workflows section */
.workflows-section {
  position: relative;
  z-index: 2;
}

.workflows-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 20px;
}

@media (max-width: 700px) {
  .workflows-sticky { padding: 0; }
  .section-image    { max-width: none; }
}

/* Contact section */
.contact-section {
  position: relative;
  z-index: 2;
  background: #fff;
  color: var(--color-bg);
  padding: 200px 20px 180px;
  display: flex;
  justify-content: center;
}

.contact-content {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contact-image { display: none; }

.contact-image img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.contact-text {
  font-size: 32px;
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 30px;
  max-width: 600px;
}

.contact-link {
  display: inline-block;
  font-size: 32px;
  font-weight: 400;
  color: var(--color-bg);
  text-decoration: underline;
  text-decoration-color: var(--color-alt-1);
  letter-spacing: 1px;
  margin-bottom: 16px;
  max-width: 100%;
  overflow: hidden;
  vertical-align: middle;
}

.contact-link:hover { opacity: 0.7; }

@media (max-width: 700px) {
  .contact-content { grid-template-columns: 1fr; text-align: center; }
  .contact-text    { font-size: 22px; }
  .contact-link    { font-size: 22px; }
  .contact-emoji   { display: block; margin-top: 12px; }
}

.typing::after {
  content: '|';
  margin-left: 2px;
  animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

.contact-emoji {
  font-size: 2em;
  vertical-align: middle;
  position: relative;
  top: -0.25em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s;
}

.loading-overlay.hidden { opacity: 0; pointer-events: none; }

.loading-text {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.7;
}

.loading-bar-bg {
  width: 240px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  border-radius: 3px;
  transition: width 0.08s linear;
}

/* Footer */
.site-footer {
  background: white;
  border-top: 3px solid var(--color-alt-1);
  color: darkblue;
  padding: 16px 32px;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

.footer-col--center { text-align: center; }
.footer-col--right  { text-align: right; }

.site-footer p {
  font-family: 'Velvelyne', sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

.credits-toggle {
  font-family: 'Velvelyne', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: darkblue;
  text-decoration: underline;
  text-decoration-color: var(--color-alt-1);
}

.credits-toggle:hover { opacity: 0.6; }

.credits-section {
  background: var(--color-alt-1);
  color: var(--color-bg);
  padding: 48px 32px;
  position: relative;
  z-index: 2;
}

.credits-content {}

.credits-content h2 {
  font-family: 'Velvelyne', sans-serif;
  font-size: 24px;
  margin-bottom: 20px;
}

.credits-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.credits-content li {
  font-family: 'Velvelyne', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-bg);
}

.credits-content li:last-child { border-bottom: none; }

@media (max-width: 700px) {
  .about-section      { padding: 0 20px 84px; }
  .principles-section { padding: 168px 20px; }
  .principle-row      { padding: 42px 0; }
  .contact-section    { padding: 140px 20px 126px; }
  .footer-content     { grid-template-columns: 1fr 1fr; }
  .footer-col--center { display: none; }
  .credits-section    { padding: 40px 20px; }
}
