/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Base styles */
:root {
  --background: #FFF6EF;
  --text: #212121;
  --link: #D84315;
  --button: #D84315;
  --button-text: #fafafa;
  --footer-bg: #1A1A1A;
  --footer-accent: #FF6B35;
}

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

/* Text selection */
::selection {
  background-color: var(--footer-accent);
  color: white;
}

/* Custom cursor */
body {
  font-family: "Space Grotesk", sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  cursor: none;
}

.cursor {
  width: 20px;
  height: 20px;
  background: var(--text);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cursor.hover {
  transform: scale(1.5);
  background: var(--footer-accent);
}

.cursor.external-link {
  width: 32px;
  height: 32px;
  background: var(--text);
  border-radius: 4px;
  transform: translate(-50%, -50%);
}

.cursor.external-link::after {
  content: '\f14c';
  /* Font Awesome square-arrow-up-right icon */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--footer-accent);
  font-size: 20px;
  font-weight: bold;
}

.cursor.footer-cursor {
  background: #fafafa;
}

.cursor.footer-cursor.external-link {
  background: #fafafa;
}

.cursor.footer-cursor.external-link::after {
  color: var(--footer-accent);
}

/* Layout */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 2.8rem;
  font-weight: 600;
  letter-spacing: 3px;
}

.logo a {
  text-decoration: none;
  font-family: "Bytesized", sans-serif;
  font-weight: 400;
}

.logo a:hover {
  text-decoration: none;
}

.footer-logo a {
  font-size: 2.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  font-family: "Bytesized", sans-serif;
  color: #fafafa;
  text-decoration: none;
}

.color-white {
  color: #fafafa !important;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-button {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background-color: var(--footer-accent);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(255, 107, 53, 0.1);
}

.nav-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transition: 0.5s;
}

.nav-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 107, 53, 0.2);
  background-color: #FF8B5C;
}

.nav-button:hover::before {
  left: 100%;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  .hero-text {
    font-size: 19px;
  }

  .hero-intro,
  .typed-cursor {
    font-size: 29px;
  }

  .logo-slider-title {
    font-size: 36px;
    padding-left: 1rem;
  }

  .case-study h3 {
    font-size: 32px;
    letter-spacing: 1px;
  }

  .nav-button {
    padding: 0.5rem 1.2rem;
    font-size: 14px;
  }

  .scroll-arrow {
    padding: 3rem 0 1.5rem 0;
  }

  .scroll-arrow i {
    font-size: 2rem;
  }
}

/* Logo Slider */
.logo-slider {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.logo-slider-title {
  text-align: left;
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 3rem;
  color: var(--text);
  padding-left: 2rem;
}

/* Remove the blur effect */
.logo-slider::before,
.logo-slider::after {
  display: none;
}

.logo-track {
  display: flex;
  animation: slide 30s linear infinite;
  width: calc(200px * 14);
  /* 7 logos * 2 for seamless loop */
  padding-left: 0;
  margin-left: 2rem;
}

.logo-item {
  width: 200px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.logo-item img {
  max-width: 100%;
  max-height: 100%;
  filter: grayscale(100%) brightness(0) invert(1);
  opacity: 0.65;
  transition: all 0.3s ease;
}

.logo-item img:hover {
  opacity: 1;
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-200px * 7));
  }
}

/* Hero section */
.hero {
  padding-top: 4rem;
  padding-bottom: 15vh;
  /* Precisely a 15% vertical gap to the next section */
  position: relative;
}

.hero-text {
  font-size: 29px;
  line-height: 1.4;
  max-width: 100%;
  letter-spacing: 2px;
}

.hero-intro {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 2rem;
}

/* Scroll Arrows */
.scroll-arrow {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 4rem 0 2rem 0;
  cursor: pointer;
}

.scroll-arrow i {
  font-size: 2.5rem;
  color: var(--text);
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
}

.scroll-arrow:hover i {
  color: var(--footer-accent);
  transform: translateY(5px);
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-20px);
  }

  60% {
    transform: translateY(-10px);
  }
}

/* Case studies grid */
.case-studies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.case-study {
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.case-study:hover {
  transform: translateY(-5px);
}

.case-study img,
.case-study video {
  width: 100%;
  height: auto;
  border-radius: 20px;
  transition: opacity 0.3s ease;
}

.case-study video {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.case-study:hover video {
  opacity: 1;
}

.case-study:hover img {
  opacity: 0;
}

.case-study h3 {
  font-size: 32px;
  font-weight: 800;
  margin-top: 1rem;
  color: var(--text);
  line-height: 1.2;
  transition: color 0.3s ease;
}

/* Portfolio Carousel */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

.portfolio-desc {
  margin-bottom: 2rem;
  color: var(--text);
}

.carousel-controls .carousel-btn {
  background: var(--footer-accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: opacity 0.3s ease;
}

.carousel-controls .carousel-btn:hover {
  opacity: 0.8;
}

.carousel-container {
  width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
  padding-bottom: 1rem;
}

.carousel-container::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.carousel-track {
  display: flex;
  gap: 2rem;
  padding-right: 2rem;
}

.carousel-item {
  flex: 0 0 400px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .carousel-item {
    flex: 0 0 85vw;
  }
}

.carousel-img-wrap {
  width: 100%;
  height: 440px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  position: relative;
}

.carousel-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel-item:hover .carousel-img-wrap img {
  transform: scale(1.05);
}

.carousel-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.carousel-content p {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: #555;
  min-height: 44px;
}

.view-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--link);
  text-decoration: none;
}

.view-link:hover {
  text-decoration: underline;
}

.spacer {
  height: 150px;
}

/* CTA section */
.cta {
  text-align: center;
  padding: 4rem 0;
  background-color: var(--footer-bg);
  color: white;
  margin-top: 0;
}

.cta h2 {
  font-size: 36px;
  margin-bottom: 2rem;
}

.button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: var(--footer-accent);
  color: white;
  text-decoration: none;
  border-radius: 35px;
  margin-top: 1rem;
  transition: all 0.2s;
  font-size: 20px;
}

.button:hover {
  transform: scale(1.05);
  background-color: #FF8B5C;
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  padding: 4rem 2rem;
  margin-top: 4rem;
  color: white;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-cta {
  text-align: center;
  margin-bottom: 2rem;
}

.footer-cta h2 {
  font-size: 36px;
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-size: 24px;
  transition: color 0.2s ease;
}

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

.copyright {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
}

/* Typography */
h1,
h2 {
  margin-bottom: 1rem;
}

a {
  color: var(--link);
}

.para-head {
  font-size: 40px;
  letter-spacing: 3px;
}

/* Market Flags Section */
.market-flags {
  text-align: left;
  font-size: 48px;
  font-weight: 600;
  margin: 4rem 0 2rem;
  padding-left: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}

.flags-container {
  display: flex;
  gap: 2rem;
  margin-bottom: 0;
  margin-left: 1rem;
}

.flag-item {
  position: relative;
  cursor: pointer;
}

.flag-item img {
  width: 36px;
  height: 24px;
  object-fit: cover;
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.flag-item:hover img {
  transform: scale(1.1);
}

.flag-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--text);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 150px;
  text-align: center;
}

/* Bold Text Hover Effect */
.hero-text b {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
  color: var(--text);
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}

.hero-text b:hover {
  background-color: var(--footer-accent);
  color: white;
}

.hero-text b::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: white;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  border-bottom: 2px dashed white;
}

.hero-text b:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.text-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--text);
  color: white;
  padding: 1.2rem;
  border-radius: 4px;
  font-size: 20px;
  max-width: 520px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  text-shadow: none;
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
  text-align: left;
  width: max-content;
  min-width: 250px;
  max-width: 90vw;
}

@media (max-width: 768px) {
  .text-tooltip {
    min-width: unset;
    width: 250px;
    font-size: 16px;
    padding: 0.8rem;
    left: 10%;
    transform: translateX(-10%) translateY(-10px);
  }
}

.hero-text b:hover .text-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .hero-text b:hover .text-tooltip {
    transform: translateX(-10%) translateY(0);
  }
}

/* Flag Tooltips */
.flag-item:hover .flag-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Footer Button */
.footer-cta .button {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background-color: var(--footer-accent);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(255, 107, 53, 0.1);
}

.footer-cta .button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transition: 0.5s;
}

.footer-cta .button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 107, 53, 0.2);
  background-color: #FF8B5C;
}

.footer-cta .button:hover::before {
  left: 100%;
}

.view-work-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #333;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 2rem;
  transition: all 0.3s ease;
  text-transform: lowercase;
  animation: shake 2s infinite;
  margin-left: 2rem;
}

.view-work-btn:hover {
  background-color: #444;
  transform: translateY(-2px);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-2px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(2px);
  }
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--footer-accent);
  z-index: 1000;
  transition: width 0.1s ease;
}

/* Typing Effect */
.hero-intro {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  min-height: 50px;
}

.typed-cursor {
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  opacity: 1;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* Remove default cursor from interactive elements */
a,
button,
.case-study,
.scroll-arrow,
.nav-button,
.view-work-btn,
.btn-secondary,
.btn-primary {
  cursor: none !important;
}

/* --------------------------------------------------------------------------
   My work — case study strip (see .agents/rules/rules.md)
   -------------------------------------------------------------------------- */

#work.work--fullbleed {
  --color-bg-dark: #1c1a18;
  --color-text-primary: #1c1a18;
  --color-text-muted: #5a554f;
  --color-text-inverse: #ffffff;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --type-h2-size: 1.75rem;
  --type-h2-weight: 600;
  --type-h2-leading: 1.2;
  --type-body-size: 1.05rem;
  --type-body-leading: 1.65;
  --type-caption-size: 0.8rem;
  --type-caption-leading: 1.5;
  --type-btn-size: 0.85rem;
  --type-btn-weight: 600;
  --work-align-pad: 1rem;

  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  padding-right: 0;
  padding-left: 0;
  font-family: inherit;
  color: var(--color-text-primary);
  overflow-x: clip;
}

@media (min-width: 768px) {
  #work.work--fullbleed {
    --work-align-pad: max(2rem, calc((100vw - 1200px) / 2 + 2rem));
  }
}

.work-section__heading {
  padding-left: var(--work-align-pad);
  padding-right: 2rem;
  margin-bottom: var(--space-xl);
}

.work-section__title {
  font-family: inherit;
  font-size: 38px;
  font-weight: 700;
  line-height: var(--type-h2-leading);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-md);
  color: var(--color-text-primary);
}

.work-section__lede {
  max-width: 720px;
  margin: 0;
  font-size: var(--type-body-size);
  line-height: var(--type-body-leading);
  color: var(--color-text-primary);
}

.case-study-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding-left: var(--work-align-pad);
  padding-right: 0;
  margin: 0 0 80px;
  /* Strong deliberate gap between sibling studies */
}

.case-study-feature > * {
  min-width: 0;
}

.case-study-feature:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .case-study-feature {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    column-gap: var(--space-xl);
  }
}

.case-study-feature__text {
  max-width: 720px;
  padding-right: var(--space-md);
}

.case-study-feature__brand {
  margin-bottom: var(--space-md);
}

.case-study-feature__logo {
  display: block;
  width: 40px;
  height: auto;
  filter: grayscale(100%);
  opacity: 0.85;
}

.case-study-feature__title {
  font-family: inherit;
  font-size: 1.5rem;
  /* ~10% increase from 1.35rem */
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-sm);
}

.case-study-feature__meta {
  margin: 0 0 var(--space-lg);
  font-size: 1.05rem;
  /* ~10% increase from 0.95rem */
  line-height: 1.5;
  color: var(--color-text-muted);
}

.case-study-feature__body {
  margin: 0 0 var(--space-lg);
  font-size: 1.15rem;
  /* ~10% increase */
  line-height: var(--type-body-leading);
  color: var(--color-text-primary);
}

.case-study-feature__list {
  margin: 0 0 var(--space-lg);
  padding-left: 1.25rem;
  font-size: 1.15rem;
  /* ~10% increase */
  line-height: var(--type-body-leading);
  color: var(--color-text-primary);
}

.case-study-feature__list li {
  margin-bottom: var(--space-sm);
}

.case-study-feature__list li:last-child {
  margin-bottom: 0;
}

.btn-secondary {
  display: inline-block;
  background: var(--color-text-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: var(--type-btn-size);
  font-weight: var(--type-btn-weight);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.btn-secondary:hover {
  opacity: 0.8;
}

.case-study-feature__cta {
  margin-top: var(--space-xs);
}

.case-study-feature__gallery {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-md);
  margin: 0;
  margin-right: 0;
  scrollbar-color: rgba(28, 26, 24, 0.35) transparent;
  scrollbar-width: thin;
}

.case-study-feature__gallery-wrap {
  position: relative;
  width: 100%;
}

.gallery-nav-btn {
  position: absolute;
  top: calc(50% - var(--space-md) / 2);
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.3s ease, background 0.3s ease, transform 0.2s ease;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
}

.gallery-nav-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-50%) scale(1.05);
}

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

.gallery-nav-btn--prev {
  left: 2rem;
}

.gallery-nav-btn--next {
  right: 2rem;
}

.case-study-feature__track {
  display: flex;
  gap: 5px;
  width: max-content;
  padding-right: 0;
  margin-right: 0;
}

.case-study-feature__slide {
  flex: 0 0 auto;
  margin: 0;
}

@media (min-width: 768px) {
  .case-study-feature__slide {
    flex: 0 0 auto;
  }
}

.case-study-feature__frame {
  background: var(--color-bg-primary);
  border-radius: 5px;
  padding: var(--space-md);
  height: clamp(26rem, 75vh, 46rem);
  box-sizing: border-box;
  display: block;
}

.case-study-feature__frame img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
  border-radius: 5px;
  background: var(--color-bg-primary);
  box-shadow: 0 8px 24px rgba(28, 26, 24, 0.08);
}

.case-study-feature__caption {
  margin: var(--space-md) 0 0;
  font-size: 0.9rem;
  /* ~10% increase */
  font-weight: 400;
  line-height: var(--type-caption-leading);
  color: var(--color-text-muted);
  font-family: inherit;
  letter-spacing: 0.02em;
}

@media (max-width: 767px) {
  .case-study-feature {
    margin: 0 0 40px;
  }
  .case-study-feature__text {
    padding-right: var(--space-lg);
  }
  .gallery-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    display: flex;
  }
  .gallery-nav-btn--prev {
    left: 0.5rem;
  }
  .gallery-nav-btn--next {
    right: 0.5rem;
  }
  .case-study-feature__frame {
    height: auto;
    width: 85vw;
    padding: var(--space-sm);
  }
  .case-study-feature__frame img {
    height: auto;
    width: 100%;
    object-fit: contain;
  }
}

/* GLightbox Customizations */
.glightbox-container .goverlay {
  background: rgba(28, 26, 24, 0.8) !important;
  /* using the app's dark charcoal */
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}