/* ==========================================
   1. CSS Variables & Theme (Pure Minimalist)
   ========================================== */
:root {
  /* Palette */
  /* 
     Theme Option 1: Warm Plaster (Architectural Luxury) 
     Vibe: High-end galleries, limestone, warm editorial.
  */
  --color-bg: #f7f3f0;
  --color-surface: #ede6e1;
  --color-text: #262321;
  --color-text-muted: #7d756f;
  --color-accent: #a38e7a;

  
     /* Theme Option 2: Sage Muse (Editorial Organic) 
     Uncomment to use: */
     /* --color-bg: #f2f4f0;
     --color-surface: #e5e9df;
     --color-text: #242b24;
     --color-text-muted: #6d786d;
     --color-accent: #9b826b; */
 

  
     /* Theme Option 3: Raw Canvas (Timeless Archive) 
     Uncomment to use: */
     /* --color-bg: #fcfaf5;
     --color-surface: #f2efe6;
     --color-text: #1c1b18;
     --color-text-muted: #78756e;
     --color-accent: #8a7d6a; */
 

  /* Typography */
  --font-sans: "Inter", sans-serif;
  --font-serif: "Playfair Display", serif;

  /* Fluid Typography (Viewport based) */
  --text-xs: clamp(0.75rem, 0.7vw + 0.5rem, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8vw + 0.5rem, 1rem);
  --text-base: clamp(1rem, 1vw + 0.5rem, 1.125rem);
  --text-md: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
  --text-lg: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  --text-xl: clamp(2.5rem, 4vw + 1rem, 4rem);
  --text-display: clamp(4rem, 8vw + 1rem, 9rem);

  /* Spacing & Layout */
  --container-padding: clamp(1rem, 5vw, 4rem);
  --section-gap: clamp(4rem, 10vw, 10rem);

  /* Easings for CSS transitions */
  --ease-custom: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ==========================================
   2. Modern Reset & Base
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  /* Lenis standard requirement */
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  cursor: none; /* Hide default cursor for our custom physics cursor */
}

/* Hide content until JS loads to prevent FOUC */
.no-js body {
  visibility: hidden;
}
body.loading {
  overflow: hidden;
}

/* ==========================================
   3. Custom Cursor Styles
   ========================================== */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--color-text), transparent 80%);
  transition:
    width 0.3s var(--ease-custom),
    height 0.3s var(--ease-custom),
    background-color 0.3s var(--ease-custom);
}

/* Cursor interaction states */
body.cursor-hover .cursor-outline {
  width: 60px;
  height: 60px;
  background-color: color-mix(in srgb, var(--color-text), transparent 95%);
  border-color: transparent;
  backdrop-filter: blur(2px);
}

/* ==========================================
   4. Typography Utilities
   ========================================== */
.font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
}
.text-display {
  font-size: var(--text-display);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================
   5. Magnetic Menu & Fullscreen Overlay
   ========================================== */
.menu-wrapper {
  position: fixed;
  top: var(--container-padding);
  right: var(--container-padding);
  z-index: 100;
}

.btn-magnetic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--color-text), transparent 80%);
  color: var(--color-text);
  cursor: none; /* Let the custom cursor handle this */
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.4s var(--ease-custom),
    color 0.4s var(--ease-custom),
    border-color 0.4s var(--ease-custom);
}

.btn-magnetic:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 90;
  clip-path: circle(
    0% at calc(100% - var(--container-padding) - 40px)
      calc(var(--container-padding) + 40px)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  list-style: none;
  text-align: center;
}

.nav-link {
  font-size: var(--text-xl);
  color: var(--color-text);
  text-decoration: none;
  display: block;
  margin: 1rem 0;
  overflow: hidden;
}

.nav-text {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.8s var(--ease-custom);
}

.nav-overlay.is-active .nav-text {
  transform: translateY(0%);
}

/* ==========================================
   6. Immersive Hero Section
   ========================================== */
.hero {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--container-padding);
  /* We don't hide overflow here to allow the Lenis scroll setup to function naturally */
}

.hero-image-wrapper {
  position: absolute;
  inset: var(--container-padding);
  clip-path: polygon(
    0 100%,
    100% 100%,
    100% 100%,
    0 100%
  ); /* Initial state for GSAP */
  will-change: clip-path;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.05); /* Reduced scale for a cleaner look */
  will-change: transform;
}

.hero-title-wrapper {
  position: relative;
  z-index: 10;
  mix-blend-mode: difference; /* Creates the high-end invert effect */
  color: var(--color-bg);
  text-align: center;
  pointer-events: none;
}

.hero-title .line {
  overflow: hidden; /* Crucial for the slide-up reveal */
}

.hero-title .word {
  display: inline-block;
  font-size: var(--text-display);
  line-height: 1;
  transform: translateY(110%);
  will-change: transform;
}

/* ==========================================
   7. Gallery & Asymmetrical Grid
   ========================================== */
.gallery {
  padding: var(--section-gap) var(--container-padding);
  background: var(--color-bg);
}

.gallery-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(3rem, 6vw, 6rem);
  gap: 2rem;
}

.filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.filter-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  cursor: none;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.4s var(--ease-custom);
}

.filter-btn.is-active,
.filter-btn:hover {
  color: var(--color-text);
}

.filter-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--color-text);
  transition: width 0.4s var(--ease-custom);
}

.filter-btn.is-active::after {
  width: 100%;
}

/* Dense Grid Setup */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense; /* Crucial for seamless repacking */
  gap: 2vw;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  will-change: transform;
}

/* Asymmetrical Spans */
.item-large {
  grid-column: span 8;
  grid-row: span 2;
  aspect-ratio: 16/9;
}
.item-portrait {
  grid-column: span 4;
  grid-row: span 2;
  aspect-ratio: 3/4;
}
.item-landscape {
  grid-column: span 6;
  grid-row: span 1;
  aspect-ratio: 16/10;
}
.item-square {
  grid-column: span 4;
  grid-row: span 1;
  aspect-ratio: 1/1;
}
.item-tall {
  grid-column: span 4;
  grid-row: span 2;
  aspect-ratio: 4/5;
}
.item-wide {
  grid-column: span 8;
  grid-row: span 1;
  aspect-ratio: 21/9;
}

@media (max-width: 1024px) {
  .item-large {
    grid-column: span 12;
  }
  .item-landscape,
  .item-wide {
    grid-column: span 12;
  }
  .item-portrait,
  .item-square,
  .item-tall {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .gallery-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    aspect-ratio: auto;
    height: 60vh;
  }
}

.img-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-surface);
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05); /* Reduced scale for parallax & hover */
  transition:
    transform 1.2s var(--ease-custom),
    filter 0.8s ease;
  will-change: transform;
}

/* Anti-AI Design: Instead of scaling UP, we scale DOWN for a highly sophisticated focus effect */
.gallery-item:hover .img-wrapper img {
  transform: scale(1);
  filter: brightness(0.9);
}

/* ==========================================
   8. About Section
   ========================================== */
.about {
  padding: var(--section-gap) var(--container-padding);
  background: var(--color-bg);
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(4rem, 8vw, 10rem);
  align-items: center;
}

.about-content h2 {
  margin-bottom: 2rem;
  line-height: 1;
}

.about-text {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 600px;
  will-change: transform, opacity;
}

.parallax-wrapper {
  height: 90vh; /* Reduced from 120vh to be less overwhelming */
  margin-top: -5vh;
}

@media (max-width: 768px) {
  .about-container {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .parallax-wrapper {
    height: 60vh;
    margin-top: 0;
  }
}

/* ==========================================
   9. Journal / Blogs Index
   ========================================== */
.blogs {
  padding: var(--section-gap) var(--container-padding);
  background: var(--color-surface);
  position: relative;
}

.blogs-header {
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.blog-list {
  list-style: none;
  border-top: 1px solid color-mix(in srgb, var(--color-text), transparent 90%);
  position: relative;
}

.blog-item {
  border-bottom: 1px solid
    color-mix(in srgb, var(--color-text), transparent 90%);
}

.blog-link {
  display: grid;
  grid-template-columns: 100px 1fr 150px;
  align-items: center;
  padding: 2.5rem 0;
  text-decoration: none;
  color: var(--color-text);
  transition:
    padding 0.4s var(--ease-custom),
    color 0.4s var(--ease-custom);
}

.blog-link:hover {
  padding-left: 2rem;
  padding-right: 2rem;
  color: var(--color-text-muted);
}

.blog-title {
  font-size: var(--text-lg);
  font-weight: 400;
}

.blog-date,
.blog-category {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .blog-link {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .blog-date,
  .blog-category {
    display: none;
  }
}

/* Custom Hover Image Reveal Logic */
.hover-image-reveal {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 280px;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  z-index: 10;
  opacity: 0;
  transform: scale(0.8) translate(-50%, -50%);
  transition:
    opacity 0.4s var(--ease-custom),
    transform 0.4s var(--ease-custom);
  will-change: transform, opacity;
}

.hover-image-reveal.is-active {
  opacity: 1;
  transform: scale(1) translate(-50%, -50%);
}

/* ==========================================
   10. Conversational Contact Form
   ========================================== */
.contact {
  padding: var(--section-gap) var(--container-padding);
  background: var(--color-bg);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.contact-container {
  max-width: 1200px;
}

.contact h2 {
  margin-bottom: 4rem;
}

.sentence {
  font-size: var(--text-xl);
  line-height: 1.6;
  font-family: var(--font-serif);
}

.input-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 0.5rem;
  vertical-align: bottom;
}

.text-input {
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  padding: 0 0.5rem 0.2rem 0;
  width: 250px;
  outline: none;
  text-align: center;
}

.text-input::placeholder {
  color: color-mix(in srgb, var(--color-text), transparent 80%);
  font-weight: 300;
}

/* Animated Underline */
.input-wrapper .line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: color-mix(in srgb, var(--color-text), transparent 80%);
}

.input-wrapper .line::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-text);
  transition: width 0.6s var(--ease-custom);
}

.text-input:focus + .line::after,
.text-input:valid + .line::after {
  width: 100%;
}

.btn-submit {
  margin-top: 4rem;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: none;
}

/* ==========================================
   11. Map Section
   ========================================== */
.map-section {
  padding: 0 var(--container-padding) var(--section-gap);
  background: var(--color-bg);
}

.map-container {
  width: 100%;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
  border-radius: 2px; /* Subtle architectural feel */
  position: relative;
  filter: grayscale(1) contrast(1.1) brightness(0.9);
  transition: filter 0.8s var(--ease-custom);
  border: 1px solid color-mix(in srgb, var(--color-text), transparent 90%);
}

.map-container:hover {
  filter: grayscale(0.5) contrast(1) brightness(1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 768px) {
  .map-container {
    height: 40vh;
    min-height: 300px;
  }
}

/* ==========================================
   12. Project Inner Page (Horizontal Scroll)
   ========================================== */
.project-hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--container-padding);
  padding-bottom: 10vh;
  background: var(--color-bg);
}

.project-meta {
  display: flex;
  gap: 3rem;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  border-bottom: 1px solid
    color-mix(in srgb, var(--color-text), transparent 90%);
  padding-bottom: 1rem;
  max-width: 600px;
}

.project-title {
  line-height: 0.9;
}

/* Horizontal Scroll Setup */
.horizontal-scroll-wrapper {
  width: 100%;
  height: 100vh; /* Will be pinned by GSAP */
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  align-items: center;
}

.horizontal-scroll-container {
  display: flex;
  height: 70vh; /* Height of the actual photo track */
  padding: 0 var(--container-padding);
  gap: 4vw;
  will-change: transform;
}

.project-slide {
  position: relative;
  height: 100%;
  flex-shrink: 0; /* Prevents images from crushing together */
  overflow: hidden;
}

.project-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slide Variations */
.slide-large {
  width: 60vw;
}
.slide-portrait {
  width: 30vw;
}
.slide-landscape {
  width: 50vw;
}

.text-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--color-bg);
}

.editorial-pull-quote {
  font-size: var(--text-lg);
  line-height: 1.3;
  max-width: 80%;
  text-align: center;
}

.next-project {
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  text-align: center;
}

.next-project-link {
  text-decoration: none;
  color: var(--color-text);
  margin-top: 2rem;
  display: inline-block;
  transition: color 0.4s var(--ease-custom);
}

.next-project-link:hover {
  color: var(--color-text-muted);
}

/* ==========================================
   12. Editorial Article Page
   ========================================== */
.editorial-article {
  background: var(--color-bg);
  padding-top: clamp(8rem, 15vh, 12rem);
}

.article-header {
  padding: 0 var(--container-padding);
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.article-meta {
  display: flex;
  gap: 2rem;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  border-bottom: 1px solid
    color-mix(in srgb, var(--color-text), transparent 90%);
  padding-bottom: 1rem;
  max-width: 400px;
}

.article-hero-image {
  width: 100%;
  height: 70vh;
  overflow: hidden;
  margin-bottom: clamp(4rem, 8vw, 8rem);
}

/* The Reading Column */
.article-body {
  max-width: 65ch; /* Optimal reading width */
  margin: 0 auto;
  padding: 0 var(--container-padding);
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--color-text);
}

.article-body p {
  margin-bottom: 2.5rem;
}

.article-body h2 {
  font-size: var(--text-lg);
  font-family: var(--font-serif);
  margin: 4rem 0 2rem 0;
  line-height: 1.2;
}

/* Editorial Drop Cap */
.drop-cap::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 5rem;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 8px;
  padding-left: 3px;
  color: var(--color-text);
}

.editorial-quote {
  font-size: var(--text-xl);
  line-height: 1.4;
  margin: 4rem 0;
  padding-left: 2rem;
  border-left: 2px solid var(--color-text);
}

.article-inline-image {
  margin: 4rem 0;
  width: 100%; /* Spans full width of the reading column */
}

.article-inline-image img {
  width: 100%;
  height: auto;
  display: block;
}

.caption {
  display: block;
  margin-top: 1rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-family: var(--font-serif);
  font-style: italic;
  text-align: center;
}

.read-next {
  padding: var(--section-gap) var(--container-padding);
  background: var(--color-surface);
  text-align: center;
  margin-top: clamp(4rem, 10vw, 8rem);
}

.next-article-link {
  text-decoration: none;
  color: var(--color-text);
  display: inline-block;
  margin-top: 1rem;
  transition: color 0.4s var(--ease-custom);
}

.next-article-link:hover {
  color: var(--color-text-muted);
}

/* ==========================================
   13. Global Persistent Header
   ========================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: clamp(1.5rem, 3vw, 2rem) var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 900; /* High z-index to stay above gallery grid */

  /* High-end glassmorphism */
  background: color-mix(in srgb, var(--color-bg), transparent 15%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid
    color-mix(in srgb, var(--color-text), transparent 95%);
}

.header-logo a {
  text-decoration: none;
  color: var(--color-text);
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1;
}

.header-nav {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.header-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 4px;
  overflow: hidden;
}

/* Elegant sliding underline effect */
.header-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  transform: translateX(-101%);
  transition: transform 0.5s var(--ease-custom);
}

.header-nav a:hover::after {
  transform: translateX(0%);
}

/* ==========================================
   15. Mobile Navigation & Hamburger Menu
   ========================================== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000; /* Ensures it stays above the open menu */
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.mobile-toggle .line {
  width: 30px;
  height: 2px;
  background: var(--color-text);
  transition:
    transform 0.4s var(--ease-custom),
    opacity 0.4s ease;
}

@media (max-width: 768px) {
  /* Show the hamburger button */
  .mobile-toggle {
    display: flex;
  }

  /* Transform nav into a full-screen overlay */
  .header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;

    /* Start hidden (moved up) */
    transform: translateY(-100%);
    transition: transform 0.8s var(--ease-custom);
    z-index: 999;
  }

  /* Make links massive for mobile tap targets */
  .header-nav a {
    font-size: var(--text-xl);
    font-family: var(--font-serif);
    text-transform: none;
  }

  /* Active State: Slide menu down */
  .header-nav.is-open {
    transform: translateY(0);
  }

  /* Active State: Animate Hamburger to an 'X' */
  body.nav-open .mobile-toggle .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  body.nav-open .mobile-toggle .line:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .mobile-toggle .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Stop background scrolling when menu is open */
  body.nav-open {
    overflow: hidden;
  }
}

/* ==========================================
   14. Global Persistent Footer
   ========================================== */
.site-footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--section-gap) var(--container-padding) clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 10vw, 8rem);
  position: relative;
  z-index: 10;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid color-mix(in srgb, var(--color-bg), transparent 85%);
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

.footer-top h2 {
  line-height: 0.9;
  letter-spacing: -0.02em;
}

/* Invert the magnetic button colors for the dark footer */
.back-to-top {
  border-color: color-mix(in srgb, var(--color-bg), transparent 80%);
  color: var(--color-bg);
}

.back-to-top:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.footer-bottom {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  color: var(--color-bg);
  text-decoration: none;
  width: fit-content;
  position: relative;
}

.footer-copy {
  text-align: right;
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    gap: 3rem;
  }
  .footer-copy {
    text-align: left;
  }
}
