@font-face {
  font-family: 'Areion';
  src: url('../Fonts/Areion-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --border:    #222222;
  --cream:     #e8e0d0;
  --cream-dim: #7a7060;
  --yellow:    #f5d742;
  --yellow-dim:#8a7818;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--cream);
  font-family: 'Montserrat', sans-serif;
  overflow: hidden;
}

/* SCANLINE */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 100;
}

/* NOISE */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 99;
  opacity: 0.4;
}

/* ── LAYOUT ── */
.site {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: row;
  z-index: 1;
  overflow: hidden;
}

/* ── STATUS BAR ── */
.status-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
  opacity: 0;
}

.status-left { display: flex; align-items: center; gap: 8px; }

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.status-label, .status-right {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--cream-dim);
  text-transform: uppercase;
}

.status-right { letter-spacing: 0.15em; }

/* ── CORNERS ── */
.corner {
  position: fixed;
  width: 20px; height: 20px;
  z-index: 10; opacity: 0;
}
.corner::before, .corner::after {
  content: '';
  position: absolute;
  background: var(--yellow);
}
.corner::before { width: 100%; height: 1px; top: 0; left: 0; }
.corner::after  { width: 1px; height: 100%; top: 0; left: 0; }
.corner-tl { top: 12px; left: 12px; }
.corner-tr { top: 12px; right: 12px; transform: scaleX(-1); }
.corner-bl { bottom: 12px; left: 12px; transform: scaleY(-1); }
.corner-br { bottom: 12px; right: 12px; transform: scale(-1); }

/* ── BOOT TERMINAL ── */
.boot-terminal {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 10vw;
  z-index: 50;
  background: var(--bg);
}

.boot-line {
  font-family: 'Space Mono', monospace;
  font-size: clamp(10px, 1.2vw, 13px);
  color: var(--cream-dim);
  line-height: 2;
  letter-spacing: 0.05em;
  opacity: 0;
}

.boot-line.yellow { color: var(--yellow); }
.boot-line.cream  { color: var(--cream); }

.cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--yellow);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── LEFT PANEL ── */
.left-panel {
  flex: 0 0 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 80px 60px 80px 72px;
}

.left-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--yellow);
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
}

.logo-wrap { position: relative; overflow: visible; }

.logo {
  font-family: 'Areion', sans-serif;
  font-size: clamp(64px, 9vw, 130px);
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: var(--cream);
  position: relative;
  z-index: 2;
  user-select: none;
}

.logo-glitch {
  position: absolute; inset: 0;
  font-family: 'Areion', sans-serif;
  font-size: clamp(64px, 9vw, 130px);
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: var(--yellow);
  z-index: 1; opacity: 0;
  pointer-events: none;
  clip-path: inset(40% 0 50% 0);
}

.logo-glitch-2 {
  position: absolute; inset: 0;
  font-family: 'Areion', sans-serif;
  font-size: clamp(64px, 9vw, 130px);
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: #3dd6c8;
  z-index: 1; opacity: 0;
  pointer-events: none;
  clip-path: inset(60% 0 20% 0);
}

/* Paired stops make transitions instant (< 1 frame at 60 fps) */
@keyframes glitch-a {
  /* silence */
  0%,
  4.51%, 6%,
  8.51%, 11.01%,
  40%, 43.51%, 45.51%,
  100%           { opacity: 0;    transform: translateX(0);     clip-path: inset(40% 0 50% 0); }
  /* burst 1 — 0–81ms, hard right shift, wide top slice */
  0.01%, 4.5%    { opacity: 1;    transform: translateX(10px);  clip-path: inset(28% 0 60% 0); }
  /* burst 2 — 108–153ms, hard left, lower slice */
  6.01%, 8.5%    { opacity: 0.85; transform: translateX(-12px); clip-path: inset(55% 0 30% 0); }
  /* stutter — 171–198ms, quick right flicker */
  9.51%, 11%     { opacity: 0.7;  transform: translateX(8px);   clip-path: inset(40% 0 50% 0); }
  /* mid-cycle burst — 720–783ms */
  40.01%, 43.5%  { opacity: 0.9;  transform: translateX(9px);   clip-path: inset(35% 0 52% 0); }
  /* mid-cycle follow-up — 783–819ms */
  43.52%, 45.5%  { opacity: 0.8;  transform: translateX(-7px);  clip-path: inset(48% 0 43% 0); }
}

@keyframes glitch-b {
  /* silence */
  0%,
  2%, 6.01%,
  7%, 9.21%,
  41.2%, 44.51%,
  100%           { opacity: 0;    transform: translateX(0);      clip-path: inset(60% 0 20% 0); }
  /* burst 1 — 36–108ms, offset from g1 */
  2.01%, 6%      { opacity: 1;    transform: translateX(-10px);  clip-path: inset(55% 0 25% 0); }
  /* burst 2 — 126–166ms */
  7.01%, 9.2%    { opacity: 0.8;  transform: translateX(9px);    clip-path: inset(65% 0 16% 0); }
  /* mid-cycle — 742–801ms */
  41.21%, 44.5%  { opacity: 0.9;  transform: translateX(-11px);  clip-path: inset(58% 0 24% 0); }
}

.logo-glitch.glitch-run   { animation: glitch-a 1800ms linear infinite; }
.logo-glitch-2.glitch-run { animation: glitch-b 1800ms linear infinite; }

.construction-wrap {
  margin-top: 36px;
  margin-bottom: 52px;
  opacity: 0;
}

.construction-title {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.45em;
  color: var(--yellow);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.construction-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cream-dim);
  font-weight: 300;
  text-transform: uppercase;
  max-width: 280px;
  line-height: 2;
}

.social-row {
  display: flex;
  gap: 28px;
  opacity: 0;
}

.social-link {
  color: var(--cream-dim);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s, transform 0.2s;
}

.social-link svg {
  width: 16px;
  height: 16px;
  display: block;
}

.social-link:hover {
  color: var(--yellow);
  transform: translateY(-2px);
}

/* ── PANEL DIVIDER ── */
.panel-divider {
  width: 1px;
  height: 100%;
  background: var(--border);
  flex-shrink: 0;
  opacity: 0;
}

/* ── RIGHT WRAP (holds fade masks, never scrolls) ── */
.right-wrap {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Vertical fade masks on desktop */
.right-wrap::before,
.right-wrap::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: 2;
}

.right-wrap::before {
  top: 0;
  height: 160px;
  background: linear-gradient(to bottom, var(--bg) 15%, transparent);
}

.right-wrap::after {
  bottom: 0;
  height: 160px;
  background: linear-gradient(to top, var(--bg) 15%, transparent);
}

/* ── RIGHT PANEL (scrollable viewport) ── */
.right-panel {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  opacity: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.right-panel::-webkit-scrollbar { display: none; }

/* ── MARQUEE TRACK ── */
.marquee-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0 80px;
}

/* ── MARQUEE ITEMS ── */
.marquee-item {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: -55px;
}

.marquee-item a {
  display: flex;
  justify-content: center;
  width: 100%;
  cursor: pointer;
}

.marquee-item img {
  width: 72%;
  max-width: 480px;
  display: block;
  box-shadow:
    0 16px 50px rgba(0,0,0,0.85),
    0 3px 12px rgba(0,0,0,0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.marquee-item a:hover img {
  box-shadow:
    0 24px 60px rgba(0,0,0,0.9),
    0 6px 20px rgba(0,0,0,0.6);
  filter: brightness(1.08);
}

/* Tilt — repeats every 12 items to match the 12-image set */
.marquee-item:nth-child(12n+1)  { transform: rotate(-2deg);   }
.marquee-item:nth-child(12n+2)  { transform: rotate( 1.8deg); }
.marquee-item:nth-child(12n+3)  { transform: rotate(-1.3deg); }
.marquee-item:nth-child(12n+4)  { transform: rotate( 2.4deg); }
.marquee-item:nth-child(12n+5)  { transform: rotate(-0.9deg); }
.marquee-item:nth-child(12n+6)  { transform: rotate( 1.6deg); }
.marquee-item:nth-child(12n+7)  { transform: rotate(-2.1deg); }
.marquee-item:nth-child(12n+8)  { transform: rotate( 0.8deg); }
.marquee-item:nth-child(12n+9)  { transform: rotate(-1.5deg); }
.marquee-item:nth-child(12n+10) { transform: rotate( 2.2deg); }
.marquee-item:nth-child(12n+11) { transform: rotate(-1.1deg); }
.marquee-item:nth-child(12n+12) { transform: rotate( 1.4deg); }

/* ── BOTTOM BAR ── */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
  opacity: 0;
}

.bottom-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--cream-dim);
  text-transform: uppercase;
}

.bottom-label span { color: var(--yellow); }

/* ── RESPONSIVE: TABLET ── */
@media (max-width: 900px) {
  .left-panel { padding: 80px 40px 80px 48px; }
}

/* ── RESPONSIVE: MOBILE ── */
@media (max-width: 768px) {

  /* Stack vertically; leave room for fixed bars */
  .site {
    flex-direction: column;
    padding-top: 50px;
    padding-bottom: 52px;
  }

  /* Left panel: shrinks to content height so gallery follows social links */
  .left-panel {
    flex: 0 0 auto;
    height: auto;
    padding: 24px 48px 20px;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
  }

  .left-content {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .logo-wrap {
    max-width: 100%;
    overflow: hidden;
  }

  .construction-sub {
    text-align: center;
    max-width: none;
  }

  .logo { font-size: clamp(44px, 12vw, 72px); }
  .logo-glitch  { font-size: clamp(44px, 12vw, 72px); }
  .logo-glitch-2 { font-size: clamp(44px, 12vw, 72px); }

  /* Divider becomes horizontal */
  .panel-divider {
    width: calc(100% - 96px);
    height: 1px;
    margin: 0 48px;
  }

  /* Right wrap: fixed-height strip at bottom */
  .right-wrap {
    flex: 0 0 200px;
    height: 200px;
  }

  /* Swap fade masks to left / right edges */
  .right-wrap::before {
    top: 0; bottom: 0; right: auto;
    width: 56px; height: 100%;
    background: linear-gradient(to right, var(--bg) 20%, transparent);
  }

  .right-wrap::after {
    top: 0; bottom: auto; right: 0; left: auto;
    width: 56px; height: 100%;
    background: linear-gradient(to left, var(--bg) 20%, transparent);
  }

  .right-panel {
    overflow: hidden;
    touch-action: none;
    cursor: grab;
  }

  .right-panel:active {
    cursor: grabbing;
  }

  /* Row layout for images */
  .marquee-track {
    flex-direction: row;
    align-items: center;
    padding: 20px 0;
    width: max-content;
    height: 100%;
    touch-action: none;
    user-select: none;
  }

  /* Horizontal items */
  .marquee-item {
    width: auto;
    height: 100%;
    margin-bottom: 0;
    margin-right: -24px;
    padding: 0;
    align-items: center;
    touch-action: none;
  }

  /* Undo the desktop anchor flex-width so the item can size itself by image content */
  .marquee-item a {
    width: auto;
    display: block;
    touch-action: none;
    -webkit-user-drag: none;
    user-select: none;
  }

  .marquee-item img {
    width: auto;
    max-width: none;
    height: 160px;
    touch-action: none;
    -webkit-user-drag: none;
    pointer-events: none;
  }

  /* Reduce tilt for horizontal layout */
  .marquee-item:nth-child(11n+1)  { transform: rotate(-1.5deg); }
  .marquee-item:nth-child(11n+2)  { transform: rotate( 1.2deg); }
  .marquee-item:nth-child(11n+3)  { transform: rotate(-1deg);   }
  .marquee-item:nth-child(11n+4)  { transform: rotate( 1.8deg); }
  .marquee-item:nth-child(11n+5)  { transform: rotate(-0.7deg); }
  .marquee-item:nth-child(11n+6)  { transform: rotate( 1.3deg); }
  .marquee-item:nth-child(11n+7)  { transform: rotate(-1.6deg); }
  .marquee-item:nth-child(11n+8)  { transform: rotate( 0.6deg); }
  .marquee-item:nth-child(11n+9)  { transform: rotate(-1.2deg); }
  .marquee-item:nth-child(11n+10) { transform: rotate( 1.7deg); }
  .marquee-item:nth-child(11n+11) { transform: rotate(-0.9deg); }
  .marquee-item:nth-child(11n+12) { transform: rotate( 1.9deg); }

}

/* ── MOBILE SMALL ── */
@media (max-width: 480px) {
  .status-bar { padding: 12px 16px; }
  .bottom-bar { padding: 12px 16px; flex-direction: column; gap: 6px; align-items: flex-start; }
  .corner { display: none; }
  .social-row { gap: 18px; }
  .right-wrap { flex: 0 0 180px; height: 180px; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .logo-glitch, .logo-glitch-2 { display: none; }
  .status-dot { animation: none; }
  .cursor { animation: none; }
  .marquee-track.auto-scroll { animation: none; }
}
