/* ================================================================
   Smittylabs — style.css
   ================================================================ */

/* ---- Oblik display font -------------------------------------- */
@font-face {
  font-family: 'Oblik';
  src: url('oblik (1)/Oblik/Oblik_Bold.otf') format('opentype');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ------------------------------------------- */
:root {
  /* Backgrounds */
  --bg:       oklch(98.5% 0.004 252);
  --bg-alt:   oklch(96.5% 0.006 252);
  --dark:     oklch(8%    0.016 252);
  --dark-2:   oklch(13%   0.018 252);

  /* Text */
  --text:     oklch(11%   0.012 252);
  --text-2:   oklch(46%   0.008 252);
  --text-3:   oklch(68%   0.006 252);
  --text-inv: oklch(96%   0.005 252);
  --text-inv-2: oklch(62% 0.010 252);

  /* Surfaces */
  --card-shadow: 0 28px 72px oklch(0% 0 0 / 0.55), 0 6px 18px oklch(0% 0 0 / 0.28);

  /* Type — SF Pro on Apple, Segoe UI on Windows, system fallback elsewhere */
  --font-display: 'Oblik', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.55, 0, 1, 0.45);
}

/* ---- Reset & base -------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ---- Navigation ---------------------------------------------- */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 44px;
  transition:
    background 0.45s var(--ease-out),
    border-bottom 0.45s var(--ease-out),
    padding 0.3s var(--ease-out),
    backdrop-filter 0.45s var(--ease-out);
}

#site-nav.scrolled {
  background: oklch(8% 0.016 252 / 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid oklch(100% 0 0 / 0.07);
  padding: 14px 44px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-inv);
  transition: opacity 0.2s;
}

.wordmark:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-inv-2);
  transition: color 0.2s;
}

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

/* ---- Hero ---------------------------------------------------- */
#hero {
  position: relative;
  min-height: 100vh;
  background: var(--dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  animation: heroFadeIn 2.8s ease-out 0.3s forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 0.72; }
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    oklch(8% 0.016 252 / 0.38) 0%,
    oklch(8% 0.016 252 / 0.62) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-text-wrap {
  position: relative;
  z-index: 4;
  width: 100%;
  text-align: center;
  padding: 130px 0 100px;
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-inv-2);
  margin-bottom: 36px;
}

/* ---- Ticker / marquee ---------------------------------------- */
.ticker-wrap {
  overflow: hidden;
  width: 100%;
  margin-bottom: 44px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker 20s linear infinite;
  will-change: transform;
}

.ticker-span {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(52px, 6.8vw, 116px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.ticker-a { color: oklch(96% 0.005 252); }
.ticker-b { color: oklch(48% 0.008 252); }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hero-sub {
  display: inline-block;
  font-size: clamp(15px, 1.4vw, 17.5px);
  font-weight: 300;
  color: var(--text-inv-2);
  white-space: nowrap;
  margin: 0 0 44px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), opacity 0.18s;
  white-space: nowrap;
  border: none;
  outline: none;
}

.btn:hover {
  transform: scale(1.035);
}

.btn:active {
  transform: scale(0.975);
}

.btn-primary {
  background: var(--text-inv);
  color: var(--dark);
}

.btn-outline {
  background: transparent;
  color: var(--text-inv);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.22);
}

.btn-outline:hover {
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.5);
}

/* ---- Scanner Card Stream ------------------------------------- */
#scanner-stream {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: var(--dark);
  display: flex;
  align-items: center;
  border-top: 1px solid oklch(100% 0 0 / 0.05);
  border-bottom: 1px solid oklch(100% 0 0 / 0.05);
}

.stream-scan-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.stream-scan-line {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 280px;
  background: linear-gradient(to bottom, transparent 0%, #00ff41 30%, #00ff41 70%, transparent 100%);
  border-radius: 99px;
  z-index: 20;
  pointer-events: none;
  opacity: 0.35;
  transition: opacity 0.35s ease, box-shadow 0.35s ease;
  animation: scanPulse 2s ease-in-out infinite alternate;
}

@keyframes scanPulse {
  0%   { transform: translate(-50%, -50%) scaleY(1); }
  100% { transform: translate(-50%, -50%) scaleY(1.04); }
}

.stream-belt {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
  will-change: transform;
  z-index: 10;
  padding: 0 40px;
}

.stream-belt:active { cursor: grabbing; }

.stream-card {
  position: relative;
  width: 400px;
  height: 225px;
  flex-shrink: 0;
}

.stream-card-img {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 16px 48px oklch(0% 0 0 / 0.55);
  clip-path: inset(0 0 0 var(--img-clip, 0%));
}

.stream-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.stream-card-ascii {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  z-index: 1;
  background: oklch(6% 0.016 252);
  clip-path: inset(0 var(--txt-clip, 100%) 0 0);
}

.stream-ascii-text {
  position: absolute;
  inset: 0;
  color: rgba(0, 255, 65, 0.82);
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
  font-family: monospace;
  font-size: 6.5px;
  line-height: 13px;
  overflow: hidden;
  white-space: pre;
  margin: 0;
  padding: 4px;
  animation: glitchAscii 0.08s infinite linear alternate-reverse;
}

@keyframes glitchAscii {
  0%   { opacity: 1; }
  49%  { opacity: 0.85; }
  50%  { opacity: 0.9; }
  100% { opacity: 1; }
}

/* ---- Shared section layout ----------------------------------- */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 44px;
}

/* ---- Work ---------------------------------------------------- */
#work {
  background: var(--dark);
  padding: 120px 0 150px;
}

.section-header {
  margin-bottom: 52px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text-inv);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.work-card--wide {
  grid-column: 1 / -1;
}

.work-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  cursor: pointer;
  background: var(--dark-2);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out);
}

.work-card:hover {
  box-shadow: 0 32px 80px oklch(0% 0 0 / 0.5);
}

/* Image containers */
.work-card-img {
  overflow: hidden;
}

.work-card--wide .work-card-img {
  height: 500px;
}

.work-card:not(.work-card--wide) .work-card-img {
  height: 310px;
}

.work-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s var(--ease-out);
  will-change: transform;
}

/* Overlay */
.work-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    oklch(5% 0.012 252 / 0.88) 0%,
    oklch(5% 0.012 252 / 0.3) 40%,
    transparent 65%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 26px 30px;
  opacity: 0;
  transition: opacity 0.32s var(--ease-out);
}

.work-card:hover .work-card-overlay {
  opacity: 1;
}

.work-card-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.work-card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-inv);
  line-height: 1;
}

.work-card-type {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-inv-2);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.work-card-arrow {
  font-size: 22px;
  color: var(--text-inv);
  line-height: 1;
  display: block;
  transition: transform 0.2s var(--ease-out);
}

.work-card:hover .work-card-arrow {
  transform: translate(4px, -4px);
}

/* Work grid stagger delays */
.work-grid .work-card:nth-child(1) { transition-delay: 0s;    }
.work-grid .work-card:nth-child(2) { transition-delay: 0.10s; }
.work-grid .work-card:nth-child(3) { transition-delay: 0.18s; }
.work-grid .work-card:nth-child(4) { transition-delay: 0.26s; }
.work-grid .work-card:nth-child(5) { transition-delay: 0.34s; }

/* ---- Work subsections ---------------------------------------- */
.work-subsection {
  margin-bottom: 72px;
}

.work-subsection:last-child {
  margin-bottom: 0;
}

.work-sub-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-2);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid oklch(100% 0 0 / 0.1);
}

/* ---- About --------------------------------------------------- */
#about {
  background: var(--bg);
  padding: 150px 0 160px;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}

.about-pull {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text);
  position: sticky;
  top: 120px;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-right p {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 58ch;
}

/* About right reveal stagger */
.about-right .reveal:nth-child(1) { transition-delay: 0s; }
.about-right .reveal:nth-child(2) { transition-delay: 0.1s; }
.about-right .reveal:nth-child(3) { transition-delay: 0.18s; }
.about-right .reveal:nth-child(4) { transition-delay: 0.24s; }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.about-tags span {
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid oklch(68% 0.005 252);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-2);
}

/* ---- Contact ------------------------------------------------- */
#contact {
  background: var(--bg-alt);
  padding: 150px 0 0;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(52px, 6.5vw, 104px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.93;
  color: var(--text);
  margin-bottom: 52px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  border-bottom: 1px solid oklch(11% 0.012 252 / 0.22);
  padding-bottom: 3px;
  margin-bottom: 44px;
  transition: border-color 0.22s, opacity 0.22s;
}

.contact-email:hover {
  border-color: var(--text);
  opacity: 0.75;
}

.contact-socials {
  display: flex;
  gap: 28px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

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

.contact-location {
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 100px;
}

footer {
  border-top: 1px solid oklch(70% 0.004 252 / 0.28);
  padding: 22px 44px;
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  font-size: 12px;
  color: var(--text-3);
}

/* ---- Scroll reveal ------------------------------------------- */
.reveal,
.reveal-up {
  opacity: 0;
  transform: translateY(44px);
  filter: blur(14px);
  transition:
    opacity   1.4s var(--ease-out),
    transform 1.4s var(--ease-out),
    filter    1.4s var(--ease-out);
}

.reveal.visible,
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-68px) translateY(20px);
  filter: blur(14px);
  transition:
    opacity   1.4s var(--ease-out),
    transform 1.4s var(--ease-out),
    filter    1.4s var(--ease-out);
}

.reveal-right {
  opacity: 0;
  transform: translateX(68px) translateY(20px);
  filter: blur(14px);
  transition:
    opacity   1.4s var(--ease-out),
    transform 1.4s var(--ease-out),
    filter    1.4s var(--ease-out);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
  filter: blur(0px);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
  filter: blur(0px);
}

/* Section title gets extra pop */
.section-title {
  transition-duration: 1.0s !important;
}

/* Stagger nested reveals in about-right */
.about-right .reveal:nth-child(2) { transition-delay: 0.12s; }
.about-right .reveal:nth-child(3) { transition-delay: 0.22s; }
.about-right .reveal:nth-child(4) { transition-delay: 0.32s; }

/* ---- Reduced motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-up, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .ticker-track {
    animation: none;
  }
}

/* ---- Responsive: tablet -------------------------------------- */
@media (max-width: 900px) {
  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about-pull {
    position: static;
  }
  .work-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .work-card--wide {
    grid-column: 1;
  }
  .work-card--wide .work-card-img {
    height: 320px;
  }
}

/* ---- Responsive: mobile -------------------------------------- */
@media (max-width: 640px) {
  #site-nav {
    padding: 18px 20px;
  }
  #site-nav.scrolled {
    padding: 12px 20px;
  }
  .nav-links {
    gap: 22px;
  }
  .nav-links a {
    font-size: 13px;
  }

  .hero-text-wrap {
    padding: 100px 0 70px;
  }
  .eyebrow {
    padding: 0 20px;
  }
  .hero-sub {
    display: block;
    white-space: normal;
    max-width: 88%;
    margin: 0 auto 44px;
    padding: 0 20px;
  }
  .hero-ctas {
    padding: 0 20px;
    flex-direction: column;
    align-items: center;
  }


  .section-inner {
    padding: 0 20px;
  }

  #work {
    padding: 80px 0 100px;
  }
  .section-header {
    margin-bottom: 36px;
  }
  .work-card:not(.work-card--wide) .work-card-img {
    height: 240px;
  }
  .work-card-overlay { opacity: 1; }
  .reveal-left, .reveal-right {
    transform: translateY(24px);
  }

  #about {
    padding: 80px 0 100px;
  }

  #contact {
    padding: 80px 0 0;
  }
  footer {
    padding: 22px 20px;
  }

  .contact-socials {
    gap: 18px;
  }
}
