/* Hearthstone Scents v2 — Cozy Hearth */

:root {
  --color-ivory: #f7f1e8;
  --color-cream: #faf6f0;
  --color-card: #fffdf9;
  --color-charcoal: #3d2f28;
  --color-charcoal-soft: #5c4a40;
  --color-amber: #c4692a;
  --color-amber-dark: #a85520;
  --color-amber-glow: rgba(255, 160, 60, 0.85);
  --color-amber-glow-soft: rgba(255, 120, 40, 0.55);
  --color-amber-glow-outer: rgba(255, 100, 30, 0.35);
  --color-border: rgba(61, 47, 40, 0.12);
  --color-border-strong: rgba(61, 47, 40, 0.2);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --shadow-card: 0 4px 24px rgba(61, 47, 40, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(61, 47, 40, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max-width: 1120px;
  --header-height: 88px;
  /* Match splash CTA row so header aligns with Shop / Place order buttons */
  --header-cluster-width: min(520px, calc(100% - 2rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-charcoal);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 220, 170, 0.25), transparent 50%),
    var(--color-ivory);
}

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

a {
  color: var(--color-amber);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-amber-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 241, 232, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}

.site-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  --flame-x: 50%;
  --flame-y: 9%;
}

.site-logo img {
  width: 64px;
  height: auto;
  position: relative;
  z-index: 1;
}

.site-logo__glow {
  position: absolute;
  top: var(--flame-y);
  left: var(--flame-x);
  transform: translate(-50%, -50%);
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 220, 140, 0.95) 0%,
    var(--color-amber-glow) 25%,
    var(--color-amber-glow-soft) 50%,
    transparent 72%
  );
  filter: blur(5px);
  box-shadow:
    0 0 9px rgba(255, 160, 60, 0.7),
    0 0 21px rgba(255, 120, 40, 0.45);
  animation: candle-glow 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes candle-glow {
  0%, 100% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes candle-glow-outer {
  0%, 100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-charcoal-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--color-charcoal);
  border-bottom-color: var(--color-amber);
}

.site-nav__link--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-bottom: none;
  line-height: 0;
}

.site-nav__link--icon:hover,
.site-nav__link--icon:focus-visible {
  border-bottom: none;
  opacity: 0.85;
}

.site-nav__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* Main layout */
.site-main {
  flex: 1 1 auto;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
}

/* Splash (index) */
.splash {
  min-height: calc(100vh - var(--header-height) - 8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 0;
}

.splash--full {
  min-height: calc(100vh - var(--header-height));
}

.splash__logo-wrap {
  position: relative;
  margin-bottom: 1.5rem;
  --flame-x: 50%;
  --flame-y: 9%;
}

.splash__logo-wrap::before {
  content: "";
  position: absolute;
  top: var(--flame-y);
  left: var(--flame-x);
  transform: translate(-50%, -50%);
  width: min(165px, 41.25vw);
  height: min(165px, 41.25vw);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 180, 80, 0.5) 0%,
    rgba(255, 130, 50, 0.28) 30%,
    var(--color-amber-glow-outer) 50%,
    transparent 68%
  );
  filter: blur(18px);
  animation: candle-glow-outer 3.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.splash__logo-wrap::after {
  content: "";
  position: absolute;
  top: var(--flame-y);
  left: var(--flame-x);
  transform: translate(-50%, -50%);
  width: min(90px, 22.5vw);
  height: min(90px, 22.5vw);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 210, 120, 0.65) 0%,
    rgba(255, 150, 60, 0.4) 40%,
    transparent 70%
  );
  filter: blur(11px);
  animation: candle-glow-outer 2.6s ease-in-out infinite reverse;
  pointer-events: none;
  z-index: 0;
}

.splash__logo-wrap .site-logo__glow {
  top: var(--flame-y);
  left: var(--flame-x);
  transform: translate(-50%, -50%);
  width: min(68px, 16.5vw);
  height: min(68px, 16.5vw);
  filter: blur(11px);
  background: radial-gradient(
    circle,
    rgba(255, 240, 180, 1) 0%,
    rgba(255, 190, 90, 0.95) 18%,
    rgba(255, 140, 50, 0.75) 38%,
    rgba(255, 100, 30, 0.4) 58%,
    transparent 75%
  );
  box-shadow:
    0 0 18px rgba(255, 170, 70, 0.95),
    0 0 38px rgba(255, 130, 40, 0.7),
    0 0 68px rgba(255, 90, 20, 0.45),
    0 0 98px rgba(255, 70, 10, 0.25);
  animation: candle-glow 2.4s ease-in-out infinite;
}

.splash__logo-wrap .splash__title {
  margin: 0;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.splash__logo {
  width: min(320px, 82vw);
  height: auto;
  position: relative;
  z-index: 1;
}

.splash__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--color-charcoal-soft);
  margin: 0 0 2rem;
}

.splash__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  max-width: var(--header-cluster-width);
  margin-inline: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--color-amber);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196, 105, 42, 0.35);
}

.btn--primary:hover {
  background: var(--color-amber-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196, 105, 42, 0.4);
}

.btn--secondary {
  background: transparent;
  color: var(--color-charcoal);
  border: 1.5px solid var(--color-border-strong);
}

.btn--secondary:hover {
  border-color: var(--color-amber);
  color: var(--color-amber);
}

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

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-charcoal);
}

.section-header__subtitle {
  font-size: 1.0625rem;
  color: var(--color-charcoal-soft);
  margin: 0;
  max-width: 36rem;
  margin-inline: auto;
}

.section-header__promo {
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: inline-block;
  font-size: 0.9375rem;
}

.section-header__promo strong {
  color: var(--color-amber);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

.product-card__image-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-charcoal);
  line-height: 1.25;
}

.product-card__description {
  font-size: 0.9375rem;
  color: var(--color-charcoal-soft);
  margin: 0;
  flex: 1;
  line-height: 1.55;
}

.product-card__footer {
  padding-top: 0.5rem;
}

.product-card__price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-amber);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

/* Order page */
.order-layout {
  max-width: min(720px, 100%);
  margin: 0 auto;
}

.order-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.75rem 1.5rem;
}

.order-card + .order-card {
  margin-top: 1.5rem;
}

.order-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.order-card__subtitle {
  font-size: 0.9375rem;
  color: var(--color-charcoal-soft);
  margin: 0 0 1.5rem;
}

.order-promo-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9375rem;
  color: var(--color-charcoal-soft);
}

.order-promo-list li::before {
  content: "✦ ";
  color: var(--color-amber);
}

.order-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
}

.order-line:last-child {
  border-bottom: none;
}

.order-line:nth-child(even) {
  background: var(--color-card);
}

.order-line__name {
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.35;
  min-width: 0;
}

.order-line__qty {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.order-line__qty label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-charcoal-soft);
  margin-right: 0.5rem;
}

.order-line__qty select {
  min-width: 3.25rem;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-charcoal);
  cursor: pointer;
}

.order-line__qty select:focus {
  outline: 2px solid var(--color-amber);
  outline-offset: 2px;
}

.order-total {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(196, 105, 42, 0.08), rgba(255, 220, 170, 0.15));
  border: 1px solid rgba(196, 105, 42, 0.2);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-charcoal);
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-total:empty::before {
  content: "Select quantities to see your total";
  font-weight: 400;
  color: var(--color-charcoal-soft);
  font-size: 0.9375rem;
}

.fulfillment-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.fulfillment-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: var(--color-cream);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.fulfillment-option.is-selected,
.fulfillment-option:has(input:checked) {
  border-color: var(--color-amber);
  background: rgba(196, 105, 42, 0.06);
}

.fulfillment-option input {
  accent-color: var(--color-amber);
  width: 1.125rem;
  height: 1.125rem;
}

.fulfillment-option span {
  font-weight: 500;
  font-size: 0.9375rem;
}

.shipping-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-charcoal-soft);
  margin-bottom: 0.35rem;
}

.form-field__req {
  color: var(--color-amber);
  font-weight: 700;
}

.form-field input {
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-charcoal);
}

.form-field input:focus {
  outline: 2px solid var(--color-amber);
  outline-offset: 2px;
  border-color: var(--color-amber);
}

.order-submit {
  margin-top: 1.5rem;
}

/* Thank you */
.thankyou {
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
  padding: 2rem 0;
}

.thankyou__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--color-amber), #e8a050);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  box-shadow: 0 4px 20px var(--color-amber-glow);
}

.thankyou__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 1rem;
}

.thankyou__message {
  font-size: 1rem;
  color: var(--color-charcoal-soft);
  margin: 0 0 0.75rem;
  line-height: 1.65;
}

.thankyou__actions {
  margin-top: 2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: rgba(255, 253, 249, 0.6);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
}

.site-footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-charcoal-soft);
  margin: 0 0 0.75rem;
}

.site-footer__contact {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
}

.site-footer__contact a {
  color: var(--color-charcoal-soft);
}

.site-footer__contact a:hover {
  color: var(--color-amber);
}

.site-footer__note {
  font-size: 0.8125rem;
  color: var(--color-charcoal-soft);
  opacity: 0.85;
  margin: 0;
}

/* Splash page: minimal header variant */
body.page-splash {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

body.page-splash .site-header {
  background: transparent;
  border-bottom: none;
  position: absolute;
  width: 100%;
  z-index: 10;
}

body.page-splash .site-main {
  max-width: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body.page-splash .splash,
body.page-splash .splash--full {
  flex: 1 1 auto;
  min-height: 0;
  padding: calc(var(--header-height) + 0.25rem) 1rem 0.35rem;
  justify-content: center;
}

body.page-splash .site-footer {
  position: relative;
  flex-shrink: 0;
  margin-top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-logo__glow,
  .splash__logo-wrap .site-logo__glow,
  .splash__logo-wrap::before,
  .splash__logo-wrap::after {
    animation: none;
    opacity: 0.9;
  }

  .product-card:hover {
    transform: none;
  }

  .btn--primary:hover {
    transform: none;
  }
}

/* Responsive */
@media (min-width: 601px) {
  .site-header__inner {
    max-width: var(--header-cluster-width);
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
  }

  .site-nav {
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  body.page-splash .splash--full {
    padding: calc(var(--header-height) + 0.15rem) 0.75rem 0.35rem;
  }

  body.page-splash .splash__logo-wrap {
    margin-bottom: 0.65rem;
  }

  body.page-splash .splash__logo {
    width: min(240px, 72vw);
  }

  body.page-splash .splash__tagline {
    margin-bottom: 0.75rem;
    font-size: 1rem;
  }

  body.page-splash .splash__actions {
    gap: 0.5rem;
  }

  body.page-splash .splash__actions .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }

  body.page-splash .site-footer {
    padding: 0.65rem 1rem 0.85rem;
  }

  body.page-splash .site-footer__brand {
    font-size: 1.0625rem;
    margin-bottom: 0.15rem;
  }

  body.page-splash .site-footer__tagline {
    margin-bottom: 0.35rem;
    font-size: 0.9375rem;
  }

  body.page-splash .site-footer__contact {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
  }

  body.page-splash .site-footer__note {
    font-size: 0.75rem;
  }

  .site-header {
    width: 100%;
  }

  .site-header__inner {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0.625rem 1rem;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .site-logo {
    flex-shrink: 0;
  }

  .site-logo img {
    width: 52px;
  }

  .site-nav {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.15rem 0.55rem;
  }

  .site-nav__link {
    font-size: 0.875rem;
  }

  .site-main {
    padding: 1.5rem 1rem 3rem;
  }

  .order-line {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem 0.5rem;
    padding: 0.65rem 0.75rem;
  }

  .order-line__name {
    font-size: 0.875rem;
  }

  .order-line__qty label {
    font-size: 0.75rem;
    margin-right: 0.35rem;
  }

  .order-line__qty select {
    min-width: 2.75rem;
    padding: 0.3rem 0.35rem;
    font-size: 0.875rem;
  }

  .order-card {
    padding: 1.35rem 1rem;
  }
}

.checkout-note {
  font-size: 0.9375rem;
  color: var(--color-charcoal-soft);
  margin: 0.75rem 0 0;
}

.checkout-note:empty {
  display: none;
}

.square-card-wrap {
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
}
