/* ============================================
   Citrea by Jovi Products — Design System
   Spa-luxury with citrus-inspired warmth
   ============================================ */

:root {
  /* Core palette — matched to Citrea packaging */
  --color-cream: #faf8fc;
  --color-ivory: #f3eff8;
  --color-sage: #9b8ab8;
  --color-sage-dark: #5c4a72;
  --color-sage-light: #d4c8e4;
  --color-citrus: #8b6fa0;
  --color-citrus-light: #b8a4cc;
  --color-charcoal: #2e2438;
  --color-charcoal-soft: #4a3f56;
  --color-white: #ffffff;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-charcoal);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* ---- Header & Navigation ---- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) 0;
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), transform 0.5s var(--ease-smooth, cubic-bezier(0.22, 1, 0.36, 1));
}

.site-header.scrolled {
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(44, 44, 40, 0.06);
}

.nav {
  width: min(1120px, 92vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-cream);
  background: var(--color-sage-dark);
  border-radius: 50%;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.3s, color 0.3s;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--color-sage-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-charcoal);
  transition: transform 0.3s, opacity 0.3s;
}

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

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(212, 200, 228, 0.4) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(155, 138, 184, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-cream) 0%, var(--color-ivory) 100%);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s var(--ease-out);
  z-index: 0;
}

.hero--video-active .hero-video {
  opacity: 1;
}

.hero--video-active .hero-orb {
  opacity: 0.3;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(250, 248, 252, 0.55) 0%, rgba(243, 239, 248, 0.75) 100%),
    radial-gradient(ellipse 70% 50% at 50% 50%, transparent 0%, rgba(46, 36, 56, 0.15) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}

.hero--video-active .hero-bg::before {
  opacity: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) var(--space-md);
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  color: var(--color-charcoal);
  overflow: hidden;
}

.hero-title .hero-word + .hero-word {
  margin-left: 0.15em;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-style: italic;
  font-weight: 400;
  color: var(--color-charcoal-soft);
  margin-bottom: var(--space-xs);
}

.hero-sub {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: var(--space-md);
}

.btn {
  display: inline-block;
  padding: 0.875rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
}

.btn-primary {
  background: var(--color-sage-dark);
  color: var(--color-cream);
}

.btn-primary:hover {
  background: var(--color-charcoal);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(92, 74, 114, 0.25);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sage);
  opacity: 0.7;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-sage), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---- Sections ---- */

.section {
  padding: var(--space-xl) 0;
}

.section.alt-bg {
  background: var(--color-ivory);
}

.section-header {
  margin-bottom: var(--space-md);
}

.section-header.centered {
  text-align: center;
}

.future-content .title-line {
  margin-inline: auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-tagline {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-sage-dark);
  margin-top: 0.5rem;
}

.section-intro {
  max-width: 640px;
  margin-bottom: var(--space-md);
  color: var(--color-charcoal-soft);
}

/* ---- About ---- */

.about-text .lead {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.5;
  margin-bottom: var(--space-sm);
  color: var(--color-charcoal);
}

.about-text p {
  margin-bottom: var(--space-sm);
  color: var(--color-charcoal-soft);
  max-width: 720px;
}

/* ---- Approach ---- */

.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.approach-card {
  padding: var(--space-md);
  background: var(--color-white);
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(44, 44, 40, 0.04);
}

.approach-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xs);
  color: var(--color-sage-dark);
}

.approach-card p {
  font-size: 0.9375rem;
  color: var(--color-charcoal-soft);
  line-height: 1.6;
}

/* ---- Product Categories ---- */

.product-category {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(138, 154, 123, 0.15);
}

.product-category:last-of-type {
  border-bottom: none;
}

.category-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.category-tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-sage-dark);
  margin-bottom: var(--space-sm);
}

.product-image-wrap.placeholder::after {
  content: 'Photo coming soon';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-sage);
  opacity: 0.6;
  pointer-events: none;
}

/* ---- Product Grid ---- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}

.product-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.product-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.product-card {
  text-align: center;
}

.product-card h3,
.product-card h4 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-top: var(--space-sm);
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, var(--color-white) 0%, var(--color-ivory) 100%);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  box-shadow: 0 2px 12px rgba(44, 44, 40, 0.04);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.product-image-wrap.placeholder {
  background: linear-gradient(160deg, var(--color-sage-light) 0%, var(--color-ivory) 100%);
}

/* ---- Future ---- */

.future-content {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.future-content p {
  color: var(--color-charcoal-soft);
  margin-top: var(--space-sm);
}

/* ---- Contact ---- */

.contact-card {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  padding: var(--space-lg);
  background: var(--color-white);
  border-radius: 2px;
  box-shadow: 0 4px 24px rgba(44, 44, 40, 0.06);
}

.contact-text {
  color: var(--color-charcoal-soft);
  margin-bottom: var(--space-md);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.contact-link {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--color-sage-dark);
  transition: color 0.3s;
}

.contact-link:hover {
  color: var(--color-charcoal);
}

.contact-address {
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--color-charcoal-soft);
}

.footer-email {
  font-size: 0.875rem;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.footer-email:hover {
  opacity: 1;
}

/* ---- Footer ---- */

.site-footer {
  padding: var(--space-lg) 0 var(--space-md);
  background: var(--color-charcoal);
  color: var(--color-cream);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.15em;
}

.footer-company {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
}

.footer-address {
  font-style: normal;
  font-size: 0.875rem;
  opacity: 0.7;
}

.footer-copy {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: var(--space-sm);
}

/* ---- Lightbox ---- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(44, 44, 40, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 75vh;
}

.lightbox-content img {
  max-height: 75vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--color-cream);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 1rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-caption {
  color: var(--color-cream);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  margin-top: var(--space-sm);
  opacity: 0.8;
}

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

@media (max-width: 900px) {
  .approach-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  body.nav-open {
    overflow: hidden;
  }

  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(44, 44, 40, 0.35);
    z-index: 90;
    cursor: pointer;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 101;
    width: min(280px, 80vw);
    height: 100vh;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    background: var(--color-cream);
    box-shadow: -4px 0 24px rgba(44, 44, 40, 0.08);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .product-grid,
  .product-grid--3,
  .product-grid--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .section {
    padding: var(--space-lg) 0;
  }
}
