/* ============================================================
   JAMES THOMAS — TASTEFUL MINIMALISM
   Design Language: Quiet, Elegant, Gallery Brutalism
   ============================================================ */

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

:root {
  --carousel-step: 100vh;
  --carousel-item-height: 68vh;
  --carousel-box-height: 60vh;
  --carousel-gap: calc(var(--carousel-step) - var(--carousel-item-height));
}

html {
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 100%);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: inherit;
  color: #777777; /* Soft, quiet gray for all base text */
  height: 100vh;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  position: relative;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

@media (min-width: 769px) {
  html,
  body {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
  }

  body {
    position: fixed;
    inset: 0;
    width: 100%;
  }
}

/* Improve text rendering and avoid transform artifacts (Brave/Chromium workarounds) */
.carousel-track,
.carousel-item-wrapper,
.carousel-item-box {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

.about-text {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #000000;
}

/* ── 0. LOADER ────────────────────────────────────────────── */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow: hidden;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-bg-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2vw;
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 700;
  color: #f7f7f7;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 0.9;
  letter-spacing: -0.05em;
  z-index: 0;
  text-align: justify;
  overflow: hidden;
}

.loader-text {
  position: relative;
  z-index: 1;
  font-family: monospace;
  font-size: clamp(3px, 0.4vw, 8px);
  line-height: 0.65;
  letter-spacing: -0.05em;
  white-space: pre;
  color: #111111;
  font-weight: 400;
}

/* ── 1. LOGO ──────────────────────────────────────────────── */
.logo {
  position: absolute;
  top: 1.5vw;
  left: 3vw;
  font-size: clamp(28px, 4.2vw, 72px);
  font-weight: 800;
  color: #111111;
  letter-spacing: -0.04em;
  line-height: 1;
  z-index: 10;
  max-width: 62vw;
}

.reg {
  font-size: 0.5em;
  vertical-align: super;
  font-weight: 700;
  color: #111111;
  margin-left: 2px;
}

/* ── 2. CORNER CONTACTS ────────────────────────────────── */
.top-right {
  position: absolute;
  top: 3vw; /* Shifted further down to perfectly align with the heavy title plane */
  right: 3vw;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #777;
  z-index: 10;
}

.bottom-right {
  position: absolute;
  bottom: 1.5vw;
  right: 1.1vw;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 10;
}

.contact-title {
  color: #111111;
  font-weight: 500;
  font-size: clamp(16px, 1.4vw, 20px);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.social-links {
  display: flex;
  gap: 1.5vw;
}


.social-btn {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #777777;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-btn:hover {
  color: #111111;
}

/* View buttons for notable videos (fits site theme) */
.view-buttons {
  display: flex;
  gap: 10px; /* slightly tighter gap for even visual weight */
  align-items: center;
  margin: 4px 0 8px 0; /* less vertical spacing so buttons sit closer to heading */
  flex-wrap: wrap;
}

/* Desktop-only: increase gap between view buttons and the next section (NICHES) */
@media (min-width: 769px) {
  .left-about .view-buttons {
    margin-bottom: 22px; /* visually larger gap for desktop */
  }
}

.view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  min-height: 34px; /* consistent button height */
  font-size: 13px;
  font-weight: 700;
  color: #777777; /* gray */
  background: transparent;
  border: 1px solid #ececec;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  line-height: 1;
}

.view-btn:hover {
  background: #f6f6f6;
  border-color: #e0e0e0;
  color: #111111;
}

.view-btn .icon {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
}

/* SVG inside button should inherit color */
.view-btn svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  color: inherit;
}

/* Eye icon styling (smaller, sits after the count) */
.view-btn svg.eye {
  width: 12px;
  height: 12px;
  margin-left: 6px;
  margin-right: 0;
}

/* Sub-heading variant used inside about-text to avoid large mt spacing */
.about-text .sub-heading {
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

/* Ensure left-about vertical rhythm is tidy */
.left-about .about-text > *:not(:first-child) {
  margin-top: 8px;
}

/* Paragraphs inside about-text use consistent spacing */
.about-paragraph {
  margin: 0;
  padding: 0;
}

.corner-email {
  font-size: 30px;
  font-weight: 500;
  text-transform: lowercase;
  color: #cccccc;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.corner-email:hover {
  color: #111111;
}

/* ── 3. LEFT MARGIN: ABOUT ────────────────────────────────── */
.left-about {
  position: absolute;
  top: 50%;
  left: 3vw;
  transform: translateY(-50%); /* vertically center the about block */
  width: min(30vw, 360px); /* Gives the about block more breathing room */
  z-index: 10;
  max-width: calc(100vw - 6vw);
}

.about-heading {
  font-size: clamp(10px, 0.78vw, 15px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: #111111;
}

.about-text {
  font-size: clamp(11px, 0.9vw, 17px);
  line-height: 1.55;
  color: #777777;
  max-width: 100%;
}

.trusted-corner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 10px;
}

.trusted-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 48px; /* even horizontal spacing between logos */
}

.trusted-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #111111;
}

.trusted-logo {
  height: 32px; /* base visual height for desktop */
  width: auto;
  display: block;
  opacity: 1;
  filter: none;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* Slight size bump and subtle left shift for Cantina to match Lovable visually */
/* Per-logo optical compensation (only adjust height when necessary) */
.logo-involio { height: 34px; }
.logo-cantina { height: 36px; }
.logo-lovable { height: 32px; }

.trusted-logo[src$="involio.png"] {
  transform: scale(1.06);
  transform-origin: left center;
}

.trusted-logo:hover {
  opacity: 1;
  filter: saturate(1);
}

.highlight {
  font-style: italic;
}

.mt {
  margin-top: 22px;
}

.about-ascii {
  font-family: monospace;
  font-size: clamp(2px, 0.25vw, 4px);
  line-height: 0.65;
  letter-spacing: -0.05em;
  color: #cccccc;
  margin-top: 24px;
  white-space: pre;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

/* ── 4. METADATA ──────────────────────────────────────────── */
.meta-right {
  position: absolute;
  top: 50%;
  right: 3vw;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #777;
  z-index: 10;
  max-width: min(18vw, 240px);
}

.meta-item {
  font-size: clamp(11px, 0.9vw, 16px);
  color: #cccccc;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

.meta-item.active {
  color: #111111;
}

.meta-item:hover {
  color: #999999;
}

/* ── 5. CENTER STAGE ──────────────────────────────────────── */
.center-stage {
  position: absolute;
  top: 51.5%; /* Shifted down slightly to visually center the video box itself */
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  width: min(58vw, 820px);
  max-width: calc(100vw - 8vw);
}

.carousel-wrapper {
  height: var(--carousel-item-height);
  width: 100%;
  display: flex;
  align-items: flex-start; /* Important for exact transform math */
  justify-content: center;
  position: relative;
}

.carousel-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--carousel-gap); /* Pushes adjacent items exactly off-screen */
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.carousel-item-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end; 
  justify-content: center;
  height: var(--carousel-item-height);
  width: min(100%, 820px);
  transition: transform 0.35s ease;
}

.carousel-item-wrapper.video-playing {
  transform: scale(1.03); /* Barely lifts the card while playing */
  z-index: 5;
}

.carousel-item-wrapper.video-playing .carousel-item-box {
  /* Box no longer needs to scale independently */
}

.video-title {
  font-size: 9px; 
  font-weight: 500; 
  color: #111111;
  margin-top: 8px;
  letter-spacing: 0.05em;
  opacity: 0; 
  transition: opacity 0.3s ease-out;
}

.video-top-title {
  margin-bottom: 12px;
  font-size: clamp(8px, 0.65vw, 11px);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: #111111;
  align-self: center;
  max-width: 100%;
}

.video-top-note {
  font-size: clamp(8px, 0.65vw, 11px);
  color: #8a8a8a;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: 0.02em;
  text-align: center;
  align-self: center;
  width: 100%;
  max-width: 100%;
}

.carousel-item-box {
  width: 100%;
  height: var(--carousel-box-height);
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999999;
  border: 1px solid transparent;
  
  /* Tastefully muted when inactive */
  opacity: 0.2; 
  transition: opacity 0.3s ease-out, transform 0.35s ease;
  cursor: pointer;
}

.carousel-item-box.video-card {
  position: relative;
  overflow: visible; /* Changed to visible to let video expand out of it */
  background: #f2f2f2;
  aspect-ratio: 9 / 16;
  width: auto;
  align-self: center;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.9) blur(0.35px);
  transition: filter 0.35s ease, transform 0.35s ease, opacity 0.35s ease, width 0.35s ease, height 0.35s ease;
  opacity: 0.96;
}

.video-card .video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  
  /* Button sizing */
  height: 28px;
  padding: 0 8px;
  
  /* Border & background */
  border: 4px solid rgba(255, 255, 255, 0.95);
  background: transparent;
  border-radius: 0;
  
  /* Typography */
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  line-height: 1;
  color: #ffffff;
  
  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Effects */
  opacity: 0.96;
  cursor: pointer;
  transition: opacity 0.18s ease, border-color 0.18s ease;
}

.video-card .video-play-button:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 1);
}

/* Minimalist brutalist video controls */
.video-controls {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  margin-top: 10px;
  z-index: 3;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  position: relative;
}

.carousel-item-wrapper.video-playing .video-controls {
  opacity: 1;
  pointer-events: auto;
}

.progress-track {
  width: 100%;
  height: 100%;
  background: transparent;
  display: block;
  position: relative;
  cursor: pointer;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #111111;
  width: 0%;
}

.progress-handle {
  display: none;
}

/* Small screens: scale control down a bit */
@media (max-width: 600px) {
  .video-controls { height: 3px; }
}

.carousel-item-wrapper.video-playing .carousel-item-box {
  /* Box no longer needs to scale independently */
}

.carousel-item-wrapper.video-playing .video-player {
  filter: grayscale(0) contrast(1.04) brightness(0.98) blur(0.15px);
  transform: scale(1);
  opacity: 1;
}

.carousel-item-wrapper.video-playing .video-play-button {
  opacity: 0;
}

/* Active State */
.carousel-item-wrapper.active .video-title {
  opacity: 1;
}

.carousel-item-wrapper.active .carousel-item-box {
  opacity: 1;
  background-color: #f9f9f9;
  color: #111111;
  border: 1px solid #e0e0e0; 
}

.video-overlay {
  display: none;
}

/* ── 6. BOTTOM MARGINS (SCROLL INDICATOR) ─────────────────── */
.bottom-center {
  position: absolute;
  bottom: 6.4vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 700;
  color: #111111;
  letter-spacing: 0.15em;
  z-index: 12;
  transition: none;
}

.scroll-prompt {
  position: absolute;
  left: 50%;
  bottom: 9.6vh;
  transform: translateX(-50%);
  z-index: 12;
  opacity: 1;
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.scroll-prompt.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

.scroll-prompt svg {
  display: block;
  width: min(13vw, 118px);
  height: auto;
}

.scroll-prompt .arrow-group {
  transform-origin: 340px 150px;
  animation: bob 1.4s ease-in-out infinite;
}

.scroll-prompt .triangle {
  fill: none;
  stroke: #111111;
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

@keyframes bob {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(12px); }
}

/* ── 8. RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .meta-right { display: none; }
}

@media (max-width: 1200px) {
  .logo {
    font-size: clamp(30px, 4vw, 48px);
    max-width: 50vw;
  }

  .top-right {
    top: 2.4vw;
    right: 2.4vw;
    max-width: 38vw;
  }

  .social-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.8vw 1.2vw;
  }

  .left-about {
    top: 50%;
    transform: translateY(-50%);
    width: min(26vw, 300px);
  }

  .about-text {
    font-size: 14px;
    line-height: 1.6;
  }

  .about-heading {
    font-size: 13px;
  }

  .meta-right {
    right: 2.4vw;
  }

  .bottom-right {
    right: 2vw;
    bottom: 2vw;
  }

  .corner-email {
    font-size: 15px;
  }

  .center-stage {
    top: 50.5%;
    width: min(60vw, 780px);
  }
}

@media (max-height: 820px) {
  :root {
    --carousel-item-height: 62vh;
    --carousel-box-height: 54vh;
  }

  .logo {
    font-size: clamp(28px, 4vw, 54px);
    top: 1.1vw;
  }

  .top-right {
    top: 2vw;
  }

  .contact-title {
    font-size: clamp(14px, 1.2vw, 18px);
  }

  .left-about {
    width: min(28vw, 320px);
  }

  .about-heading {
    font-size: clamp(11px, 0.8vw, 13px);
    margin-bottom: 5px;
  }

  .about-text {
    font-size: clamp(12px, 0.95vw, 15px);
    line-height: 1.55;
  }

  .mt {
    margin-top: 18px;
  }

  .center-stage {
    top: 50%;
    width: min(56vw, 760px);
  }

  .video-top-title,
  .video-top-note {
    font-size: 9px;
  }

  .bottom-center {
    bottom: 4.4vh;
  }

  .bottom-right {
    bottom: 1.2vw;
  }

  .corner-email {
    font-size: 13px;
  }
}

@media (max-width: 1100px) {
  :root {
    --carousel-item-height: 64vh;
    --carousel-box-height: 56vh;
  }

  .logo {
    top: 1.2vw;
    left: 2vw;
    font-size: clamp(26px, 4.2vw, 42px);
    max-width: 46vw;
  }

  .top-right {
    top: 2vw;
    right: 2vw;
    gap: 4px;
    font-size: 10px;
    max-width: 40vw;
  }

  .contact-title {
    font-size: 16px;
  }

  .social-links {
    gap: 0.6rem 0.9rem;
  }

  .left-about {
    left: 2vw;
    width: min(29vw, 280px);
  }

  .about-heading {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .about-text {
    font-size: 13px;
    line-height: 1.5;
  }

  .meta-right {
    right: 2vw;
    max-width: min(16vw, 200px);
  }

  .meta-item {
    font-size: 13px;
  }

  .center-stage {
    width: min(58vw, 700px);
  }

  .video-top-title,
  .video-top-note {
    font-size: 10px;
  }

  .bottom-right {
    right: 1.6vw;
    bottom: 1.6vw;
  }

  .corner-email {
    font-size: 14px;
  }
}

@media (max-width: 1400px), (max-height: 900px) {
  .logo {
    font-size: clamp(24px, 3.6vw, 56px);
    max-width: 58vw;
  }

  .left-about {
    width: min(28vw, 320px);
  }

  .about-heading {
    font-size: clamp(10px, 0.75vw, 13px);
    letter-spacing: 0.07em;
  }

  .about-text {
    font-size: clamp(10px, 0.85vw, 15px);
    line-height: 1.45;
  }

  .view-buttons {
    gap: 8px;
  }

  .view-btn {
    padding: 5px 10px;
    min-height: 30px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .meta-item {
    font-size: clamp(10px, 0.8vw, 14px);
  }

  .top-right {
    gap: 4px;
  }

  .contact-title {
    font-size: clamp(14px, 1.1vw, 18px);
  }

  .corner-email {
    font-size: clamp(12px, 1vw, 16px);
  }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100svh;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
  }

  .logo {
    display: none;
  }

  .top-right {
    display: none;
  }

  .left-about,
  .meta-right,
  .bottom-right,
  .bottom-center,
  .corner-art,
  .center-stage {
    display: none;
  }

  .mobile-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    position: relative;
    padding: 20px 18px 48px;
    min-height: 100svh;
    gap: 16px;
  }

  .mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: min(100%, 560px);
    margin: 0 auto;
    padding: 10px 0 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .mobile-app-title {
    font-size: clamp(28px, 7.6vw, 38px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: #111111;
    text-align: center;
  }

  .mobile-app-subtitle {
    margin-top: 4px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #888888;
    text-align: center;
  }

  .mobile-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    margin-top: 10px;
  }

  .mobile-tabs a {
    display: inline-block;
    padding: 0;
    border: 0;
    color: #111111;
    text-transform: uppercase;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.16em;
    font-weight: 600;
    background: transparent;
  }

  .mobile-logo {
    display: none;
  }

  .mobile-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: min(100%, 520px);
    margin: 0 auto;
  }

  .mobile-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    width: 100%;
    padding: 12px 0 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: mobile-rise 0.55s ease both;
  }

  .mobile-contact {
    font-size: 18px;
    font-weight: 600;
    color: #111111;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .mobile-social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    width: 100%;
  }

  .mobile-social-btn {
    display: inline-block;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #111111;
    background: transparent;
    border: 0;
  }

  .mobile-social-btn:hover,
  .mobile-tabs a:hover {
    opacity: 0.7;
  }

  .mobile-grid {
    display: grid;
    gap: 12px;
    width: 100%;
  }

  .mobile-card {
    background: #ffffff;
    border: 1px solid #efefef;
    border-radius: 12px;
    padding: 14px 14px 12px;
    text-align: center;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.05);
    animation: mobile-rise 0.55s ease both;
  }

  .mobile-project-card {
    width: 100%;
    padding: 8px 0 12px;
    border-top: 1px solid #f0f0f0;
  }

  .mobile-project-card:first-child {
    border-top: 0;
  }

  #mobile-about {
    text-align: left;
  }

  #mobile-about > .about-heading {
    text-align: center;
  }

  #mobile-about > .about-text,
  #mobile-about .mobile-about-column .about-heading,
  #mobile-about .mobile-about-column .about-text {
    text-align: left;
  }

  #mobile-about > .about-text {
    text-align: center;
  }

  #mobile-about .mobile-about-column .about-heading {
    text-align: center;
    align-self: center;
    width: auto;
  }

  .mobile-layout #mobile-about .mobile-about-column .about-text {
    text-align: center;
  }

  .mobile-layout .mobile-about-pair {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 6px;
  }

  .mobile-layout .mobile-about-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: fit-content;
    max-width: 100%;
  }

  .mobile-about-column .about-heading {
    width: 100%;
  }

  .mobile-about-column .about-text {
    width: 100%;
  }

  .mobile-divider {
    width: 100%;
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.28em;
    color: #111111;
    line-height: 1;
    margin: 4px 0;
    user-select: none;
  }

  .mobile-projects-list {
    display: grid;
    gap: 12px;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-project-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    align-items: center;
    margin-bottom: 4px;
  }

  .mobile-project-num {
    min-width: 2ch;
    font-size: 10px;
    font-weight: 700;
    color: #111111;
    letter-spacing: 0.12em;
  }

  .mobile-project-brand {
    font-size: 15px;
    font-weight: 600;
    color: #111111;
  }

  .mobile-small-title {
    font-size: 12px;
    color: #888888;
    margin-top: 6px;
    line-height: 1.2;
  }

  .mobile-video-note {
    font-size: 12px;
    color: #888888;
    margin: 6px 0 6px;
    text-align: center;
  }

  .mobile-project-type,
  .mobile-project-meta {
    font-size: 13px;
    line-height: 1.45;
    color: #777777;
  }

  .mobile-project-type {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 3px;
    color: #111111;
  }

  .mobile-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    margin: 8px 0 8px;
    background: #f2f2f2;
    overflow: hidden;
    border: 1px solid #ededed;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    animation: mobile-rise 0.55s ease both;
  }

  .mobile-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .mobile-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 14px 0 0;
    text-align: center;
  }

  .mobile-footer .corner-email {
    text-align: center;
  }

  .mobile-layout .about-heading {
    font-size: 11px;
    margin-bottom: 8px;
    padding-bottom: 5px;
    text-align: center;
    letter-spacing: 0.18em;
  }
  .about-text { font-size: 13px; line-height: 1.55; }
  .mt { margin-top: 10px; }


  .mobile-about-column .mt {
    margin-top: 0;
  }

  .corner-email {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    letter-spacing: 0.08em;
  }

  .mobile-trusted {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0 4px;
    animation: mobile-rise 0.55s ease both;
  }

  .mobile-trusted-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  @keyframes mobile-rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mobile-trusted-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #111111;
  }

  .mobile-trusted-logo {
    height: 36px; /* base visual height for mobile */
    width: auto;
    display: block;
    opacity: 1;
    filter: none;
  }

  /* Mobile per-logo optical tweaks */
  .logo-involio.mobile-trusted-logo, .mobile-trusted-logo.logo-involio { height: 38px; }
  .logo-cantina.mobile-trusted-logo, .mobile-trusted-logo.logo-cantina { height: 40px; }
  .logo-lovable.mobile-trusted-logo, .mobile-trusted-logo.logo-lovable { height: 36px; }

  .mobile-trusted-logo[src$="involio.png"] {
    transform: scale(1.05);
    transform-origin: left center;
  }

  .mobile-layout,
  .mobile-appbar,
  .mobile-panel,
  .mobile-intro,
  .mobile-grid,
  .mobile-card,
  .mobile-about-column,
  .mobile-footer {
    box-sizing: border-box;
  }
}

@media (min-width: 769px) {
  .mobile-layout {
    display: none;
  }
  .mobile-projects-list {
    display: none;
  }
}

/* Mobile-only restyling to match provided UI (max-width: 768px) */
@media (max-width: 768px) {
  :root {
    --mobile-side-padding: 24px;
    --mobile-accent: #111111;
    --muted: #777777;
    --search-bg: #f2f2f2;
  }

  html, body {
    background: #ffffff;
    color: var(--muted);
    -webkit-font-smoothing: antialiased;
  }

  /* Apply generous side padding and breathing room */
  .mobile-panel {
    padding: 0 var(--mobile-side-padding) 88px; /* leave room for bottom nav */
  }

  /* Header / top bar */
  .mobile-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--mobile-side-padding);
    background: transparent;
  }

  .mobile-app-title {
    font-weight: 800;
    font-size: 28px;
    color: var(--mobile-accent);
    line-height: 1.05;
    text-align: left;
  }

  /* Location pill (use subtitle as location) */
  .mobile-app-subtitle {
    font-size: 12px;
    color: #888;
    padding: 6px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
  }

  /* small avatar top-right via pseudo element if no DOM avatar */
  .mobile-appbar::after {
    content: '';
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eee;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02);
    margin-left: 12px;
  }

  /* Hero text styling (large bold headline) */
  .mobile-hero, .mobile-app-title, .mobile-card .about-heading {
    font-weight: 800;
    color: var(--mobile-accent);
  }

  .mobile-app-title { font-size: 30px; }

  /* Search bar styling: target common selectors and inputs */
  .mobile-search, .search-bar, input[type="search"], .mobile-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--search-bg);
    border-radius: 50px;
    padding: 12px 16px;
    border: none;
    outline: none;
    color: var(--mobile-accent);
  }

  .mobile-search svg, .search-bar svg { height: 16px; width: 16px; color: #999; }

  /* Section row: label + see more link */
  .mobile-section-row, .mobile-card .about-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 12px;
  }

  .mobile-section-row .see-more, .mobile-card .see-more { font-size: 13px; color: #999; font-weight: 600; }

  /* Cards */
  .mobile-project-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(16,24,40,0.06);
    margin-bottom: 16px;
  }

  .mobile-project-card img,
  .mobile-project-card video,
  .mobile-video-frame > img,
  .mobile-video-frame > video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .mobile-project-header {
    padding: 12px 14px;
  }

  .mobile-project-brand { font-weight: 700; color: var(--mobile-accent); font-size: 16px; }
  .mobile-project-type { font-size: 13px; color: #888; margin-top: 6px; }

  /* Bottom nav (use mobile-footer area) */
  .mobile-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 40;
  }

  .mobile-footer a { color: #999; width: 40px; height: 40px; display: inline-flex; align-items:center; justify-content:center; }
  .mobile-footer a.active { color: var(--mobile-accent); font-weight: 700; }

  /* Trusted by row adjustments inside mobile layout */
  .mobile-trusted {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0 88px; /* keep above bottom nav */
  }

  .mobile-trusted-logos { display:flex; gap: 32px; align-items:center; }

  /* Ensure per-logo optical tweaks are applied via classes we added */
  .logo-lovable { height: 36px; }
  .logo-involio { height: 38px; }
  .logo-cantina { height: 40px; }

}
