@font-face {
  font-family: 'RB Rational Neue';
  src: url('/fonts/NeueRational-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RB Rational Neue';
  src: url('/fonts/NeueRational-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Produkt LCG Web';
  src: url('/fonts/Produkt-Regular-Cy-Gr-Web.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --page-bg: #F8F9F6;
  --text: #111111;
  --text-muted: #999;
  --border: #e3e3e3;
  --font: 'RB Rational Neue', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

html {
  height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: 'ss01' 1, 'ss04' 1;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ─────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: 335px 770px;
  gap: 60px;
  height: 100vh;
  justify-content: center;
  align-items: center;
}

/* ─── Landing page ───────────────────────────── */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #F8F9F6;
}

.landing-layout {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  min-height: 100vh;
  padding: 170px 150px;
  box-sizing: border-box;
}

.landing-text {
  width: 470px;
  display: flex;
  flex-direction: column;
}

.landing-text .section-body {
  margin-bottom: 40px;
}

.landing-header {
  font-family: 'Produkt LCG Web', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.landing-header-char {
  display: inline;
  transition: color 0.3s ease;
}

.landing-header-line {
  display: block;
}

.landing-header-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.landing-header-email .copy-icon {
  opacity: 0;
  transition: opacity 0.15s;
  color: #a2a7ba;
  display: flex;
  align-items: center;
}

.landing-header-email:hover .copy-icon {
  opacity: 1;
}


.landing-projects {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-projects-heading {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 22px;
  color: var(--text);
}

.landing-project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 33px 17px 17px;
  border: 1px solid rgba(128, 128, 128, 0.15);
  border-radius: 16px;
  text-decoration: none;
  transition: background 0.2s;
}

@media (hover: hover) {
  .landing-project-row:hover {
    background: #ffffff;
  }
}

.landing-project-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.landing-project-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.landing-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-project-thumb .thumb-slideshow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.landing-project-thumb .thumb-slideshow img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
}

.landing-project-thumb .thumb-slideshow img.active {
  opacity: 1;
}

@media (hover: hover) {
  .landing-project-row:hover .thumb-slideshow {
    opacity: 1;
  }
}

.landing-project-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.64px;
}

.landing-project-name {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 22px;
  color: var(--text);
}

.landing-project-desc {
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 22px;
  color: #b8b8b8;
}

.landing-project-label {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 22px;
}

/* ─── Project client header ──────────────────── */

.project-client-name {
  font-family: 'Produkt LCG Web', sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.125px;
}

.project-client-char {
  display: inline;
  transition: color 0.3s ease;
}

/* ─── Left panel ─────────────────────────────── */

.left-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 480px;
}

.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}


.project-text {
  font-size: 14.5px;
  line-height: 22px;
  opacity: 1;
  transition: opacity 0.3s ease;
}


.section-title {
  font-family: 'Produkt LCG Web', sans-serif;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 22px;
  margin-bottom: 32px;
}

/* ─── Text reveal animation ──────────────────── */

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

.text-reveal {
  animation: fadeSlideUp 0.4s ease forwards;
  animation-play-state: paused;
  opacity: 0;
}

/* ─── Title slide ─────────────────────────────── */

.title-slide {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.title-slide-name {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.125px;
  color: var(--text);
}

.title-slide-tagline {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.125px;
  color: var(--text);
  text-wrap: pretty;
}

.section-body {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 22px;
  text-wrap: pretty;
}

.section-body p + p {
  margin-top: 16px;
}

.section-bullet {
  padding-left: 20px;
  text-indent: -12px;
}

.section-body p:not(.section-bullet) + .section-bullet {
  margin-top: 12px;
}

.section-bullet + .section-bullet {
  margin-top: 6px;
}

/* ─── Keyboard hints ─────────────────────────── */

.kbd-hints {
  display: flex;
  gap: 8px;
  align-items: center;
}

.kbd-desktop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0px 1px 0px 0px var(--border);
  font-family: var(--font);
  font-feature-settings: 'ss01' 1, 'ss04' 1;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  height: 36px;
  padding: 0 10px;
  min-width: 36px;
  user-select: none;
  cursor: default;
}

@media (max-width: 1199px) {
  .kbd-desktop { display: none; }
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0px 1px 0px 0px var(--border);
  font-family: var(--font);
  font-feature-settings: 'ss01' 1, 'ss04' 1;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  height: 36px;
  padding: 0 10px;
  min-width: 36px;
  user-select: none;
  cursor: default;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.kbd.pressed {
  background: #f4f4f6;
  border-color: #ccc;
  box-shadow: 0px 0px 0px 0px #ccc;
}

.kbd.disabled {
  color: var(--text-muted);
  border-color: #ebebeb;
  opacity: 0.4;
}

.kbd-esc {
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  font-size: 10px;
  line-height: 22px;
  padding: 12px 7px 2px 7px;
  width: 55px;
  height: 38px;
  min-width: unset;
}

.kbd-hint-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

/* ─── Right panel ────────────────────────────── */

.right-panel {
  height: 100vh;
  display: flex;
  align-items: center;
}

/* ─── Card stack ─────────────────────────────── */

.card-stack {
  position: relative;
  width: 770px;
  height: 480px;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  overflow: hidden;
}

.card-inner {
  width: 100%;
  height: 100%;
  background: #e0e2eb;
  position: relative;
}

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


/* ─── Slide progress bars ────────────────────── */

@keyframes slide-fill {
  from { width: 0% }
  to   { width: 100% }
}

.slide-progress-bars {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: flex;
  gap: 5px;
  align-items: center;
  z-index: 10;
}

.slide-bar {
  height: 2px;
  width: 36px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.slide-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 2px;
}

.slide-bar-fill.past {
  width: 100%;
}

.slide-bar-fill.image-active {
  animation: slide-fill linear forwards;
}

.slide-bar-fill.image-active.paused {
  animation-play-state: paused;
}

/* ─── Slide play/pause controls ──────────────── */

.slide-controls {
  position: absolute;
  bottom: 10px;
  right: 12px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.card-inner:hover .slide-controls {
  opacity: 1;
}

.slide-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s;
}

.slide-play-btn:hover {
  background: rgba(255, 255, 255, 1);
}

/* ─── Mobile responsive ──────────────────────── */

@media (max-width: 1199px) {

  /* Phase 1: Unlock scrolling */
  html {
    height: auto;
  }

  body {
    min-height: 100dvh;
    overflow: auto;
    overflow-x: hidden;
  }

  /* Collapse layout grid to single column */
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
    height: auto;
    min-height: 100dvh;
    padding: max(48px, env(safe-area-inset-top)) 24px max(64px, env(safe-area-inset-bottom)) 24px;
    align-items: start;
  }

  .right-panel {
    height: auto;
  }
}

/* Phase 2: Landing page reflow */
@media (max-width: 1199px) {
  .landing-layout {
    flex-direction: column;
    padding: max(48px, env(safe-area-inset-top)) 24px max(64px, env(safe-area-inset-bottom)) 24px;
    gap: 40px;
    min-height: 100dvh;
  }

  .landing-header {
    order: -1;
  }

  .landing-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .landing-text .section-body {
    margin-bottom: 0;
  }

  .landing-project-row {
    padding: 12px 16px;
  }

  .landing-project-thumb {
    width: 60px;
    height: 60px;
  }

  /* Phase 3: Card stack — aspect-ratio instead of fixed dimensions */
  .card-stack {
    width: 100%;
    height: auto;
    aspect-ratio: 770 / 480;
    margin-bottom: 0;
  }

  /* Phase 4: Reorder — card stack above text on mobile */
  .right-panel {
    order: -1;
    padding-bottom: 20px; /* room for peek card overhang */
  }

  /* Left panel — fixed height, always 50px below card stack */
  .left-panel {
    height: auto;
    justify-content: flex-start;
    gap: 0;
    margin-top: 50px;
    padding-top: 0;
    padding-right: 16px; /* right indent on text blocks */
    padding-bottom: 88px; /* clear the fixed mobile nav */
  }

  /* Project text — fixed height so the box never resizes between cards */
  .project-content {
    overflow-y: auto;
  }
}

/* ─── Mobile home button ─────────────────────── */

.mobile-home-btn {
  position: fixed;
  bottom: max(32px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 22px;
  font-family: var(--font);
  font-feature-settings: 'ss01' 1, 'ss04' 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

/* ─── Mobile nav ─────────────────────────────── */

.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(248, 249, 246, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.mobile-nav-arrows {
  display: flex;
  gap: 8px;
}

.mobile-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  font-family: var(--font);
  font-feature-settings: 'ss01' 1, 'ss04' 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, opacity 0.15s;
}

.mobile-nav-btn.disabled,
.mobile-nav-btn:disabled {
  opacity: 0.3;
}

/* ─── Mobile intro: fixed client name ────────── */

@media (max-width: 1199px) {
  /* The fixed element that slides from bottom to layout position */
  .mobile-fixed-intro .project-client-name {
    font-size: 32px;
    line-height: 1.1;
  }
}

/* ─── Mobile scroll fade-in ─────────────────── */

@media (max-width: 1199px) {
  .scroll-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .scroll-fade.scroll-fade--visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Mobile scroll layout ───────────────────── */

@media (max-width: 1199px) {
  .mobile-scroll-layout {
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
    /* Pull entire layout up behind status bar / dynamic island */
    margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  }

  .mobile-scroll-back {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 20px 24px 16px;
  }

  /* Hero: tall portrait image, full-bleed */
  .mobile-scroll-hero-image {
    width: 100%;
    aspect-ratio: 390 / 500;
    overflow: hidden;
    position: relative;
  }

  /* Text block below hero image */
  .mobile-scroll-hero-text {
    padding: 40px 40px 0 24px;
    margin-bottom: 60px;
  }

  .mobile-scroll-layout .project-client-name {
    font-size: 32px;
    line-height: 1.1;
  }

  .mobile-scroll-tagline {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.125px;
    color: var(--text);
    text-wrap: pretty;
    margin-top: 14px;
  }

  /* Section: landscape image + text */
  .mobile-scroll-section {
    margin-bottom: 60px;
  }

  .mobile-scroll-image {
    width: 100%;
    aspect-ratio: 390 / 260;
    overflow: hidden;
    margin-bottom: 48px;
  }

  .mobile-scroll-hero-image img,
  .mobile-scroll-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .mobile-carousel-bars .slide-bar {
    width: 24px;
    background: rgba(0, 0, 0, 0.12);
  }

  .mobile-carousel-bars .slide-bar-fill {
    background: rgba(0, 0, 0, 0.6);
  }

  .mobile-scroll-text {
    padding: 0 40px 60px 24px;
  }

  .mobile-scroll-layout .section-title {
    font-size: 20px;
    line-height: 36px;
    margin-bottom: 50px;
  }

  .mobile-scroll-layout .section-body {
    font-size: 18px;
    line-height: 30px;
  }
}

@media (max-width: 767px) {
  .landing-header {
    font-size: 16px;
    line-height: 22px;
  }

  .section-body {
    font-size: 15px;
  }

  .landing-project-label {
    font-size: 15px;
  }

  .landing-project-name {
    text-decoration: underline;
  }

  /* Always show play/pause on touch — no hover */
  .slide-controls {
    opacity: 1;
  }
}
