/* ---------------------------------------------------
   Josie Jewelries
   Palette: deep aubergine base, warm gold accent, rose accent
--------------------------------------------------- */

:root{
  --ink:        #1C0F18;
  --plum:       #2B1524;
  --plum-soft:  #3A1E31;
  --paper:      #F7F1EC;
  --paper-dim:  #E8DED7;
  --gold:       #C9A574;
  --rose:       #D6567A;
  --line:       rgba(247,241,236,0.14);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1160px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

h1,h2,h3{
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* subtle grain overlay for texture */
.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------------- HEADER ---------------- */
.site-header{
  position: sticky; top:0; z-index: 50;
  background: rgba(247,241,236,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(28,15,24,0.08);
}
.header-row{
  display:flex; align-items:center; justify-content:space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.wordmark{
  display: inline-flex;
  align-items: center;
}
.brand-logo-mark{
  height: 54px;
  width: 54px;
  object-fit: contain;
  display: block;
}
.brand-name{
  display:flex;
  flex-direction:column;
  justify-content:center;
  line-height:1;
  margin-left:10px;
  color:var(--ink);
}
.brand-name strong{
  font-family:var(--serif);
  font-size:20px;
  font-weight:600;
  letter-spacing:.08em;
}
.brand-name small{
  margin-top:5px;
  font-family:var(--sans);
  font-size:8px;
  font-weight:700;
  letter-spacing:.34em;
  color:var(--gold);
}


.header-cta{
  display:none;
  align-items:center; gap:8px;
  font-family: var(--sans); font-weight:600; font-size: 13.5px;
  background: var(--ink); color: var(--paper);
  padding: 9px 16px; border-radius: 999px;
  transition: background .2s ease;
}
.header-cta:hover{ background: var(--plum-soft); }

@media (min-width: 640px){
  .header-cta{ display:flex; }
}

/* ---------------- BUTTONS ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary{
  background: var(--rose); color: var(--paper);
}
.btn-primary:hover{ background: #c04569; transform: translateY(-1px); }

.btn-ghost{
  border: 1.5px solid rgba(247,241,236,0.55); color: var(--paper);
}
.btn-ghost:hover{ border-color: var(--paper); background: rgba(247,241,236,0.08); }

/* ---------------- HERO ---------------- */
.hero{
  position: relative;
  min-height: 84vh;
  display:flex; align-items:flex-end;
  overflow:hidden;
  background: var(--ink);
}
.hero-media{
  position:absolute; inset:0;
}
.hero-media img{
  width:100%; height:100%; object-fit:cover;
  object-position: center 30%;
  filter: saturate(1.05);
}
.hero-media::after{ content:""; }
.hero::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(28,15,24,0.15) 0%, rgba(28,15,24,0.55) 55%, rgba(28,15,24,0.94) 100%);
  z-index:1;
}
.hero-copy{
  position: relative; z-index: 2;
  padding-top: 120px;
  padding-bottom: 72px;
  color: var(--paper);
  max-width: 720px;
}
.hero-kicker{
  font-family: var(--sans); font-weight:600; font-size: 14px;
  letter-spacing: 0.3px;
  color: var(--gold);
  margin: 0 0 18px;
}
.hero h1{
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06;
  color: var(--paper);
  font-weight: 500;
}
.hero h1 em{
  font-style: italic;
  color: var(--gold);
}
.hero-lede{
  margin: 22px 0 0;
  font-size: 17px;
  max-width: 46ch;
  color: rgba(247,241,236,0.86);
}
.hero-actions{
  display:flex; flex-wrap: wrap; gap: 14px;
  margin-top: 34px;
}

/* ---------------- INTRO ---------------- */
.intro{
  padding: 56px 28px 40px;
  border-bottom: 1px solid rgba(28,15,24,0.08);
  display:flex; flex-wrap:wrap; gap: 36px;
  align-items: flex-end;
  justify-content: space-between;
}
.intro-line{
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.5;
  max-width: 46ch;
  margin:0;
  color: var(--plum);
}
.intro-stats{
  display:flex; gap: 34px;
}
.intro-stats > div{
  display:flex; flex-direction:column; gap: 2px;
}
.intro-stats strong{
  font-family: var(--serif); font-size: 26px; color: var(--rose);
}
.intro-stats span{
  font-size: 12.5px; color: #7A6B71;
}

/* ---------------- SHOWCASE SLIDER ---------------- */
.showcase{
  padding: 64px 28px 20px;
}
.slider{
  position: relative;
  max-width: 380px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 20px 44px rgba(28,15,24,0.18);
}
.slider-track{
  display: flex;
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
.slide{
  min-width: 100%;
}
.slide img{
  width: 100%;
  display: block;
}
.slider-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items:center; justify-content:center;
  background: rgba(28,15,24,0.45);
  color: var(--paper);
  backdrop-filter: blur(2px);
  transition: background .2s ease, transform .2s ease;
}
.slider-arrow:hover{ background: var(--rose); }
.slider-prev{ left: 12px; }
.slider-next{ right: 12px; }
.slider-dots{
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  display: flex; justify-content: center; gap: 7px;
}
.slider-dot{
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(247,241,236,0.45);
  transition: background .2s ease, transform .2s ease;
}
.slider-dot.is-active{
  background: var(--gold);
  transform: scale(1.25);
}
@media (min-width: 640px){
  .slider{ max-width: 420px; }
}

/* ---------------- COLLECTION ---------------- */
.collection{
  padding: 84px 28px 20px;
}
.section-head{
  display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between;
  gap: 12px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(28,15,24,0.1);
  padding-bottom: 22px;
}
.section-head h2{
  font-size: clamp(28px, 4vw, 38px);
}
.section-head p{
  margin:0; color:#7A6B71; font-size: 14.5px; max-width: 32ch;
}

.gallery{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (min-width: 720px){
  .gallery{ grid-template-columns: repeat(4, 1fr); }
}

.piece{
  position: relative;
  display:block;
  width: 100%;
  border: none;
  margin: 0;
  padding: 0;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--plum);
}
.piece-view{
  position: absolute;
  top: 12px; right: 12px;
  display:flex; align-items:center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--ink);
  background: rgba(247,241,236,0.92);
  padding: 6px 11px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s ease, transform .25s ease;
}
.piece:hover .piece-view,
.piece:focus-visible .piece-view{
  opacity: 1;
  transform: translateY(0);
}
.piece.piece-tall{ aspect-ratio: 4/6; }
.piece.piece-wide{
  grid-column: span 2;
  aspect-ratio: 16/9;
}
.piece img{
  width:100%; height:100%; object-fit: cover;
  transition: transform .5s ease;
}
.piece:hover img{ transform: scale(1.045); }

.piece-info{
  position:absolute; left:0; right:0; bottom:0;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(28,15,24,0) 0%, rgba(28,15,24,0.78) 100%);
  color: var(--paper);
}
.piece-info h3{
  font-size: 17px; color: var(--paper); margin-bottom: 3px;
}
.piece-info p{
  margin:0; font-size: 12.5px; color: rgba(247,241,236,0.78);
}

/* ---------------- ORDER STEPS ---------------- */
.order{
  padding: 90px 28px 100px;
}
.steps{
  list-style:none; margin: 0 0 44px; padding:0;
  display:grid; grid-template-columns: 1fr; gap: 30px;
}
@media (min-width: 720px){
  .steps{ grid-template-columns: repeat(3, 1fr); }
}
.steps li{
  border-top: 1.5px solid var(--rose);
  padding-top: 18px;
}
.step-index{
  font-family: var(--serif); font-size: 13px; color: var(--gold);
  letter-spacing: 0.5px;
}
.steps h3{
  font-size: 19px; margin: 10px 0 8px;
}
.steps p{
  margin:0; color:#5C4F54; font-size: 14.5px; max-width: 34ch;
}
.order-cta{ display:flex; }

/* ---------------- FOOTER ---------------- */
.site-footer{
  background: var(--ink); color: var(--paper);
  padding: 46px 28px;
}
.footer-row{
  display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap: 20px;
}
.footer-word{
  margin: 0 0 4px;
  display: inline-flex;
  align-items: center;
}
.brand-logo-footer{
  height: 66px;
  width: 66px;
}
.brand-name-footer{
  color:var(--paper);
}
.brand-name-footer strong{
  font-size:22px;
}

.footer-note{ margin:0; font-size: 13px; color: rgba(247,241,236,0.6); }

.footer-bottom{
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  text-align: center;
}
.footer-credit, .footer-dev{
  margin: 0; font-size: 12.5px; color: rgba(247,241,236,0.55);
}
.footer-credit a, .footer-dev a{
  color: var(--gold);
  border-bottom: 1px solid rgba(201,165,116,0.35);
  padding-bottom: 1px;
}
.footer-credit a:hover, .footer-dev a:hover{ border-color: var(--gold); }
.footer-contact a{
  font-size: 14px; font-weight: 600; color: var(--gold);
  border-bottom: 1px solid rgba(201,165,116,0.4);
  padding-bottom: 2px;
}
.footer-contact a:hover{ border-color: var(--gold); }

/* ---------------- FLOATING WHATSAPP ---------------- */
.floating-wa{
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; color: #fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  transition: transform .2s ease;
}
.floating-wa:hover{ transform: scale(1.06); }

/* keyboard focus visibility */
a:focus-visible, .btn:focus-visible, .piece:focus-visible, .lightbox-close:focus-visible{
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

/* ---------------- SCROLL REVEAL ----------------
   Applied by script.js via IntersectionObserver.
   Elements are only hidden once JS has confirmed it will reveal them,
   so content never depends on JS to be visible. */
.reveal{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- MICRO-INTERACTIONS ---------------- */
.btn:active{ transform: scale(0.97); }
.piece:active{ transform: scale(0.985); }
.piece{ transition: transform .35s ease; }

.piece img{ transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.piece-info{ transition: transform .4s cubic-bezier(.22,.61,.36,1), background .4s ease; }
.piece:hover .piece-info{ transform: translateY(-2px); }

.footer-wa-icon{
  display:inline-flex; align-items:center; justify-content:center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(201,165,116,0.14);
  color: var(--gold);
  transition: background .25s ease, transform .25s ease, color .25s ease;
}
.footer-wa-icon:hover{
  background: #25D366; color: #fff; transform: scale(1.08);
}
.footer-contact{
  display:flex; align-items:center; gap: 12px;
}
.footer-contact-label{
  font-size: 13px; color: rgba(247,241,236,0.65);
}

/* Floating WhatsApp button: gentle breathing ring to draw the eye */
.floating-wa{
  animation: wa-float 3.2s ease-in-out infinite;
}
.floating-wa::before{
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1.5px solid #25D366;
  opacity: 0;
  animation: wa-pulse 2.6s ease-out infinite;
}
@keyframes wa-float{
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes wa-pulse{
  0%   { transform: scale(1);   opacity: .55; }
  80%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1 !important; transform: none !important; }
  .floating-wa, .floating-wa::before{ animation: none !important; }
}

/* ---------------- LIGHTBOX ---------------- */
.lightbox{
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.is-open{
  visibility: visible;
  opacity: 1;
}
.lightbox-backdrop{
  position: absolute; inset: 0;
  background: rgba(28,15,24,0.72);
  backdrop-filter: blur(3px);
}
.lightbox-panel{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  max-height: 88vh;
  overflow: auto;
  background: var(--paper);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  transform: scale(.94) translateY(10px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
}
.lightbox.is-open .lightbox-panel{
  transform: scale(1) translateY(0);
  opacity: 1;
}
@media (min-width: 720px){
  .lightbox-panel{ grid-template-columns: 1.1fr 1fr; max-height: 80vh; }
}
.lightbox-media{
  background: var(--plum);
  min-height: 260px;
}
.lightbox-media img{
  width: 100%; height: 100%; object-fit: cover;
  display:block;
}
@media (min-width: 720px){
  .lightbox-media{ height: 100%; }
}
.lightbox-copy{
  padding: 32px 30px 34px;
  display:flex; flex-direction: column; justify-content: center;
  gap: 4px;
}
.lightbox-kicker{
  margin:0; font-size: 12.5px; font-weight: 600; color: var(--gold);
}
.lightbox-copy h3{
  font-size: 26px; margin: 6px 0 10px;
}
.lightbox-copy p:not(.lightbox-kicker){
  margin: 0 0 22px; color: #5C4F54; font-size: 15px; max-width: 34ch;
}
.lightbox-copy .btn{ align-self: flex-start; }
.lightbox-close{
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(28,15,24,0.06);
  color: var(--ink);
  display:flex; align-items:center; justify-content:center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.lightbox-close:hover{ background: rgba(28,15,24,0.12); transform: rotate(90deg); }

@media (prefers-reduced-motion: reduce){
  .lightbox, .lightbox-panel{ transition: none !important; }
  .lightbox-close:hover{ transform: none; }
}
