/* ============================================
   Bliss Home Diffuser — main stylesheet
   Inspired by watchhouse.com: story-led,
   editorial, dark & gold, generous whitespace
   ============================================ */

:root {
  --black: #0c0c0c;
  --near-black: #141414;
  --cream: #f6f1e9;
  --cream-soft: #efe8dc;
  --gold: #c9a876;
  --gold-soft: #d9c4a0;
  --grey: #6e6a62;
  --line: rgba(255, 255, 255, 0.12);
  --max: 1280px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--black);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ---------------- Film grain overlay ---------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- Consistent image grade ---------------- */
.story img,
.product-card .img-wrap img,
#p-image {
  filter: saturate(0.92) contrast(1.04) brightness(0.99) sepia(0.04);
}

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

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 18px;
}

/* ---------------- Nav ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 48px;
  padding: 24px 32px;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
  color: var(--cream);
  mix-blend-mode: normal;
}

.nav.solid {
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(10px);
  padding: 14px 32px;
  border-color: var(--line);
}

.nav .logo {
  display: flex;
  align-items: center;
  margin-right: auto;
}
.nav .logo img { height: 64px; width: 64px; border-radius: 50%; transition: height 0.4s var(--ease), width 0.4s var(--ease); }
.nav.solid .logo img { height: 50px; width: 50px; }

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding-bottom: 4px;
  transition: letter-spacing 0.35s var(--ease), color 0.35s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover { letter-spacing: 0.24em; color: var(--gold-soft); }
.nav-links a:hover::after { width: 100%; }

.nav-icons { display: flex; gap: 22px; align-items: center; }
.cart-link { position: relative; }
.cart-count {
  position: absolute;
  top: -8px; right: -14px;
  background: var(--gold);
  color: var(--black);
  font-size: 10px;
  font-weight: 600;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.nav-toggle { display: none; background: none; border: none; color: var(--cream); cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--cream);
  background: #1a1a1a;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  filter: saturate(0.85) contrast(1.08) brightness(0.92) sepia(0.08);
  transition: opacity 2.2s var(--ease);
}

.hero-slide.is-active {
  opacity: 1;
  animation: heroZoom 7s linear forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.06) translate3d(0,0,0); }
  to   { transform: scale(1.18) translate3d(-1.5%, -2%, 0); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.58) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 24px;
}

.hero .eyebrow { color: var(--gold-soft); }

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  white-space: nowrap;
  margin-bottom: 22px;
}

@media (max-width: 640px) {
  .hero { height: 92vh; align-items: flex-end; padding-bottom: 64px; text-align: left; }
  .hero-inner { max-width: 100%; padding: 0 24px; }
  .hero h1 { white-space: normal; font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .hero p { margin: 0 0 28px; }
  .hero .btn { width: 100%; justify-content: center; }
}

.hero p {
  font-size: 18px;
  color: var(--cream-soft);
  max-width: 520px;
  margin: 0 auto 36px;
  font-weight: 300;
}

.scroll-cue {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--cream-soft);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-cue .line {
  width: 1px; height: 40px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scrollline 2s infinite;
}
@keyframes scrollline {
  0% { transform: scaleY(0.2); opacity: 0; }
  50% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.2); opacity: 0; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 38px;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease), letter-spacing 0.35s var(--ease);
  font-family: var(--sans);
}
.btn:hover { transform: translateY(-2px); letter-spacing: 0.3em; }
.btn-light { color: var(--cream); border-color: var(--cream); }
.btn-light:hover { background: var(--cream); color: var(--black); }
.btn-dark { color: var(--black); border-color: var(--black); }
.btn-dark:hover { background: var(--black); color: var(--cream); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--black); }
.btn-gold:hover { background: transparent; color: var(--gold); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------------- Section helpers ---------------- */
.section { padding: 110px 0; }
.section-dark { background: var(--black); color: var(--cream); }
.section-tight { padding: 70px 0; }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-tight { padding: 44px 0; }
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 18px; }
.section-head p { color: var(--grey); font-size: 16px; }
.section-dark .section-head p { color: #b9b3a8; }

.section-head::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  background: var(--gold);
  margin: 28px auto 0;
  transition: width 1.1s var(--ease) 0.25s;
}
.section-head.is-visible::after { width: 64px; }

/* ---------------- Reveal animation ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* ---------------- Story split ---------------- */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
  overflow: hidden;
}
.story img, .story video { width: 100%; height: 100%; object-fit: cover; min-height: 480px; }
.story .copy { padding: 60px; }
.story.reverse { direction: rtl; }
.story.reverse .copy { direction: ltr; }
.story .copy h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 22px; }
.story .copy p { color: var(--grey); margin-bottom: 28px; max-width: 460px; }
.section-dark .story .copy p { color: #b9b3a8; }

.story .copy::before {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  background: var(--gold);
  margin-bottom: 26px;
  transition: width 1s var(--ease) 0.3s;
}
.story.reveal.is-visible .copy::before { width: 48px; }

.story img, .story video {
  transition: transform 1.4s var(--ease);
  will-change: transform;
}

.story-video video { min-height: 0; aspect-ratio: 16/9; max-height: 70vh; }

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .story img, .story video { min-height: 0; aspect-ratio: 5/4; }
  .story-video video { aspect-ratio: 16/10; }
  .story .copy { padding: 40px 24px 56px; }
  .story.reverse { direction: ltr; }
}

/* ---------------- Product grid ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
}
.product-card {
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
.section-dark .product-card { background: var(--near-black); }

.product-card a.card-link { display: block; }
.product-card .img-wrap {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #1c1c1c;
}
.product-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.product-card:hover .img-wrap img { transform: scale(1.06); }

.product-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid var(--gold);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.product-card:hover::after { opacity: 1; transform: scale(1); }

.product-card .info .price {
  position: relative;
  display: inline-block;
}
.product-card .info .price::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.5s var(--ease);
}
.product-card:hover .info .price::after { width: 100%; }

.product-card .info {
  padding: 26px 26px 30px;
}
.product-card .info .tag { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; display: block;}
.product-card .info h3 { font-size: 22px; margin-bottom: 8px; }
.product-card .info .tagline { font-size: 14px; color: var(--grey); margin-bottom: 14px; }
.section-dark .product-card .info .tagline { color: #b9b3a8; }
.product-card .info .price { font-size: 15px; letter-spacing: 0.05em; margin-bottom: 16px; display: block; }

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

/* ---------------- Quick add form ---------------- */
.qty-row { display: flex; gap: 12px; align-items: stretch; }
.qty-select {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.section-dark .qty-select { border-color: rgba(255,255,255,0.2); }
.qty-select option { color: #000; }

/* ---------------- Footer ---------------- */
.footer {
  background: var(--black);
  color: var(--cream-soft);
  padding: 80px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
}
.footer-grid h4 { color: var(--cream); font-size: 16px; margin-bottom: 18px; letter-spacing: 0.05em; }
.footer-grid p, .footer-grid a { color: #a39c8f; font-size: 14px; display: block; margin-bottom: 10px; }
.footer-grid a { display: inline-flex; align-items: center; gap: 6px; transition: color 0.35s var(--ease); }
.footer-grid a:hover { color: var(--gold); }
.footer-grid a::after {
  content: "\2192";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.footer-grid a:hover::after { opacity: 1; transform: translateX(0); }

.social-row {
  display: flex;
  gap: 18px;
  margin-top: 6px;
}
.social-row a {
  display: flex;
  margin: 0;
  color: #a39c8f;
  transition: color 0.35s var(--ease), transform 0.35s var(--ease);
}
.social-row a::after { content: none; }
.social-row a:hover { color: var(--gold); transform: translateY(-2px); }
.footer-brand .logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand .logo-row img { height: 44px; width: 44px; border-radius: 50%; }
.footer-brand .logo-row span { font-family: var(--serif); font-size: 22px; color: var(--cream); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #6f6a60;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px;}
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------------- Mobile nav drawer ---------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--black);
  color: var(--cream);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
  font-family: var(--serif);
  font-size: 28px;
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav .close-btn {
  position: absolute;
  top: 28px; right: 28px;
  background: none; border: none; color: var(--cream);
  font-size: 28px; cursor: pointer;
}

/* ---------------- Page header (non-home pages) ---------------- */
.page-header {
  background: var(--black);
  color: var(--cream);
  padding: 180px 0 70px;
  text-align: center;
}
.page-header .eyebrow { justify-content: center; display: flex; }
.page-header h1 { font-size: clamp(2.4rem, 6vw, 4rem); }

/* ---------------- Generic content blocks ---------------- */
.text-block {
  max-width: 760px;
  margin: 0 auto;
}
.text-block p { margin-bottom: 22px; color: #44403a; }
.text-block h3 { margin: 36px 0 16px; font-size: 24px; }

/* ---------------- Cart / checkout ---------------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  text-align: left;
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.cart-table th { text-transform: uppercase; letter-spacing: 0.15em; font-size: 11px; color: var(--grey); }
.cart-item-name { display: flex; align-items: center; gap: 16px; }
.cart-item-name img { width: 64px; height: 80px; object-fit: cover; }
.cart-item-name .meta strong { font-family: var(--serif); font-size: 17px; }
.cart-item-name .meta .size { color: var(--grey); font-size: 13px; }
.remove-btn { background: none; border: none; color: var(--grey); cursor: pointer; font-size: 13px; text-decoration: underline; }
.qty-input {
  width: 56px; padding: 8px; border: 1px solid var(--line); text-align: center; font-family: var(--sans);
}

.cart-summary {
  max-width: 380px;
  margin-left: auto;
  margin-top: 40px;
}
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 15px; }
.summary-row.total { font-family: var(--serif); font-size: 22px; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 18px; }
.empty-cart { text-align: center; padding: 60px 0; color: var(--grey); }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--grey);
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(12, 12, 12, 0.2);
  background: #fff;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--black);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
}
.section-dark .field input, .section-dark .field textarea, .section-dark .field select {
  background: var(--near-black); color: var(--cream); border-color: rgba(255,255,255,0.2);
}

/* ---------------- Misc ---------------- */
.divider { height: 1px; background: var(--line); margin: 0; }
.center { text-align: center; }
.mt-40 { margin-top: 40px; }

.badge-row {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  text-align: center;
}
.badge-row .badge .num { font-family: var(--serif); font-size: 2.2rem; color: var(--gold); }
.badge-row .badge .label { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); margin-top: 8px; }

/* ---------------- Signup Popup ---------------- */
.signup-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(12,12,12,0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.4s var(--ease);
  padding: 20px;
}
.signup-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.signup-modal {
  position: relative;
  background: var(--black); color: var(--cream);
  max-width: 420px; width: 100%;
  padding: 48px 40px;
  text-align: center;
  border: 1px solid rgba(201,168,118,0.3);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.4s var(--ease);
}
.signup-overlay.is-open .signup-modal { transform: translateY(0) scale(1); }
.signup-modal .eyebrow { display: block; margin-bottom: 14px; }
.signup-modal h3 {
  font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 1.9rem);
  margin-bottom: 12px;
}
.signup-modal p.sub { color: #b9b3a8; font-size: 14px; margin-bottom: 26px; }
.signup-form { display: flex; flex-direction: column; gap: 14px; }
.signup-form input[type="email"] {
  width: 100%; padding: 14px 16px;
  background: var(--near-black); color: var(--cream);
  border: 1px solid rgba(255,255,255,0.2);
  font-family: var(--sans); font-size: 14px;
}
.signup-form input[type="email"]:focus { outline: none; border-color: var(--gold); }
.signup-fine { font-size: 12px; color: #948f86; margin-top: 16px; }
.signup-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--cream);
  font-size: 22px; line-height: 1; cursor: pointer;
  opacity: 0.6; transition: opacity 0.3s var(--ease);
}
.signup-close:hover { opacity: 1; }
.signup-success { display: none; color: var(--gold); font-size: 14px; margin-top: 16px; }
.section-dark .badge-row .badge .label { color: #b9b3a8; }
