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

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #171717;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 3px;
  border-radius: 4px;
}

/* HOME */

.home {
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

/* Fixed WebGL background */
.bg-shader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -20;
  pointer-events: none;
  background: #ffffff;
}

.bg-shader canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Fixed header block (stays behind the carousel) */
.hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.hero-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: flex-start;
  flex-shrink: 0;
  max-width: 100%;
  width: 100%;
}

.logo-link {
  display: block;
  height: 48px;
  width: 48px;
  transition: transform 0.2s ease;
}

.logo-link:hover {
  transform: scale(1.05);
}

.logo-link img {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-texts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  text-transform: uppercase;
  width: 100%;
}

.hero-title {
  margin: 0;
  font-family: "Nova Klasse", sans-serif;
  font-weight: 600;
  color: #171717;
  font-size: clamp(2.25rem, 8vw, 86px);
  letter-spacing: 0.05em;
  line-height: 1;
}

.hero-subtitle {
  margin: 0;
  font-family: "Changa One", sans-serif;
  font-style: italic;
  color: #8a8a8a;
  font-size: clamp(1.5rem, 5vw, 60px);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  text-align: right;
  text-transform: uppercase;
  margin-left: auto;
  flex-shrink: 0;
  width: 100%;
}

.hero-right .hero-subtitle,
.hero-right .hero-title {
  text-align: right;
}

@media (min-width: 768px) {
  .hero {
    padding: 32px;
  }
  .logo-link {
    height: 64px;
    width: 64px;
  }
  .hero-left,
  .hero-right {
    width: auto;
  }
  .hero-texts {
    gap: 8px;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 40px;
  }
  .hero-row {
    align-items: flex-end;
    gap: 40px;
  }
  .logo-link {
    height: 80px;
    width: 80px;
  }
  .hero-title {
    letter-spacing: 6px;
  }
  .hero-subtitle {
    letter-spacing: 1.5px;
    line-height: 1.2;
  }
}

@media (min-width: 1536px) {
  .hero-title {
    letter-spacing: 12px;
  }
  .hero-subtitle {
    letter-spacing: 2.72px;
  }
}

/* =========================================================
   CAROUSEL (home)
   ========================================================= */

.carousel-root {
  --card-h: min(540px, 66vh);
  --card-w: calc(var(--card-h) * (354.047 / 766));
  --card-gap: 8px;

  position: relative;
  width: 100%;
  z-index: 10;
  pointer-events: none;
}

@media (min-width: 769px) {
  .carousel-root {
    --card-h: min(766px, 75vh);
    --card-gap: 16px;
  }
}

/* Spacer to push the carousel down so part of the hero shows above */
.carousel-spacer {
  height: 34vh;
  width: 100%;
}

@media (min-width: 769px) {
  .carousel-spacer {
    height: 55vh;
  }
}

.carousel-bg {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  transition: none;
  will-change: background-color, backdrop-filter;
}

.carousel-scroller-wrap {
  width: 100%;
  flex-shrink: 0;
  position: relative;
  pointer-events: auto;
}

.carousel-scroller {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  align-items: center;
  padding: 60px 0;
  position: relative;
  user-select: none;
  cursor: grab;
  padding-left: calc(50vw - (var(--card-w) / 2));
  padding-right: calc(50vw - (var(--card-w) / 2));
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.carousel-scroller::-webkit-scrollbar {
  display: none;
}

.carousel-card {
  position: relative;
  flex-shrink: 0;
  scroll-snap-align: center;
  cursor: pointer;
  height: var(--card-h);
  width: var(--card-w);
  transform-style: preserve-3d;
  will-change: transform, opacity, filter, z-index;
}

.carousel-card + .carousel-card {
  margin-left: var(--card-gap);
}

.carousel-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s;
}

.carousel-card:hover .carousel-card-inner {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.carousel-card-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  max-width: none;
}

.carousel-card-border {
  position: absolute;
  inset: -2px;
  border-radius: 42px;
  border: 4px solid #171717;
  pointer-events: none;
}

/* Placeholder card for unfinished projects */
.carousel-card.is-placeholder .carousel-card-inner {
  background:
    repeating-linear-gradient(
      135deg,
      #f5f1ea 0 20px,
      #ebe6dd 20px 40px
    );
}

.carousel-card.is-placeholder .placeholder-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 13px;
  color: #171717;
  padding: 24px;
  text-align: center;
}

.placeholder-label strong {
  font-family: "Nova Klasse", sans-serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.12em;
  line-height: 1;
}

.placeholder-label span {
  opacity: 0.5;
  font-size: 11px;
}

/* PROJECT PAGE */

.page {
  min-height: 100vh;
  background: #fffffe;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: clip;
}

.page-container {
  width: 100%;
  max-width: 1417px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 24px 24px 0;
}

@media (min-width: 1024px) {
  .page-container {
    padding: 24px 48px 0;
  }
}

.navbar {
  width: 100%;
  display: flex;
  align-items: flex-start;
}

.navbar .logo-link {
  height: 48px;
  width: 48px;
}

@media (min-width: 768px) {
  .navbar .logo-link {
    height: 64px;
    width: 64px;
  }
}

@media (min-width: 1024px) {
  .navbar .logo-link {
    height: 81px;
    width: 79px;
  }
}

.divider-line {
  background: #c01f2a;
  height: 3px;
  opacity: 0.26;
  box-shadow: 0 3px 0 0 #f49514;
  flex-shrink: 0;
  width: 100%;
}

.project-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
  padding-bottom: 48px;
}

@media (min-width: 1024px) {
  .project-main {
    flex-direction: row;
    gap: 120px;
    align-items: flex-start;
  }
}

@media (min-width: 1280px) {
  .project-main {
    gap: 239px;
  }
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .project-content {
    width: 700px;
  }
}

.app-icon {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.app-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
}

.app-title {
  margin: 0;
  font-family: "Nova Klasse", sans-serif;
  font-weight: 600;
  color: #171717;
  font-size: clamp(1.875rem, 5vw, 48px);
  text-transform: uppercase;
  letter-spacing: 5.76px;
  line-height: 1;
}

@media (max-width: 640px) {
  .app-title {
    letter-spacing: 3px;
  }
}

.app-description {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.4;
  color: #636363;
  font-size: 14px;
  letter-spacing: 0.56px;
  width: 100%;
}

.app-description p {
  margin: 0;
}

.store-badges {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
  margin-top: 8px;
}

.store-badges a {
  display: block;
  height: 40px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.store-badges a:hover {
  opacity: 0.8;
}

.store-badges a.appstore {
  width: 120px;
}

.store-badges a.googleplay {
  width: 135px;
}

.store-badges img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Mockup column */
.phone-mockup {
  aspect-ratio: 341 / 743;
  height: auto;
  width: 100%;
  max-width: 341px;
  pointer-events: none;
  position: relative;
  border-radius: 32px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #ffffff;
}

@media (min-width: 640px) {
  .phone-mockup {
    border-radius: 42px;
  }
}

@media (min-width: 1024px) {
  .phone-mockup {
    position: sticky;
    top: 40px;
  }
}

.phone-mockup .mockup-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.phone-mockup .mockup-border {
  position: absolute;
  inset: 0;
  border: 3px solid #171717;
  border-radius: 32px;
  pointer-events: none;
}

@media (min-width: 640px) {
  .phone-mockup .mockup-border {
    border-radius: 42px;
  }
}

/* =========================================================
   IMAGE GALLERY (project page)
   ========================================================= */

.gallery {
  position: relative;
  padding: 32px 24px 16px;
  width: 100vw;
  margin-left: -24px;
}

.gallery::after {
  content: "";
  position: absolute;
  top: 0;
  right: 24px;
  bottom: 0;
  width: 56px;
  background: linear-gradient(to right, rgba(255, 255, 254, 0), #fffffe);
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 1024px) {
  .gallery {
    width: calc(100% + 32px);
    margin-left: -16px;
    padding: 32px 24px 16px 16px;
  }
}

.gallery-scroller {
  display: flex;
  gap: 13.156px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 6px;
  scroll-padding-inline: 6px;
  cursor: grab;
  user-select: none;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: rgba(125, 125, 125, 0.85);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-arrow:hover {
  background: rgba(100, 100, 100, 0.95);
}

.gallery-arrow-prev {
  left: 16px;
}

.gallery-arrow-next {
  right: 40px;
}

.gallery:hover .gallery-arrow:not(.is-hidden) {
  opacity: 1;
  pointer-events: auto;
}

.gallery-arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (hover: none) {
  .gallery-arrow {
    display: none;
  }
}

.gallery-scroller::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  position: relative;
  width: 160px;
  flex-shrink: 0;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: 16.445px;
  transition: opacity 0.2s;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
}

@media (min-width: 640px) {
  .gallery-item {
    width: 170px;
  }
}

.gallery-item:hover {
  opacity: 0.9;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16.445px;
}

.gallery-item .gallery-border {
  position: absolute;
  inset: -0.822px;
  border: 1.644px solid #171717;
  border-radius: 17.267px;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 60;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 8px;
  border-radius: 9999px;
  transition: color 0.2s, background 0.2s;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  color: #fff;
  background: #000;
}

.lightbox-stage {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.lightbox-nav {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #7d7d7d;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: #666666;
}

.lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.lightbox-img {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* PROJECT FOOTER */

.project-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-bottom: 24px;
}

@media (min-width: 1024px) {
  .project-footer {
    justify-content: flex-end;
  }
}

.project-footer a {
  display: inline-block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  color: #171717;
  font-size: 14px;
  letter-spacing: 0.64px;
  transition: opacity 0.2s;
}

.project-footer a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* PRIVACY */

.privacy-main {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding-bottom: 96px;
  color: #171717;
}

.privacy-back {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 500;
  color: #636363;
}

.privacy-back:hover {
  text-decoration: underline;
}

.privacy-title {
  margin: 0 0 16px 0;
  font-family: "Nova Klasse", sans-serif;
  font-weight: 600;
  font-size: clamp(1.875rem, 5vw, 48px);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.1;
}

.privacy-updated {
  font-style: italic;
  color: #8a8a8a;
  margin-bottom: 32px;
}

.privacy-body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #636363;
  line-height: 1.625;
}

.privacy-body > * + * {
  margin-top: 24px;
}

.privacy-body p.lead {
  font-size: 1.125rem;
}

.privacy-body hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 32px 0;
}

.privacy-body :is(h2, h3) {
  font-family: "Nova Klasse", sans-serif;
  font-weight: 700;
  color: #171717;
  text-transform: uppercase;
  word-spacing: 0.15em;
}

.privacy-body h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  letter-spacing: 1px;
  margin: 40px 0 24px;
}

.privacy-body h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  letter-spacing: 0.5px;
  margin: 32px 0 16px;
}

.privacy-body strong {
  color: #171717;
}

.privacy-body a {
  color: #c01f2a;
}

.privacy-body a:hover {
  text-decoration: underline;
}

.privacy-body ul {
  list-style: disc;
  padding-left: 24px;
  margin: 16px 0;
}

.privacy-body ul li + li {
  margin-top: 8px;
}

/* SCROLL REVEAL */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
