/* ==========================================================================
   Jupita Soaps — design tokens & base styles
   ========================================================================== */

:root {
  /* Brand colors, sampled from the Jupita logo + product photography */
  --terracotta: #a5603c;
  --terracotta-dark: #7a4429;
  --terracotta-light: #c98356;
  --cream: #fbf6ec;
  --cream-tint: #f3e7c9;
  --cream-card: #fffdf8;
  --ink: #2b211b;
  --ink-soft: #5b4a3f;
  --ink-faint: #8a7a6d;
  --ocean: #3e7a96;
  --ocean-dark: #2c5a70;
  --plum: #7c6bae;
  --plum-dark: #5f4f8c;
  --border-soft: rgba(43, 33, 27, 0.1);

  --shadow-soft: 0 10px 30px rgba(43, 33, 27, 0.08);
  --shadow-lift: 0 18px 40px rgba(43, 33, 27, 0.14);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1200px;
  --header-h: 76px;

  --font-display: "Fraunces", Georgia, serif;
  --font-heading: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.75rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.serif-quote {
  font-family: var(--font-display);
  font-style: italic;
}

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

.section {
  padding: clamp(56px, 8vw, 108px) 0;
}

.section--tint {
  background: var(--cream-tint);
}

.section--terracotta {
  background: var(--terracotta);
  color: var(--cream);
}

.section--terracotta h2,
.section--terracotta h3,
.section--terracotta .eyebrow {
  color: var(--cream);
}

.section-head {
  max-width: 640px;
  margin: 0 0 3rem;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color .2s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover {
  background: var(--terracotta-dark);
  box-shadow: var(--shadow-lift);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover {
  background: var(--ink);
  color: var(--cream);
}

.section--terracotta .btn--outline {
  color: var(--cream);
  border-color: var(--cream);
}
.section--terracotta .btn--outline:hover {
  background: var(--cream);
  color: var(--terracotta-dark);
}

.btn--light {
  background: var(--cream);
  color: var(--terracotta-dark);
  box-shadow: var(--shadow-soft);
}
.btn--light:hover {
  background: #fff;
  box-shadow: var(--shadow-lift);
}

.btn--sm {
  padding: 10px 22px;
  font-size: 0.85rem;
}

.btn--block { width: 100%; }

/* Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--cream);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand img {
  width: 42px;
  height: 42px;
}

.brand small {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

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

.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--terracotta-dark);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--terracotta);
  border-radius: 2px;
}

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

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

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero
   ========================================================================== */
.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px);
  background:
    radial-gradient(circle at 85% 12%, rgba(165, 96, 60, 0.16), transparent 55%),
    var(--cream);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy .eyebrow { color: var(--terracotta); }

.hero-copy h1 {
  margin-bottom: 0.4em;
}

.hero-copy .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--terracotta-dark);
  margin-bottom: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 1.8rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 2.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.hero-trust li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  flex-shrink: 0;
}

.hero-media {
  position: relative;
}

.hero-media .frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 5;
}

.hero-media .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media .float-card {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: var(--cream-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 240px;
}

.hero-media .float-card .dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracotta);
  flex-shrink: 0;
}

/* Trust badge strip
   ========================================================================== */
.badge-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 32px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.badge-strip li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.badge-strip .badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cream-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
}

/* Product cards / grid
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.product-card .thumb {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  position: relative;
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .thumb img {
  transform: scale(1.06);
}

.product-card .accent-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(251, 246, 236, 0.92);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-card .accent-tag .swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.product-card .body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-card .weight {
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-card .scent {
  font-size: 0.92rem;
  color: var(--ink-soft);
  flex: 1;
}

.product-card .card-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.product-card--ocean .accent-tag .swatch { background: var(--ocean); }
.product-card--plum .accent-tag .swatch { background: var(--plum); }
.product-card--milk .accent-tag .swatch { background: var(--terracotta-light); }

/* Feature list / why choose
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--cream-card);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-soft);
}

.feature-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--cream-tint);
  color: var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

/* Story / split sections
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.split.reverse .split-media { order: 2; }

.split-media {
  max-width: 480px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  height: 380px;
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-media.portrait {
  max-width: 380px;
  height: 460px;
}

.split-media.portrait img {
  object-position: top center;
}

/* Quote block
   ========================================================================== */
.quote-block {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--ink);
  border-left: 3px solid var(--terracotta);
  padding-left: 24px;
  margin: 1.5rem 0;
}

.quote-cite {
  display: block;
  margin-top: 14px;
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--terracotta-dark);
}

/* CTA band
   ========================================================================== */
.cta-band {
  text-align: center;
}

.cta-band h2 { margin-bottom: 0.6rem; }

.cta-band .btn { margin-top: 1.4rem; }

/* FAQ accordion
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  background: var(--cream-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 26px;
  font-family: var(--font-heading);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--terracotta);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .faq-answer {
  padding: 0 26px 22px;
  color: var(--ink-soft);
}

/* Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.contact-card {
  background: var(--cream-card);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cream-tint);
  color: var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.contact-card a.value {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--terracotta-dark);
  font-size: 1.05rem;
}

/* Breadcrumb
   ========================================================================== */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-faint);
  padding: 20px 0 0;
}

.breadcrumb a:hover { color: var(--terracotta-dark); }

/* Product page specific
   ========================================================================== */
.product-hero {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.product-gallery .main-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
}

.product-gallery .main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery .thumbs {
  display: flex;
  gap: 12px;
}

.product-gallery .thumbs button {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  width: 84px;
  height: 84px;
  background: none;
}

.product-gallery .thumbs button.active {
  border-color: var(--terracotta);
}

.product-gallery .thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info .accent-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.product-info .accent-tag .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.spec-list {
  margin: 26px 0;
  border-top: 1px solid var(--border-soft);
}

.spec-list .row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.95rem;
}

.spec-list .row dt {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink-soft);
}

.spec-list .row dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  max-width: 60%;
}

.cross-sell {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Terms / policy page
   ========================================================================== */
.policy h2 {
  margin-top: 2.2em;
  font-size: 1.4rem;
}

.policy h1 + p {
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.policy ul {
  list-style: disc;
  padding-left: 1.4em;
  margin-bottom: 1em;
}

.policy ul li { margin-bottom: 0.4em; }

/* Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--cream-tint);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(251, 246, 236, 0.14);
}

.footer-brand .brand {
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-brand p {
  color: rgba(251, 246, 236, 0.65);
  max-width: 32ch;
  font-size: 0.92rem;
}

.footer-col h4 {
  font-family: var(--font-heading);
  color: var(--cream);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: rgba(251, 246, 236, 0.75);
  font-size: 0.92rem;
}

.footer-col a:hover { color: var(--cream); }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(251, 246, 236, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.footer-social a:hover {
  background: var(--terracotta);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(251, 246, 236, 0.55);
}

.footer-bottom a:hover { color: var(--cream); }

/* Utility
   ========================================================================== */
.text-center { text-align: center; }
.ink-soft { color: var(--ink-soft); font-size: 0.9rem; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--terracotta);
  color: var(--cream);
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--ocean);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-hero { grid-template-columns: 1fr; }
  .cross-sell { grid-template-columns: 1fr; }
}

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

  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--cream);
    padding: 32px 24px;
    gap: 8px;
    font-size: 1.1rem;
    overflow-y: auto;
  }

  .nav.open .nav-links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border-soft);
    width: 100%;
  }

  .hero .container,
  .split,
  .split.reverse .split-media,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split.reverse .split-media { order: 0; }

  .hero-media { order: -1; }

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

@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-media .float-card { left: 12px; bottom: -18px; max-width: 200px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}
