/* ============================================================
   SALON THILINI — Ultra-Luxury Editorial
   Dark · Cinematic · Big Serif Type · Minimal
   ============================================================ */

:root {
  --bg: #0a090c;
  --bg-soft: #0f0d12;
  --text: #f3efe8;
  --muted: #9b9288;
  --gold: #c9a86a;
  --gold-soft: #e6cf9f;
  --line: rgba(201, 168, 106, 0.22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1200px, 88%);
  margin-inline: auto;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
}

em {
  font-style: italic;
}

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}
.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.preloader__mark {
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--gold);
  animation: fadeUp 1s var(--ease);
}
.preloader__line {
  width: 60px;
  height: 1px;
  background: var(--gold);
  animation: grow 1.2s var(--ease) infinite;
}
@keyframes grow {
  0% { transform: scaleX(0); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.6rem 0;
  transition: background 0.5s ease, padding 0.5s ease, backdrop-filter 0.5s ease;
}
.nav.scrolled {
  background: rgba(10, 9, 12, 0.7);
  backdrop-filter: blur(16px);
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  width: min(1400px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.brand__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--gold);
}
.brand__text {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}
.brand__text em {
  color: var(--gold);
}

.nav__links {
  display: flex;
  gap: 2.6rem;
}
.nav__link {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color 0.3s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}
.nav__link:hover {
  color: var(--text);
}
.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.7em 1.5em;
  border-radius: 50px;
  transition: 0.4s var(--ease);
}
.nav__cta:hover {
  background: var(--gold);
  color: #0a090c;
  border-color: var(--gold);
}
.nav__cta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25d366;
  animation: blink 1.6s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 28px;
  height: 1.5px;
  background: var(--text);
  transition: 0.3s ease;
}
.nav__toggle.active span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.nav__toggle.active span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  transform: scale(1.12);
  animation: heroZoom 2.4s var(--ease) forwards;
}
@keyframes heroZoom {
  to { transform: scale(1); }
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 9, 12, 0.55) 0%, rgba(10, 9, 12, 0.25) 40%, rgba(10, 9, 12, 0.9) 100%),
    linear-gradient(90deg, rgba(10, 9, 12, 0.7) 0%, transparent 60%);
}
.hero__content {
  position: relative;
  z-index: 2;
  width: min(1200px, 88%);
  margin-inline: auto;
}
.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1.6rem;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  line-height: 0.95;
  margin-bottom: 2rem;
}
.hero__line {
  display: block;
  overflow: hidden;
}
.hero__line--italic {
  font-style: italic;
  color: var(--gold-soft);
}
.hero__sub {
  font-size: 1rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.6rem;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.6rem;
  transition: gap 0.4s var(--ease), color 0.3s;
}
.hero__cta:hover {
  gap: 1.8rem;
  color: var(--gold-soft);
}
.hero__cta-arrow {
  font-size: 1.2rem;
  color: var(--gold);
}
.hero__scroll {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollPulse 2s var(--ease) infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto {
  padding: 10rem 0;
  background: var(--bg);
}
.manifesto__label,
.craft__label,
.contact__label {
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.4rem;
}
.manifesto__text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1.15;
  color: var(--text);
}
.manifesto__text em {
  color: var(--gold-soft);
}
.manifesto__accent {
  font-style: italic;
  color: var(--muted);
}

/* ============================================================
   FULL-BLEED IMAGE
   ============================================================ */
.fullbleed {
  height: 80vh;
  min-height: 480px;
  overflow: hidden;
  position: relative;
}
.fullbleed img {
  transform: scale(1.15);
  will-change: transform;
}

/* ============================================================
   CRAFT / SERVICES
   ============================================================ */
.craft {
  padding: 9rem 0;
  background: var(--bg-soft);
}
.craft__head {
  margin-bottom: 4rem;
}
.craft__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05;
}
.craft__title em {
  color: var(--gold-soft);
}
.craft__list {
  border-top: 1px solid var(--line);
}
.craft__item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 2.2rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s var(--ease), background 0.4s;
  position: relative;
}
.craft__item:hover {
  padding-left: 1.5rem;
  background: linear-gradient(90deg, rgba(201, 168, 106, 0.06), transparent);
}
.craft__num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--gold);
}
.craft__name {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 300;
  transition: color 0.3s, transform 0.4s var(--ease);
}
.craft__item:hover .craft__name {
  color: var(--gold-soft);
  transform: translateX(6px);
}
.craft__arrow {
  color: var(--gold);
  font-size: 1.4rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: 0.4s var(--ease);
}
.craft__item:hover .craft__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery {
  padding: 9rem 0;
  background: var(--bg);
}
.gallery__head {
  margin-bottom: 4rem;
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 300px;
  gap: 1.2rem;
}
.gallery__item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.gallery__item--tall {
  grid-row: span 2;
}
.gallery__item img {
  transition: transform 1.2s var(--ease), filter 0.6s;
  filter: saturate(0.9);
}
.gallery__item:hover img {
  transform: scale(1.08);
  filter: saturate(1.1);
}
.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10, 9, 12, 0.6));
  opacity: 0;
  transition: opacity 0.5s;
}
.gallery__item:hover::after {
  opacity: 1;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  position: relative;
  height: 90vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.contact__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.contact__media img {
  transform: scale(1.15);
  will-change: transform;
}
.contact__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 9, 12, 0.72);
}
.contact__content {
  position: relative;
  z-index: 2;
  width: min(800px, 88%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.contact__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1.05;
}
.contact__title em {
  color: var(--gold-soft);
}
.contact__sub {
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 4rem 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
}
.footer__tag {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.footer__social {
  display: flex;
  gap: 1rem;
}
.footer__social a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: 0.4s var(--ease);
}
.footer__social a:hover {
  color: #0a090c;
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-3px);
}
.footer__copy {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ============================================================
   FLOATING WHATSAPP
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 1.6rem;
  right: 1.6rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.6);
  z-index: 200;
  transition: transform 0.3s ease;
}
.whatsapp-float .icon {
  width: 28px;
  height: 28px;
}
.whatsapp-float:hover {
  transform: scale(1.1);
}
.whatsapp-float__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger */
.craft__item:nth-child(2) { transition-delay: 0.04s; }
.craft__item:nth-child(3) { transition-delay: 0.08s; }
.craft__item:nth-child(4) { transition-delay: 0.12s; }
.craft__item:nth-child(5) { transition-delay: 0.16s; }
.craft__item:nth-child(6) { transition-delay: 0.2s; }
.craft__item:nth-child(7) { transition-delay: 0.24s; }
.craft__item:nth-child(8) { transition-delay: 0.28s; }
.craft__item:nth-child(9) { transition-delay: 0.32s; }
.craft__item:nth-child(10) { transition-delay: 0.36s; }
.craft__item:nth-child(11) { transition-delay: 0.4s; }
.craft__item:nth-child(12) { transition-delay: 0.44s; }
.craft__item:nth-child(13) { transition-delay: 0.48s; }
.craft__item:nth-child(14) { transition-delay: 0.52s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(75vw, 320px);
    flex-direction: column;
    justify-content: center;
    gap: 2.4rem;
    background: rgba(10, 9, 12, 0.97);
    backdrop-filter: blur(16px);
    padding: 2rem;
    transition: right 0.5s var(--ease);
    border-left: 1px solid var(--line);
  }
  .nav__links.open {
    right: 0;
  }
  .nav__link {
    font-size: 1rem;
  }
  .nav__cta {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }
  .gallery__item--tall {
    grid-row: span 1;
  }

  .craft__item {
    grid-template-columns: 50px 1fr auto;
  }
  .craft__arrow {
    display: none;
  }

  .manifesto,
  .craft,
  .gallery {
    padding: 6rem 0;
  }
}
