/* ============================================
   Layer Studio — Custom Styles
   ============================================ */

:root {
  --bg: hsl(220, 10%, 8%);
  --bg-light: hsl(220, 8%, 12%);
  --bg-lighter: hsl(220, 7%, 16%);
  --accent: #E8E3DC;
  --clay: #B8A99A;
  --sand: #C4B5A4;
  --stone: #9A8E82;
  --text: #E8E3DC;
  --text-80: rgba(232, 227, 220, 0.8);
  --text-60: rgba(232, 227, 220, 0.6);
  --text-40: rgba(232, 227, 220, 0.4);
  --text-20: rgba(232, 227, 220, 0.2);
}

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

html {
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  background-color: var(--bg);
  overflow-x: hidden;
}

/* ---- Grain Overlay ---- */

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---- Hero ---- */

.hero-headline {
  font-size: clamp(4rem, 14vw, 150px);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.035em;
  color: #E8E3DC;
}

.hero-headline-line {
  background: linear-gradient(135deg, #ffffff 0%, #E8E3DC 55%, #B8A99A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #E8E3DC;
}

.hero-gradient {
  background: linear-gradient(
    180deg,
    rgba(15, 17, 21, 0.15) 0%,
    rgba(15, 17, 21, 0.45) 40%,
    rgba(15, 17, 21, 0.92) 100%
  );
}

/* ---- Navbar ---- */

.nav-scrolled {
  background: rgba(15, 17, 21, 0.8) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-color: rgba(232, 227, 220, 0.06) !important;
}

.nav-link {
  position: relative;
  transition: color 0.35s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
  width: 100%;
}

/* ---- Buttons ---- */

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 15px 34px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-block;
  color: var(--text-80);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--text-20);
  padding: 15px 34px;
  background: transparent;
  cursor: pointer;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Section Divider ---- */

.section-divider {
  width: 60px;
  height: 1px;
  background: var(--clay);
  opacity: 0.4;
}

/* ---- Service Images ---- */

.service-image-wrapper {
  overflow: hidden;
}

.service-image-wrapper img {
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-image-wrapper:hover img {
  transform: scale(1.04);
}

/* ---- Project Cards ---- */

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.project-card img {
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover img {
  transform: scale(1.04);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(15, 17, 21, 0.75));
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Process ---- */

.process-line {
  transform-origin: top center;
}

/* ---- Material Section ---- */

.material-section {
  position: relative;
  overflow: hidden;
}

/* ---- Testimonial ---- */

.testimonial-card {
  border-left: 1px solid var(--text-20);
  transition: border-color 0.4s ease;
}

.testimonial-card:hover {
  border-color: var(--clay);
}

/* ---- Mobile Menu ---- */

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--accent);
  margin: 0.75rem 0;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
  letter-spacing: 0.02em;
}

.mobile-menu a:hover {
  color: #fff;
}

.mobile-menu.active a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.active a:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.active a:nth-child(2) { transition-delay: 0.14s; }
.mobile-menu.active a:nth-child(3) { transition-delay: 0.20s; }
.mobile-menu.active a:nth-child(4) { transition-delay: 0.26s; }
.mobile-menu.active a:nth-child(5) { transition-delay: 0.32s; }

/* ---- Hamburger ---- */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 100;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--accent);
  transition: all 0.35s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Headline Gradient Utility ---- */

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #E8E3DC 55%, #B8A99A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--text-20);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-40);
}

/* ---- Selection ---- */

::selection {
  background: rgba(232, 227, 220, 0.12);
  color: var(--accent);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: clamp(2.8rem, 13vw, 4.5rem);
  }
}
