/* 3-Dees Visuals — Digital Lab / Web project case-study pages
   Editorial High-End & Playful (warm canvas) */

@import url("web-surface.css");
@import url("gallery-carousel.css");

:root {
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Gallery carousel tokens (Digital Lab) */
  --carousel-line: var(--web-line);
  --carousel-viewport-bg:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0, 168, 168, 0.06), transparent 60%),
    var(--web-bg-elevated);
  --carousel-btn-bg: var(--web-bg-elevated);
  --carousel-btn-hover-bg: rgba(0, 168, 168, 0.1);
  --carousel-ink: var(--web-ink);
  --carousel-muted: var(--web-muted);
  --carousel-accent: var(--web-accent);
  --carousel-img-bg: #EBE6DE;
  --carousel-img-border: rgba(22, 22, 23, 0.08);
  --carousel-img-shadow: 0 18px 48px rgba(22, 22, 23, 0.1);
  --carousel-dot: rgba(22, 22, 23, 0.22);
  --carousel-dot-hover: rgba(0, 168, 168, 0.65);
  --carousel-dot-active-track: rgba(0, 168, 168, 0.35);
  --carousel-radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--web-ink);
  font-family: Inter, "Space Grotesk", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 200;
  padding: 8px 12px;
  background: var(--web-accent);
  color: #0a0a0c;
  font-size: 13px;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ——— Header ——— */
#main-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(244, 240, 234, 0.86);
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  border-bottom: 1px solid var(--web-line);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  color: var(--web-ink);
  white-space: nowrap;
}

.logo-image {
  height: 34px;
  width: auto;
  filter: none;
}

.logo__slash {
  color: var(--web-muted);
  font-weight: 500;
}

.logo__track {
  color: var(--web-accent);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.main-nav {
  flex: 1;
  min-width: 0;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 22px;
}

.main-nav a {
  font-family: Inter, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--web-muted);
  padding: 6px 0;
  transition: color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--web-ink);
}

.main-nav a.active {
  box-shadow: inset 0 -1px 0 var(--web-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.track-switch {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  font-family: Inter, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid rgba(0, 168, 168, 0.35);
  color: var(--web-accent-deep);
  white-space: nowrap;
  border-radius: 8px;
  background: rgba(255, 252, 248, 0.6);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.track-switch:hover {
  background: rgba(0, 168, 168, 0.08);
  border-color: var(--web-accent);
  color: var(--web-ink);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  font-family: Inter, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 168, 168, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--web-ink);
  transition: background 0.3s var(--ease), border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.cta-button:hover {
  background: rgba(0, 168, 168, 0.1);
  border-color: var(--web-accent);
  color: var(--web-accent-deep);
  transform: translateY(-1px);
}

.cta-button.primary-cta,
.cta-button.solid {
  background: var(--web-accent-deep);
  border-color: var(--web-accent-deep);
  color: #F4F0EA;
  box-shadow: none;
}

.cta-button.primary-cta:hover,
.cta-button.solid:hover {
  background: var(--web-accent);
  border-color: var(--web-accent);
  color: #0a0a0c;
}

.cta-button.ghost-cta {
  background: transparent;
  border-color: var(--web-line);
  color: var(--web-muted);
  box-shadow: none;
}

.cta-button.ghost-cta:hover {
  border-color: var(--web-accent);
  color: var(--web-ink);
  background: rgba(0, 168, 168, 0.08);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--web-line);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  color: var(--web-ink);
  font-size: 1.15rem;
  cursor: pointer;
}

.nav-switch {
  display: none;
}

/* ——— Hero ——— */
.project-hero {
  padding: clamp(56px, 8vw, 100px) 0 clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--web-line);
}

.project-hero .container {
  display: grid;
  gap: 0;
}

.eyebrow,
.section-label {
  margin: 0 0 16px;
  font-family: Inter, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--web-accent);
}

.project-hero h1 {
  margin: 0 0 20px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--web-ink);
}

.project-hero .lead {
  margin: 0 0 24px;
  max-width: 56ch;
  font-family: Inter, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--web-muted);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tag,
.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: Inter, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 168, 168, 0.35);
  color: var(--web-accent-deep);
  background: rgba(0, 168, 168, 0.08);
  border-radius: 999px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ——— Sections ——— */
.standard-section,
.editorial-section {
  padding: clamp(64px, 9vw, 110px) 0;
  border-top: 1px solid var(--web-line);
}

.standard-section h2,
.editorial-section h2 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--web-ink);
}

.section-intro {
  margin: 0 0 36px;
  max-width: 52ch;
  color: var(--web-muted);
  font-family: Inter, sans-serif;
  font-size: 1.02rem;
  line-height: 1.65;
}

.light-bg {
  background: transparent;
}

/* Monitor mockups */
.mockup-stage {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 24px;
  align-items: end;
}

.device-desktop {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--web-bg-elevated);
  border: 1px solid var(--web-line);
  border-radius: 10px 10px 4px 4px;
  box-shadow: 0 16px 40px rgba(22, 22, 23, 0.08);
}

.device-chrome {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  padding: 10px 14px;
  background: #EBE6DE;
  border-bottom: 1px solid var(--web-line);
}

.device-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.device-chrome span:nth-child(1) { background: #ff5f57; }
.device-chrome span:nth-child(2) { background: #febc2e; }
.device-chrome span:nth-child(3) { background: #28c840; }

.device-desktop img {
  width: 100%;
  height: auto;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
}

.device-mobile {
  box-sizing: border-box;
  background: #161617;
  border: 2px solid rgba(22, 22, 23, 0.35);
  border-radius: 28px;
  padding: 14px;
  max-width: 220px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(22, 22, 23, 0.14);
}

.device-mobile img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 16px;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  object-position: center top;
  background: #EBE6DE;
}

/* Split cards */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--web-line);
}

.split-card {
  padding: clamp(28px, 4vw, 40px);
  background: var(--web-bg-elevated);
  border-right: 1px solid var(--web-line);
}

.split-card:last-child {
  border-right: none;
}

.split-card h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--web-accent);
}

.split-card p {
  margin: 0;
  color: var(--web-muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border: 1px solid var(--web-line);
  margin-bottom: 28px;
}

.feature-card {
  padding: 28px 22px;
  background: var(--web-bg-elevated);
  border-right: 1px solid var(--web-line);
  border-bottom: 1px solid var(--web-line);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--web-ink);
}

.feature-card p {
  margin: 0;
  color: var(--web-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Gallery carousel */
.gallery-section .container {
  margin-bottom: 28px;
}

/* Pager */
.project-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pager-link {
  display: block;
  padding: 22px 20px;
  background: var(--web-bg-elevated);
  border: 1px solid var(--web-line);
  transition: border-color 0.25s ease, transform 0.25s var(--ease);
}

.pager-link:hover {
  border-color: rgba(0, 168, 168, 0.5);
  transform: translateY(-2px);
}

.pager-link.next {
  text-align: right;
}

.pager-link span {
  display: block;
  font-family: Inter, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--web-muted);
  margin-bottom: 8px;
}

.pager-link strong {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--web-ink);
}

/* CTA */
.cta-band {
  padding: clamp(64px, 9vw, 110px) 0;
  border-top: 1px solid var(--web-line);
  text-align: left;
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(0, 168, 168, 0.1), transparent 60%);
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.cta-band p {
  margin: 0 0 28px;
  max-width: 52ch;
  color: var(--web-muted);
  line-height: 1.65;
}

#main-footer {
  border-top: 1px solid var(--web-line);
  padding: 36px 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-family: Inter, sans-serif;
  font-size: 0.8rem;
  color: var(--web-muted);
}

.footer-content a {
  color: var(--web-ink);
  transition: color 0.2s ease;
}

.footer-content a:hover {
  color: var(--web-accent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

@media (max-width: 900px) {
  .mobile-menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(244, 240, 234, 0.98);
    border-bottom: 1px solid var(--web-line);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 18px 24px;
    gap: 14px;
    justify-content: flex-start;
  }

  .header-content {
    position: relative;
  }

  .header-actions .cta-button,
  .header-actions .track-switch {
    display: none;
  }

  .nav-switch {
    display: list-item;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--web-line);
  }

  .nav-switch a {
    color: var(--web-accent);
  }

  .mockup-stage {
    grid-template-columns: 1fr;
  }

  .device-mobile {
    max-width: 200px;
    padding: 12px;
  }

  .device-mobile img {
    border-radius: 14px;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .split-card {
    border-right: none;
    border-bottom: 1px solid var(--web-line);
  }

  .split-card:last-child {
    border-bottom: none;
  }

  .project-pager {
    grid-template-columns: 1fr;
  }

  .pager-link.next {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 32px, 1180px);
  }

  .logo__track,
  .logo__slash {
    display: none;
  }
}

/* Client note / testimonial — Digital Lab */
.project-section {
  padding: clamp(64px, 9vw, 110px) 0;
  border-top: 1px solid var(--web-line);
}

.project-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--web-ink);
}

.section-note {
  margin: 0 0 28px;
  font-family: Inter, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--web-accent);
}

.testimonial {
  position: relative;
  max-width: 720px;
  margin: 0;
  padding: clamp(28px, 4vw, 40px) clamp(28px, 4vw, 44px);
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(0, 168, 168, 0.08), transparent 55%),
    var(--web-bg-elevated);
  border: 1px solid var(--web-line);
  border-left: 2px solid var(--web-accent);
  box-shadow: 0 18px 48px rgba(22, 22, 23, 0.08);
}

.testimonial::before {
  content: "“";
  position: absolute;
  top: 12px;
  left: 18px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 4.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--web-accent);
  opacity: 0.28;
  pointer-events: none;
}

.testimonial p {
  position: relative;
  margin: 0;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--web-ink);
}

.testimonial footer {
  position: relative;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--web-line);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--web-accent);
  font-style: normal;
}
