/* ===========================
   studio raama — STYLE SHEET
   =========================== */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* === Premium Palette ===
     Dark:            #1C1714  (deep brown-black)
     Cream:           #F5F0EB  (warm ivory)
     Beige Accent:    #B8A68E  (warm beige)
     White:           #FFFFFF
     Near-Black:      #111110
  */
  --terracotta: #B8A68E;
  --toasted-almond: #C8B8A0;
  --deep-amber: #1C1714;
  --muted-sage: #A0907A;
  --linen: #F5F0EB;

  --charcoal: #1C1714;
  --cream: #F5F0EB;
  --gold: #B8A68E;
  --white: #FFFFFF;
  --black: #1C1714;
  --grey: #7A7470;
  --font-heading: 'Poppins', Helvetica, Arial, sans-serif;
  --font-body: 'Poppins', Helvetica, Arial, sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Theme tokens — Light (default) */
  --bg-primary: #F5F0EB;
  --bg-secondary: #EFEBE6;
  --bg-tertiary: #F5F0EB;
  --bg-dark-section: #1C1714;
  --bg-footer: #111110;
  --bg-card: #FFFFFF;
  --bg-sidebar: #EFEBE6;
  --bg-sidebar-cta: #1C1714;
  --text-primary: #1C1714;
  --text-secondary: #4A4440;
  --text-body: #3A3530;
  --text-muted: #8A8279;
  --text-faint: #6A6460;
  --text-testimonial: #3A3530;
  --text-on-dark: #F5F0EB;
  --text-on-dark-muted: #A8A09A;
  --border-light: #D8D2CB;
  --border-medium: #B8A68E;
  --border-footer: #2A2520;
  --scrolled-bg: rgba(245,240,235,0.97);
  --scrolled-shadow: rgba(28,23,20,0.06);
  --card-shadow: rgba(28,23,20,0.08);
  --overlay-bg: rgba(28,23,20,0.72);
  --nav-mobile-bg: #1C1714;
  --blockquote-bg: #EFEBE6;
  --blockquote-text: #4A4440;
}

[data-theme="dark"] {
  --terracotta: #C8B8A0;
  --toasted-almond: #D4C8B0;
  --deep-amber: #8A8078;
  --muted-sage: #B0A090;
  --linen: #F5F0EB;

  --bg-primary: #141210;
  --bg-secondary: #1E1C1A;
  --bg-tertiary: #141210;
  --bg-dark-section: #1E1C1A;
  --bg-footer: #0A0908;
  --bg-card: #222018;
  --bg-sidebar: #1E1C1A;
  --bg-sidebar-cta: #141210;
  --text-primary: #F5F0EB;
  --text-secondary: #C8C0B8;
  --text-body: #D8D0C8;
  --text-muted: #9A9490;
  --text-faint: #A8A098;
  --text-testimonial: #D8D0C8;
  --text-on-dark: #F5F0EB;
  --text-on-dark-muted: #8A8078;
  --border-light: #2E2C28;
  --border-medium: #3A3830;
  --border-footer: #222018;
  --scrolled-bg: rgba(20,18,16,0.97);
  --scrolled-shadow: rgba(0,0,0,0.4);
  --card-shadow: rgba(0,0,0,0.4);
  --overlay-bg: rgba(20,18,16,0.80);
  --nav-mobile-bg: #1E1C1A;
  --blockquote-bg: #1E1C1A;
  --blockquote-text: #C8C0B8;
  --charcoal: #F5F0EB;
  --cream: #1E1C1A;
  --white: #F5F0EB;
  --black: #0A0908;
  --grey: #8A8480;
  --gold: #C8B8A0;
}

html { scroll-behavior: auto; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s ease, color 0.5s ease;
}

body.loading {
  overflow: hidden;
  height: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- PRELOADER ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.5s ease;
}

.preloader__inner {
  text-align: center;
}

.preloader__logo {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  opacity: 0;
  display: block;
  margin-bottom: 1.5rem;
}

.preloader__line {
  width: 60px;
  height: 2px;
  background: var(--terracotta);
  margin: 0 auto;
  transform: scaleX(0);
  transform-origin: left;
}

.preloader.done {
  pointer-events: none;
}

/* ---------- CUSTOM CURSOR ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
}

.cursor__dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor__ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
  opacity: 0.45;
}

.cursor.hover .cursor__ring {
  width: 60px;
  height: 60px;
  opacity: 0.3;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor { display: none !important; }
  body { cursor: auto !important; }
}

@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, .btn, .service-card, .portfolio__slide, .team-card, .hero__dot, .testimonials__btn, .nav__toggle, .theme-toggle, .hp-menu-btn, .hp-slide__btn, .nav-overlay__link {
    cursor: none;
  }
}

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--terracotta);
  z-index: 9998;
  transition: none;
}

/* ---------- TYPOGRAPHY ---------- */
.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: none;
  color: var(--muted-sage);
  margin-bottom: 1rem;
  position: relative;
}

.section-tag--upper {
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.section-title em {
  font-style: italic;
  font-weight: 300;
}

/* Word animation wrapper */
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.word-inner {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.btn--primary {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

.btn--primary:hover {
  background: var(--deep-amber);
  color: var(--linen);
  border-color: var(--deep-amber);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn--outline:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* ---------- HEADER / NAV ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
}

.header.scrolled {
  background: var(--scrolled-bg);
  padding: 1rem 0;
  box-shadow: 0 2px 20px var(--scrolled-shadow);
}

.header.scrolled .nav__logo,
.header.scrolled .nav__link,
.header.scrolled .nav__logo-wrap .nav__logo {
  color: var(--text-primary);
}

.header.scrolled .nav__toggle span {
  background: var(--text-primary);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo-wrap {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
  transition: var(--transition);
}


.nav__menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  position: relative;
  transition: var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--muted-sage);
  transition: var(--transition);
}

.nav__link:hover::after { width: 100%; }

.nav__link--cta {
  padding: 0.6rem 1.5rem;
  border: 1.5px solid var(--white);
}

.header.scrolled .nav__link--cta {
  border-color: var(--text-primary);
}

.nav__link--cta:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white);
}

.nav__link--cta::after { display: none; }

.nav__close { display: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__slide.active { opacity: 1; }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(30,20,16,0.50);
}

.hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 5rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero__title em {
  font-style: italic;
  color: var(--toasted-almond);
  font-weight: 300;
}

.hero__indicators {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.hero__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--white);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.hero__dot.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

/* ---------- MISSION ---------- */
.mission {
  padding: 8rem 0;
  background: var(--bg-secondary);
}

.mission__inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.mission .section-title {
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.mission .section-title br {
  display: block;
  content: "";
  margin: 0;
}

.mission__text {
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.mission__text:last-of-type {
  margin-bottom: 2.5rem;
}

/* ---------- MARQUEE TICKER ---------- */
.marquee-section {
  padding: 2rem 0;
  background: var(--bg-primary);
  overflow: hidden;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.marquee {
  overflow: hidden;
  position: relative;
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: marqueeScroll 22s linear infinite;
}

.marquee-section:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8A7A64;
  padding: 0 0.5rem;
  flex-shrink: 0;
}

.marquee__separator {
  font-size: 1rem;
  color: #8A7A64;
  opacity: 0.4;
  padding: 0 1rem;
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- SERVICES ---------- */
.services {
  padding: 8rem 0;
  text-align: center;
}

.services__intro {
  max-width: 720px;
  margin: 0 auto 3rem;
  color: var(--text-body);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.8;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: var(--transition);
  perspective: 800px;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px var(--card-shadow);
}

.service-card__img {
  height: 220px;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.service-card:hover .service-card__img {
  transform: scale(1.05);
}

.service-card__body {
  padding: 1.5rem;
  text-align: left;
}

.service-card__body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 0.5rem;
}

.service-card__body p {
  font-size: 0.875rem;
  color: var(--terracotta);
  line-height: 1.6;
}

div.service-card {
  display: block;
  color: inherit;
}

/* ---------- INDUSTRIES ---------- */
.industries {
  padding: 8rem 0;
  background: var(--bg-dark-section);
  text-align: center;
}

.industries .section-title { color: var(--text-on-dark); }

.industries__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.industry-item {
  text-align: center;
  color: var(--text-on-dark);
  transition: var(--transition);
}

.industry-item:hover { transform: translateY(-4px); }

.industry-item svg {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  color: var(--toasted-almond);
}

.industry-item h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ---------- DIFFERENTIATORS (5-slide pinned fullscreen) ---------- */
.diff-section {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #1C1714;
}

.diff-section__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
}

/* Dark overlay so text is readable over the image */
.diff-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.82);
  z-index: 1;
}

.diff-section > * {
  position: relative;
  z-index: 2;
}

.diff-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.diff-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Slide inner — content container */
.diff-slide__inner {
  width: 90%;
  max-width: 700px;
  text-align: center;
}

/* Slide 0: Intro */
.diff-slide[data-slide="0"] .diff-slide__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
  margin-bottom: 1.5rem;
}

.diff-slide[data-slide="0"] .diff-slide__title em {
  font-style: italic;
  font-weight: 300;
  color: #FFFFFF;
}

/* Large floating number — hidden */
.diff-slide__num {
  display: none;
}

/* Feature heading */
.diff-slide__heading {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-on-dark);
  margin-bottom: 1.25rem;
}

.diff-slide__heading em {
  font-style: italic;
  font-weight: 300;
  color: #FFFFFF;
}

/* Slide body text */
.diff-slide__text {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 300;
  line-height: 1.8;
  color: #FFFFFF;
  font-weight: 500;
  max-width: 560px;
  margin: 0 auto;
}

/* Thin progress bar at bottom */
.diff-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.08);
  z-index: 12;
}

.diff-progress__bar {
  height: 100%;
  width: 20%;
  background: var(--terracotta);
  transition: width 0.5s ease;
}

/* Counter — bottom right */
.diff-counter {
  position: absolute;
  bottom: 1.5rem;
  right: 5%;
  z-index: 12;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.1em;
}

.diff-counter__cur {
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

/* ---------- PORTFOLIO (Carousel) ---------- */
.portfolio {
  padding: 8rem 0 4rem;
  background: var(--bg-secondary);
  text-align: center;
}

.portfolio__carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
}

.portfolio__slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.portfolio__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.portfolio__slide.active {
  opacity: 1;
  z-index: 1;
}

.portfolio__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.portfolio__arrow:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-50%) scale(1.1);
}

.portfolio__arrow--prev { left: 1.5rem; }
.portfolio__arrow--next { right: 1.5rem; }

.portfolio__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  z-index: 2;
}

.portfolio__overlay h4 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.portfolio__overlay p {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--toasted-almond);
}

/* ---------- TESTIMONIALS ---------- */
.testimonials {
  padding: 8rem 0;
  text-align: center;
  background: var(--bg-primary);
}

.testimonials__carousel {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  min-height: 250px;
}

.testimonial-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.testimonial-card.active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.testimonial-card__text {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.9;
  color: var(--text-testimonial);
  margin-bottom: 2rem;
}

.testimonial-card__author strong {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.testimonial-card__author span {
  font-size: 0.8rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.testimonials__nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.testimonials__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--border-medium);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
}

.testimonials__btn:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* ---------- FEATURED IN ---------- */
.featured-in {
  padding: 6rem 0;
  background: var(--bg-primary);
  text-align: center;
  overflow: hidden;
}

.featured-in__inner {
  max-width: 900px;
  margin: 0 auto;
}

.featured-in__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted-sage);
  margin-bottom: 3rem;
  position: relative;
}

.featured-in__label::before,
.featured-in__label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: var(--border-medium);
}

.featured-in__label::before { right: calc(100% + 1.25rem); }
.featured-in__label::after { left: calc(100% + 1.25rem); }

.featured-in__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.featured-in__card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 2rem;
  border: 1px solid var(--border-light);
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.featured-in__card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-in__card:hover::before {
  width: 100%;
}

.featured-in__card:hover {
  border-color: var(--terracotta);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--card-shadow);
}

.featured-in__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
  transition: var(--transition);
}

.featured-in__card:hover .featured-in__icon {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white);
}

.featured-in__pub {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.featured-in__title {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.featured-in__cta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  transition: letter-spacing 0.3s ease;
}

.featured-in__card:hover .featured-in__cta {
  letter-spacing: 0.15em;
}

.featured-in__quote {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-light);
}

.featured-in__quote span {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--toasted-almond);
}

.featured-in__logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
}

.featured-in__logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}

.featured-in__logo-item svg {
  color: var(--terracotta);
}

.featured-in__logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
}

/* IDW logo has dark background — no rounding needed, Home Pub is text on white */
.featured-in__logo-item:first-child .featured-in__logo-img {
  border-radius: 50%;
}

.featured-in__logo-item:last-child .featured-in__logo-img {
  border-radius: 8px;
  width: 140px;
  height: auto;
}

.featured-in__logo-item span {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .featured-in__logos { flex-direction: column; gap: 2rem; }
  .featured-in__label::before,
  .featured-in__label::after { width: 30px; }
}

/* ---------- TEAM ---------- */
.team {
  padding: 8rem 0;
  background: var(--bg-secondary);
  text-align: center;
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.team-card {
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px var(--card-shadow);
  border-color: var(--terracotta);
}

.team-card__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.team-card:hover .team-card__photo img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.team-card__body {
  text-align: center;
  padding: 2rem 1.5rem;
}

.team-card__body h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.team-card__body span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-sage);
  margin-bottom: 1rem;
}

.team-card__body p {
  font-size: 0.9rem;
  color: var(--text-faint);
  line-height: 1.7;
}

/* ---------- CONNECT ---------- */
.connect {
  padding: 8rem 0;
  background: var(--bg-dark-section);
  text-align: center;
  position: relative;
  z-index: 2;
}

.connect__inner {
  max-width: 700px;
  margin: 0 auto;
}

.connect__inner h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
  margin-bottom: 1.25rem;
}

.connect__inner p {
  font-size: 1rem;
  color: var(--text-on-dark-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.connect__actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.connect .btn--primary {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.connect .btn--primary:hover {
  background: transparent;
  color: var(--toasted-almond);
}

.connect .btn--outline {
  color: var(--text-on-dark);
  border-color: var(--text-on-dark);
}

.connect .btn--outline:hover {
  background: var(--text-on-dark);
  color: var(--bg-dark-section);
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 5rem 0 2rem;
  background: var(--bg-footer);
  color: var(--text-on-dark-muted);
  position: relative;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-on-dark);
  display: inline-block;
  margin-bottom: 1rem;
}

.footer__tagline {
  font-size: 0.8rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.7;
  max-width: 300px;
  color: var(--text-on-dark-muted);
}

.footer__brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer__links h4,
.footer__social h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  margin-bottom: 1.25rem;
}

.footer__links li { margin-bottom: 0.6rem; }

.footer__links a {
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.footer__links a:hover { color: var(--toasted-almond); }

.footer__icons {
  display: flex;
  gap: 1rem;
}

.footer__icons a {
  transition: color 0.3s ease;
  color: var(--text-on-dark-muted);
}

.footer__icons a:hover { color: var(--terracotta); }

.footer__bottom {
  border-top: 1px solid var(--border-footer);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
}

/* ---------- THEME TOGGLE ---------- */
.theme-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  padding: 0 3px;
  margin-left: 1rem;
  flex-shrink: 0;
}

.header.scrolled .theme-toggle {
  background: rgba(0,0,0,0.06);
  border-color: var(--border-medium);
}

[data-theme="dark"] .header.scrolled .theme-toggle {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.theme-toggle__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.theme-toggle__thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--terracotta);
  transition: left 0.3s cubic-bezier(0.68, -0.15, 0.265, 1.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .theme-toggle__thumb {
  left: calc(100% - 20px);
}

.theme-toggle__icon {
  width: 12px;
  height: 12px;
  color: #fff;
}

.theme-toggle__icon--moon { display: none; }
.theme-toggle__icon--sun { display: block; }

[data-theme="dark"] .theme-toggle__icon--moon { display: block; }
[data-theme="dark"] .theme-toggle__icon--sun { display: none; }

/* ---------- EMAIL SMALL FONT ---------- */
.btn--email {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.connect__actions .btn--outline {
  text-transform: none;
}

/* ---------- ITALIC ACCENTS ---------- */
.service-card__body h3 em {
  font-style: italic;
  font-weight: 300;
}

.team-card__body span em {
  font-style: italic;
}

/* ---------- PERFORMANCE ---------- */
/* Only apply content-visibility on homepage sections that benefit from it.
   Service pages use these classes too but in shorter layouts where
   content-visibility can interfere with scroll and rendering. */
.hero ~ .services,
.hero ~ .differentiators,
.hero ~ .portfolio,
.hero ~ .testimonials,
.hero ~ .featured-in,
.hero ~ .team,
.hero ~ .connect,
.hero ~ .footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.hero__slide {
  will-change: transform;
}

.marquee__track {
  will-change: transform;
}

/* ---------- REVEAL (GSAP) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

/* ---------- RESPONSIVE — TABLET (1024px) ---------- */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .diff-slide__num { font-size: clamp(8rem, 20vw, 14rem); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio__carousel { max-width: 100%; margin: 0 1rem; }

  .mission { padding: 5rem 0; }
  .services { padding: 5rem 0; }
  .differentiators { padding: 5rem 0; }
  .portfolio { padding: 5rem 0 3rem; }
  .testimonials { padding: 5rem 0; }
  .team { padding: 5rem 0; }
  .connect { padding: 5rem 0; }

  .section-title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 2rem; }
}

/* ---------- RESPONSIVE — MOBILE (768px) ---------- */
@media (max-width: 768px) {
  .container { width: 92%; }

  /* NAV */
  .nav__toggle { display: flex; }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--nav-mobile-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 999;
  }

  .nav__menu.open { right: 0; }

  /* Close button inside mobile menu */
  .nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: none;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    color: var(--white);
  }

  .nav__close:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
  }

  .nav__close svg {
    width: 18px;
    height: 18px;
  }

  .nav__menu .nav__link,
  .header.scrolled .nav__menu .nav__link {
    color: var(--white);
    font-size: 1.1rem;
  }

  .nav__link--cta,
  .header.scrolled .nav__link--cta {
    border-color: var(--white);
  }

  .nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav__toggle.active span:nth-child(2) { opacity: 0; }
  .nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* HERO */
  .hero { min-height: 500px; }
  .hero__content { padding-top: 4rem; }
  .hero__title { font-size: clamp(1.8rem, 5vw, 2.5rem); max-width: 100%; }
  .hero__subtitle { font-size: 0.95rem; max-width: 100%; margin-bottom: 1.5rem; }

  /* MISSION */
  .mission { padding: 4rem 0; }
  .mission__text { font-size: 1rem; line-height: 1.8; }

  /* MARQUEE */
  .marquee__item { font-size: 0.8rem; }

  /* SERVICES */
  .services { padding: 4rem 0; }
  .services__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .services__intro { font-size: 0.95rem; }
  .service-card__img { height: 200px; }

  /* DIFFERENTIATORS */
  .differentiators { padding: 4rem 0; }
  .diff-section { height: auto; min-height: auto; overflow: visible; }
  .diff-slide { position: relative; opacity: 1; pointer-events: auto; min-height: 70vh; padding: 3rem 5%; }
  .diff-slide__heading { font-size: clamp(1.4rem, 5vw, 2rem); }
  .diff-slide__title { font-size: clamp(1.8rem, 7vw, 2.5rem) !important; }
  .diff-section__video { object-position: center center; }
  .diff-section::before { position: relative; }

  /* PORTFOLIO */
  .portfolio { padding: 4rem 0 2rem; }
  .portfolio__carousel { aspect-ratio: 4 / 3; }
  .portfolio__arrow { width: 40px; height: 40px; }
  .portfolio__arrow--prev { left: 0.75rem; }
  .portfolio__arrow--next { right: 0.75rem; }
  .portfolio__overlay { padding: 1.5rem 1rem; }
  .portfolio__overlay h4 { font-size: 1.1rem; }

  /* TESTIMONIALS */
  .testimonials { padding: 4rem 0; }
  .testimonial-card__text { font-size: 1rem; }

  /* FEATURED IN */
  .featured-in { padding: 4rem 0; }
  .featured-in__logos { flex-direction: column; gap: 2rem; }
  .featured-in__label::before,
  .featured-in__label::after { width: 30px; }

  /* TEAM */
  .team { padding: 4rem 0; }
  .team__grid { grid-template-columns: 1fr; gap: 2rem; max-width: 400px; margin: 0 auto; }

  /* FEATURED IN */
  .featured-in__logo-item:last-child .featured-in__logo-img { width: 110px; }

  /* CONNECT */
  .connect { padding: 4rem 0; }
  .connect__inner h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
  .connect__actions { flex-direction: column; align-items: center; gap: 1rem; }

  /* FOOTER */
  .footer { padding: 3rem 0 1.5rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- RESPONSIVE — SMALL MOBILE (480px) ---------- */
@media (max-width: 480px) {
  .hero__title { font-size: 1.65rem; }
  .hero__subtitle { font-size: 0.9rem; }
  .section-title { font-size: clamp(1.75rem, 5vw, 2.25rem); }
  .section-tag { font-size: 0.85rem; letter-spacing: 0.15em; }

  .portfolio__arrow { width: 36px; height: 36px; }

  .mission__text { font-size: 0.95rem; }
  .diff-slide__num { font-size: 6rem; }

  .btn { padding: 0.85rem 2rem; font-size: 0.8rem; }
  .btn--email { font-size: 0.7rem; }

  .team-card__body h3 { font-size: 1.25rem; }
  .team-card__body span { font-size: 0.75rem; }
  .team-card__body p { font-size: 0.85rem; }

  .footer__logo { font-size: 1.15rem; }
  .footer__bottom { font-size: 0.75rem; }
}
