/* ============================================
   ROSARY Fine Jewellery — Global Stylesheet
   ============================================ */

/* Fonts loaded via <link> in HTML for better performance */

/* --- CSS Variables --- */
:root {
  --color-sage: #7A8B5C;
  --color-sage-dark: #5E6D45;
  --color-sage-light: #95A87A;
  --color-cream: #F2E3D1;
  --color-cream-light: #FAF5EE;
  --color-cream-dark: #E8D5BF;
  --color-gold: #C4A84D;
  --color-gold-light: #D4BE76;
  --color-lavender: #B8A9C9;
  --color-charcoal: #2C2C2C;
  --color-warm-gray: #6B635B;
  --color-white: #FFFFFF;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;

  --header-height: 80px;
  --max-width: 1400px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-charcoal);
  background-color: var(--color-cream-light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul { list-style: none; }

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

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

p {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  letter-spacing: 0.02em;
}

.subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* --- Header / Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

header.scrolled {
  background: rgba(242, 227, 209, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-cream-light);
  transition: color var(--transition);
}

header.scrolled .nav-logo {
  color: var(--color-sage-dark);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cream-light);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}

header.scrolled .nav-links a {
  color: var(--color-charcoal);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
}

.lang-sep {
  color: var(--color-cream-light);
  font-size: 0.85rem;
  opacity: 0.5;
  user-select: none;
}

header.scrolled .lang-sep {
  color: var(--color-warm-gray);
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--color-cream-light);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition), color var(--transition);
  padding: 2px 4px;
}

.lang-btn.active {
  opacity: 1;
}

.lang-btn:hover {
  opacity: 1;
}

header.scrolled .lang-btn {
  color: var(--color-charcoal);
}

.nav-right-mobile {
  display: none;
  align-items: center;
  gap: 1rem;
}

.lang-switch-mobile {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-switch-mobile .lang-sep {
  font-size: 0.8rem;
}

.lang-switch-mobile .lang-btn {
  font-size: 0.85rem;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--color-cream-light);
  transition: all var(--transition);
}

header.scrolled .menu-toggle span {
  background: var(--color-charcoal);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-charcoal);
}

.hero picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.7);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(44, 44, 44, 0.2) 0%,
    rgba(44, 44, 44, 0.35) 50%,
    rgba(44, 44, 44, 0.5) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-cream-light);
  padding: 2rem;
  max-width: 800px;
}

.hero-content h1 {
  margin-bottom: 0.5rem;
  letter-spacing: 0.15em;
  animation: fadeUp 1.2s ease-out;
}

.hero-content .subtitle {
  color: var(--color-cream-dark);
  margin-bottom: 2rem;
  animation: fadeUp 1.2s ease-out 0.2s both;
}

.hero-cta {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid var(--color-cream);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all var(--transition);
  animation: fadeUp 1.2s ease-out 0.4s both;
}

.hero-cta:hover {
  background: var(--color-cream);
  color: var(--color-sage-dark);
}

/* --- Section Shared --- */
section {
  padding: 6rem 3rem;
}

.section-centered {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  color: var(--color-sage-dark);
  margin-bottom: 0.8rem;
  letter-spacing: 0.08em;
}

.section-header p {
  color: var(--color-warm-gray);
  max-width: 600px;
  margin: 0 auto;
}

.section-divider {
  width: 50px;
  height: 1px;
  background: var(--color-gold);
  margin: 1.5rem auto;
}

/* --- Home Intro Section --- */
.intro {
  background: var(--color-cream);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.intro-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 2px;
}

.intro-text h2 {
  color: var(--color-sage-dark);
  margin-bottom: 1rem;
}

.intro-text p {
  color: var(--color-warm-gray);
  margin-bottom: 1.5rem;
}

.text-link {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-sage);
  border-bottom: 1px solid var(--color-gold);
  padding-bottom: 3px;
  transition: color var(--transition);
}

.text-link:hover {
  color: var(--color-sage-dark);
}

/* --- Featured Products (Home) --- */
.featured {
  background: var(--color-cream-light);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.product-card {
  background: var(--color-white);
  border-radius: 2px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.product-card:hover .product-card-image {
  transform: scale(1.03);
}

.product-card-info {
  padding: 1.5rem;
  text-align: center;
}

.product-card-info h3 {
  color: var(--color-sage-dark);
  margin-bottom: 0.3rem;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.product-card-info .product-type {
  font-size: 0.95rem;
  color: var(--color-warm-gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 300;
}

/* --- Products Page --- */
.page-hero {
  height: 45vh;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sage);
  position: relative;
  margin-top: var(--header-height);
}

.page-hero h1 {
  color: var(--color-cream-light);
  letter-spacing: 0.15em;
  animation: fadeUp 1s ease-out;
}

.page-hero .subtitle {
  color: var(--color-cream-dark);
  animation: fadeUp 1s ease-out 0.15s both;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
}

.product-detail {
  background: var(--color-white);
  border-radius: 2px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.product-detail:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.product-gallery {
  position: relative;
  overflow: hidden;
}

.product-gallery-main {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-thumbnails {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--color-cream-light);
}

.product-thumbnails img {
  flex: 1;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.product-thumbnails img:hover,
.product-thumbnails img.active {
  opacity: 1;
}

.product-detail-info {
  padding: 2rem;
}

.product-detail-info h3 {
  color: var(--color-sage-dark);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.product-detail-info .product-type {
  font-size: 0.95rem;
  color: var(--color-warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.product-detail-info p {
  color: var(--color-warm-gray);
  font-size: 1.05rem;
  line-height: 1.8;
}

.product-detail-info .inquire-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 12px 32px;
  background: var(--color-sage);
  color: var(--color-cream-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.product-detail-info .inquire-btn:hover {
  background: var(--color-sage-dark);
}

/* --- Story Page --- */
.story-section {
  background: var(--color-cream);
}

.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-bottom: 5rem;
}

.story-block:last-child {
  margin-bottom: 0;
}

.story-block.reverse {
  direction: rtl;
}

.story-block.reverse > * {
  direction: ltr;
}

.story-image {
  width: 100%;
  height: 550px;
  object-fit: cover;
  border-radius: 2px;
}

.story-text h2 {
  color: var(--color-sage-dark);
  margin-bottom: 1rem;
  letter-spacing: 0.06em;
}

.story-text p {
  color: var(--color-warm-gray);
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  line-height: 1.9;
}

.story-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--color-sage);
  border-left: 2px solid var(--color-gold);
  padding-left: 1.5rem;
  margin: 2rem 0;
  line-height: 1.6;
}

/* --- Values Strip --- */
.values {
  background: var(--color-sage);
  padding: 4rem 3rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.value-item h3 {
  color: var(--color-cream);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.value-item p {
  color: var(--color-cream-dark);
  font-size: 1rem;
  font-weight: 300;
}

/* --- Footer --- */
footer {
  background: var(--color-charcoal);
  color: var(--color-cream-dark);
  padding: 4rem 3rem 2rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-cream);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-warm-gray);
  max-width: 350px;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: 1.2rem;
}

.footer-links a {
  display: block;
  font-size: 0.95rem;
  color: var(--color-warm-gray);
  margin-bottom: 0.6rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-warm-gray);
  letter-spacing: 0.06em;
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 990px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-cream);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transition: right var(--transition);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    color: var(--color-charcoal) !important;
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-right-mobile {
    display: flex;
  }

  .lang-switch {
    display: none;
  }

  .intro-grid,
  .story-block {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .story-block.reverse {
    direction: ltr;
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  section {
    padding: 4rem 1.5rem;
  }

  nav {
    padding: 0 1.5rem;
  }
}

@media (max-width: 600px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .story-image {
    height: 350px;
  }

  .intro-image {
    height: 350px;
  }
}
