:root {
  --color-dark: #141412;
  --color-light: #f0ede6;
  --color-gold: #c9a96e;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;

  --container-width: 1200px;
  --section-padding-y: 12vh;
}

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

html {
  font-size: 16px;
  /* Hide scrollbar for a cleaner luxury look, optional, but let's keep it visible for usability or style it */
}

body {
  font-family: var(--font-body);
  background-color: var(--color-dark); /* Initial */
  color: var(--color-light); /* Will be updated via JS if we want to invert text, though usually we can just rely on mix-blend-mode or section specific overrides */
  overflow-x: hidden;
  cursor: none; /* Custom cursor */
  transition: color 0.5s ease;
}

/* Typography base */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
}

p {
  line-height: 1.6;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: none; /* Let custom cursor handle hover states */
}

/* Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  position: relative;
  padding: var(--section-padding-y) 0;
  min-height: 50vh;
}

/* Text color based on data-theme */
body[data-current-theme="light"] {
  color: var(--color-dark);
}
body[data-current-theme="dark"] {
  color: var(--color-light);
}

/* Progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--color-gold);
  width: 0%;
  z-index: 1000;
}

/* CUSTOM CURSOR */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}

/* Cursor interaction state */
body.hovering a, body.hovering button {
  cursor: none;
}
.cursor-ring.hover {
  width: 60px;
  height: 60px;
  background-color: rgba(201, 169, 110, 0.1);
}

/* HERO SECTION */
.sec-hero {
  height: 200vh;
  padding: 0;
  position: relative;
}

.hero-content {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-dark);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 6rem);
  margin-bottom: 1rem;
  position: relative;
  z-index: 3;
}
.gold-highlight {
  color: var(--color-gold);
  font-style: italic;
  font-weight: 700;
}

.hero-badge {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--color-gold);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
  position: relative;
  z-index: 3;
}
.hero-badge.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1; /* Below the title and overlay */
  opacity: 0.5; /* Dimmed to make text readable */
  pointer-events: none;
}

/* INTRO */
.sec-intro {
  display: flex;
  align-items: center;
  min-height: 80vh;
}
.intro-text {
  font-size: clamp(1.5rem, 4vw, 3rem);
  line-height: 1.4;
  max-width: 900px;
  margin: 0 auto;
}
.text-center { text-align: center; }

/* ABOUT */
.sec-about {
  padding: 15vh 0;
}
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

/* WHAT I DO */
.services-list {
  list-style: none;
  max-width: 800px;
  margin: 0 auto;
}
.services-list li {
  display: flex;
  gap: 2rem;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(200, 200, 200, 0.1);
}
body[data-current-theme="light"] .services-list li {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
.services-list .num {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--color-gold);
  font-weight: bold;
}
.services-list .content h3 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.services-list .content p {
  color: rgba(255, 255, 255, 0.7);
}
body[data-current-theme="light"] .services-list .content p {
  color: rgba(0, 0, 0, 0.7);
}

/* CARES */
.sec-cares {
  padding: 10vh 0 20vh;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  margin-bottom: 5rem;
  font-weight: 600;
}
.cares-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.care-card {
  background: rgba(0, 0, 0, 0.03);
  padding: 3.5rem;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  perspective: 1000px;
  transform-style: preserve-3d;
}
body[data-current-theme="dark"] .care-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255,255,255,0.05);
}
.care-card.full-width {
  grid-column: 1 / -1;
}
.care-card .icon {
  width: 48px;
  height: 48px;
  color: var(--color-gold);
}
.care-card h3 {
  font-size: 2rem;
}

/* WORK */
.sec-work {
  padding: 10vh 0 20vh;
}
.work-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
.work-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  transform-origin: bottom center;
  overflow: hidden;
}
.work-card:hover {
  transform: translateY(-10px) scale(1.02) !important;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}
.work-info-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.work-info h2 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.work-info .role {
  font-family: var(--font-body);
  font-weight: bold;
  opacity: 0.8;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.work-info .desc {
  opacity: 0.7;
  margin: 0;
}
.work-preview {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: transform 0.5s ease;
}
.work-card:hover .work-preview {
  transform: translateY(0);
}
.work-preview img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  background-color: rgba(255,255,255,0.1);
  transition: transform 0.4s ease;
}
.work-card:hover .work-preview img {
  transform: scale(1.05);
}
/* SPECIFIC OVERRIDES FOR LOGO PREVIEWS */
.work-preview.logo-preview {
  background-color: rgba(255,255,255,0.05);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  aspect-ratio: 16 / 10;
}
.work-preview.logo-preview img {
  aspect-ratio: auto;
  background-color: transparent;
  object-fit: contain;
  max-height: 120px;
  width: auto;
}
.work-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s;
}
.work-card:hover .work-arrow {
  background: #fff;
  color: var(--color-dark);
  transform: translateX(10px);
}
.work-arrow svg {
  width: 20px;
  height: 20px;
}

/* CONTACT */
.sec-contact {
  padding: 20vh 0 5vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.contact-headline {
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 1;
}
.styled-link {
  position: relative;
  display: inline-block;
  color: inherit;
}
.styled-link .underline {
  position: absolute;
  bottom: 0.1em;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.85, 0, 0.15, 1);
}
.styled-link.draw .underline {
  transform: scaleX(1);
}

footer {
  margin-top: 20vh;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 0.9rem;
}
body[data-current-theme="dark"] footer {
  border-top-color: rgba(255,255,255,0.1);
}
.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-right {
  display: flex;
  gap: 2rem;
}
.footer-right a {
  transition: color 0.3s;
}
.footer-right a:hover {
  color: var(--color-gold);
}

/* =========================================
   ANIMATION CLASSES & STATES 
   ========================================= */

/* Clip text reveal from below */
.clip-text {
  overflow: hidden;
  display: inline-block;
}
.clip-text span {
  display: block;
  transform: translateY(100%);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.clip-text.intersected span {
  transform: translateY(0);
}

/* Fade up */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}
.fade-up.intersected {
  opacity: 1;
  transform: translateY(0);
}

/* Slide in from left/right */
.slide-in {
  opacity: 0;
  transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-in.left { transform: translateX(-50px); }
.slide-in.right { transform: translateX(50px); }

.slide-in.intersected {
  opacity: 1;
  transform: translateX(0);
}

/* 3D Flip */
.flip-card {
  opacity: 0;
  transform: rotateX(45deg) translateY(50px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.flip-card.intersected {
  opacity: 1;
  transform: rotateX(0) translateY(0);
}

/* Peel up */
.peel-up {
  opacity: 0;
  transform: translateY(100px) scale(0.95);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.peel-up.intersected {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .cares-grid {
    grid-template-columns: 1fr;
  }
  .services-list li {
    flex-direction: column;
    gap: 0.5rem;
  }
  .work-card {
    padding: 2rem;
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .work-preview.logo-preview {
    aspect-ratio: auto;
    padding: 2rem;
    min-height: 150px;
  }
  .work-arrow {
    align-self: flex-end;
  }
  .footer-flex {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
