/* style.css */

/* ===================================================
   1. TOKENS / VARIABLES
=================================================== */
:root {
  --teal-deep:   #014f52;   /* primary brand color */
  --teal-900:    #013335;   /* darker shade for gradients/footer */
  --teal-700:    #036b6e;   /* lighter teal accent */
  --gold:        #d1af6a;   /* luxury gold accent */
  --gold-light:  #ecd9b3;
  --bg-light:    #fcfcfc;
  --charcoal:    #333333;
  --white:       #ffffff;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;

  --transition: 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  --container-width: 1180px;
}

/* ===================================================
   2. RESET
=================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--bg-light);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; color: var(--teal-deep); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

/* ===================================================
   3. BUTTONS
=================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 34px;
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition);
}

.btn-gold {
  background: linear-gradient(120deg, var(--gold), var(--gold-light), var(--gold));
  color: var(--teal-900);
  background-size: 220% 100%;
  background-position: 0% 0%;
}
.btn-gold:hover { background-position: 100% 0%; transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(209,175,106,0.6); }

.btn-outline {
  border: 1px solid var(--gold);
  color: var(--white);
}
.btn-outline:hover { background: var(--gold); color: var(--teal-900); }

.btn-full { width: 100%; justify-content: center; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-whatsapp:hover { background: var(--gold); color: var(--teal-900); }

.btn-whatsapp-card {
  width: 100%;
  justify-content: center;
  background: var(--teal-deep);
  color: var(--gold-light);
  font-size: 0.78rem;
  border-radius: 2px;
  margin-top: 18px;
}
.btn-whatsapp-card:hover { background: var(--teal-900); }

/* ===================================================
   4. SPLASH SCREEN
=================================================== */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(circle at 50% 40%, var(--teal-700) 0%, var(--teal-deep) 55%, var(--teal-900) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.9s ease;
}

/* Subtle facet-line texture behind the splash text */
.splash-facets {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(115deg, transparent 48%, rgba(209,175,106,0.15) 49%, transparent 51%),
    linear-gradient(245deg, transparent 48%, rgba(209,175,106,0.1) 49%, transparent 51%);
  background-size: 140px 140px;
}

.splash-inner { text-align: center; position: relative; z-index: 1; }

#splash-text {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: 0.12em;
  color: var(--gold);
  display: flex;
  justify-content: center;
}

/* Each letter is wrapped by JS — animated in with a stagger via --i */
#splash-text .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  animation: letterIn 0.7s var(--transition) forwards;
  animation-delay: calc(var(--i) * 90ms);
  text-shadow: 0 0 18px rgba(209,175,106,0.4);
}
#splash-text .space { width: 0.4em; display: inline-block; }

@keyframes letterIn {
  to { opacity: 1; transform: translateY(0); }
}

.splash-rule {
  display: block;
  width: 0;
  height: 1px;
  background: var(--gold);
  margin: 22px auto 0;
  animation: ruleGrow 0.8s ease forwards;
  animation-delay: 1.3s;
}
@keyframes ruleGrow { to { width: 140px; } }

.splash-tag {
  margin-top: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--gold-light);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 1.6s;
}
@keyframes fadeUp { to { opacity: 0.85; } }

/* Class JS adds after 2.5s to exit the splash */
#splash-screen.splash-exit {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ===================================================
   5. NAVBAR
=================================================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  transition: var(--transition);
  padding: 22px 0;
}
#navbar.scrolled {
  padding: 14px 0;
  background: rgba(1, 51, 53, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -15px rgba(0,0,0,0.4);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}
.logo-gem { color: var(--gold); flex-shrink: 0; }
.logo small { display: block; font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.2em; font-weight: 500; color: var(--gold-light); text-transform: uppercase; }

.nav-links { display: flex; gap: 36px; }
.nav-link {
  position: relative;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding-bottom: 6px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 20px; }

#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}
#nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* ===================================================
   6. HERO
=================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, var(--teal-deep) 0%, var(--teal-900) 100%);
  overflow: hidden;
}

/* Placeholder for a real luxury background photo:
   swap this for background-image: url('your-photo.jpg'); background-size:cover; */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(209,175,106,0.18), transparent 45%),
    linear-gradient(120deg, transparent 40%, rgba(209,175,106,0.06) 50%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 0 32px;
  margin-left: 6vw;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.15;
  margin-bottom: 22px;
}
.hero-sub { color: rgba(255,255,255,0.78); max-width: 480px; margin-bottom: 36px; font-size: 1rem; }
.hero-cta { display: flex; gap: 18px; flex-wrap: wrap; }

/* Decorative faceted gem — signature shape, echoed on About/Catalog images */
.hero-gem {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  z-index: 1;
}
.gem-facet {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(209,175,106,0.5);
  clip-path: polygon(50% 0%, 90% 25%, 100% 70%, 50% 100%, 0% 70%, 10% 25%);
}
.gem-facet--1 { background: linear-gradient(160deg, rgba(209,175,106,0.18), transparent); animation: gemFloat 7s ease-in-out infinite; }
.gem-facet--2 { transform: scale(0.7) rotate(8deg); background: linear-gradient(200deg, rgba(209,175,106,0.12), transparent); animation: gemFloat 7s ease-in-out infinite 1s; }
.gem-facet--3 { transform: scale(0.4) rotate(-10deg); background: rgba(209,175,106,0.15); animation: gemFloat 7s ease-in-out infinite 2s; }

@keyframes gemFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  background: var(--gold);
  border-radius: 50%;
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 20px; }
}

/* ===================================================
   7. SCROLL-REVEAL UTILITY (paired with JS Intersection Observer)
=================================================== */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Hero items reveal immediately without scroll (handled via JS adding is-visible on load) */

/* ===================================================
   8. FACETED IMAGE FRAME (signature shape, reused everywhere)
=================================================== */
.frame-facet {
  width: 100%;
  height: 100%;
  clip-path: polygon(15% 0%, 85% 0%, 100% 20%, 100% 80%, 85% 100%, 15% 100%, 0% 80%, 0% 20%);
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--teal-700), var(--teal-deep));
}
/* Gold shimmer sweep — appears on hover for product/about images */
.frame-facet::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(209,175,106,0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

/* ===================================================
   9. ABOUT
=================================================== */
.about { padding: 130px 0; background: var(--bg-light); }

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  align-items: center;
}

.about-image { position: relative; }
.about-image .frame-facet { aspect-ratio: 4/5; }
.about-image:hover .frame-facet::after { transform: translateX(120%); }

.about-badge {
  position: absolute;
  bottom: -24px;
  left: -24px;
  background: var(--teal-deep);
  color: var(--white);
  width: 110px; height: 110px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  border: 1px solid var(--gold);
}
.about-badge strong { font-family: var(--font-heading); font-size: 2rem; color: var(--gold); line-height: 1; }
.about-badge span { font-size: 0.62rem; letter-spacing: 0.05em; margin-top: 4px; }

.about-text h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 22px; }
.about-text p { color: #555; margin-bottom: 16px; max-width: 540px; }

.trust-list { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.trust-list li { display: flex; gap: 14px; align-items: flex-start; }
.trust-list svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.trust-list strong { color: var(--teal-deep); }

/* ===================================================
   10. CATALOG
=================================================== */
.catalog { padding: 130px 0; background: var(--teal-900); }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 64px; }
.section-head h2 { color: var(--white); font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 14px; }
.section-sub { color: rgba(255,255,255,0.6); }
.catalog .eyebrow { text-align: center; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.product-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(209,175,106,0.18);
  padding: 26px;
  transition: var(--transition);
}
.product-card:hover { transform: translateY(-8px); border-color: rgba(209,175,106,0.5); }

.product-image { position: relative; aspect-ratio: 1/1; margin-bottom: 22px; }
.product-image .frame-facet { transition: transform 0.6s ease; }
.product-card:hover .frame-facet { transform: scale(1.08); } /* zoom on hover, as requested */
.product-card:hover .frame-facet::after { transform: translateX(120%); }

/* Distinct gradient per gem, evoking its real colour */
.product-image--blue .frame-facet { background: linear-gradient(155deg, #0c3a8c, #014f52); }
.product-image--padpa .frame-facet { background: linear-gradient(155deg, #d98a6a, #b9536b); }
.product-image--star .frame-facet { background: linear-gradient(155deg, #5b5a85, #2c2c4a); }

.product-tag {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--gold);
  color: var(--teal-900);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  z-index: 2;
}

.product-body h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 16px; }
.product-specs { display: flex; flex-direction: column; gap: 8px; }
.product-specs li { display: flex; justify-content: space-between; font-size: 0.85rem; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 6px; }
.product-specs span { color: rgba(255,255,255,0.55); }
.product-specs strong { color: var(--gold-light); font-weight: 500; }

/* ===================================================
   11. CONTACT
=================================================== */
.contact { padding: 130px 0; background: var(--bg-light); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 80px; }

.contact-info h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 20px; }
.contact-info p { color: #555; max-width: 460px; margin-bottom: 30px; }

.contact-details { display: flex; flex-direction: column; gap: 18px; margin-bottom: 30px; }
.contact-details li { display: flex; flex-direction: column; gap: 2px; }
.contact-details strong { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.contact-details span { color: var(--charcoal); font-weight: 500; }

.social-row { display: flex; gap: 12px; }
.social-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--teal-deep);
  border-radius: 50%;
  color: var(--teal-deep);
  transition: var(--transition);
}
.social-icon:hover { background: var(--teal-deep); color: var(--gold); }

.contact-form {
  background: var(--white);
  border: 1px solid #eee;
  padding: 44px;
  box-shadow: 0 30px 60px -30px rgba(1,79,82,0.18);
}
.form-row { margin-bottom: 22px; }
.form-row label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 8px;
  font-weight: 600;
}
.form-row input, .form-row textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid #ddd;
  padding: 10px 2px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: transparent;
  resize: vertical;
  transition: border-color 0.3s ease;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--gold); outline: none; }

.form-success {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--teal-deep);
  text-align: center;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: var(--transition);
}
.form-success.show { opacity: 1; max-height: 60px; margin-top: 18px; }

/* ===================================================
   12. FOOTER
=================================================== */
.footer { background: var(--teal-900); color: rgba(255,255,255,0.7); padding: 50px 0 24px; text-align: center; }
.footer-grid { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-logo { color: var(--white); }
.footer-logo .logo-gem, .footer-logo svg { color: var(--gold); }
.footer-tag { max-width: 420px; font-size: 0.85rem; }
.footer .social-icon { border-color: rgba(209,175,106,0.4); color: var(--gold-light); }
.footer .social-icon:hover { background: var(--gold); color: var(--teal-900); }
.footer-copy { margin-top: 34px; font-size: 0.75rem; color: rgba(255,255,255,0.4); }

/* ===================================================
   13. RESPONSIVE BREAKPOINTS
=================================================== */
@media (max-width: 992px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 50px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-gem { opacity: 0.5; width: 220px; height: 220px; }
}

@media (max-width: 768px) {
  #nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--teal-900);
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    padding: 0 40px;
    transform: translateX(100%);
    transition: var(--transition);
    z-index: 50;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-actions { gap: 14px; }
  .btn-whatsapp span { display: none; } /* icon-only on small screens if space is tight */

  .hero-content { margin-left: 0; padding: 0 24px; text-align: left; }
  .hero-gem { display: none; }
  .catalog-grid { grid-template-columns: 1fr; }
  .about, .catalog, .contact { padding: 90px 0; }
  .contact-form { padding: 30px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.1rem; }
  .about-badge { width: 86px; height: 86px; left: 10px; bottom: -18px; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
}

/* --- Hero Gem Signature Shape --- */

.hero-gem {
  position: relative;
  width: 450px; /* ඔබට අවශ්‍ය ප්‍රමාණය */
  height: 450px;
  margin: 0 auto;
  /* ප්‍රධාන හැඩය (Hexagon with slight facet angles) */
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background-color: #014f52; /* පසුබිම් වර්ණය (Deep Teal) */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* මෘදු සෙවණැල්ලක් */
  overflow: hidden;
  transition: transform 0.5s ease;
}

/* Facet Layers (පාර්ශවීය ස්ථර) */
.gem-facet {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Facet 1: ප්‍රධාන පසුබිම් රූපය (Main Gem Image) --- */
.gem-facet--1 {
  z-index: 1; /* යටින්ම තියෙන Layer එක */
  opacity: 0.9; /* තරමක් විනිවිද පෙනෙන ලෙස */
}

.gem-facet--1 img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* රූපය කොටුව පුරා පැතිරෙන සේ */
  mix-blend-mode: luminosity; /* පසුබිම් වර්ණය සමඟ මිශ්‍ර වීමට */
}

/* --- Facet 2: රන්වන් පැහැය (Gold Overlay) --- */
.gem-facet--2 {
  z-index: 2;
  /* Gold Gradient (රන්වන් මිශ්‍රණය) */
  background: linear-gradient(135deg, rgba(209, 175, 106, 0.4) 0%, rgba(209, 175, 106, 0.1) 100%);
  /* රන්වන් පැහැති දාරය */
  border: 4px solid #d1af6a; 
  clip-path: polygon(50% 5%, 90% 27%, 90% 73%, 50% 95%, 10% 73%, 10% 27%); /* කුඩා හැඩය */
}

/* --- Facet 3: ආලෝකයේ ප්‍රයෝගය (Highlight Overlay) --- */
.gem-facet--3 {
  z-index: 3; /* උඩින්ම තියෙන Layer එක */
  /* සුදු පැහැති ආලෝක ධාරාවක් */
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 50%);
  mix-blend-mode: soft-light; /* මෘදු ආලෝකයක් ලබා දීමට */
  opacity: 0;
  transition: opacity 0.5s ease; /* Hover කිරීමේදී පෙනෙන සේ */
}

/* Hover Effect (මූසිකය රූපය මතට ගෙන ගිය විට) */
.hero-gem:hover .gem-facet--3 {
  opacity: 1; /* Highlight එක පෙනේ */
}

.hero-gem:hover {
  transform: translateY(-10px) rotate(3deg); /* සුළු චලනයක් */
}

/* --- Reveal Animation (කලින් කතා කළ Reveal Animation එක) --- */
.hero-gem.reveal.animated {
  animation: gemReveal 1.5s ease forwards;
}

@keyframes gemReveal {
  0% { transform: scale(0.8) translateY(50px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}