/* SavvyShop — systematic UI */

:root {
  --ink: #111827;
  --ink-soft: #6B7280;
  --paper: #EFECE6;
  --paper-lift: #FAF8F5;
  --line: #E2DDD5;
  --rose: #E11D48;
  --night: #18181B;
  --night-muted: #A1A1AA;
  --night-dim: #D4D4D8;
  --cream: #FAF8F5;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(225, 29, 72, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 20%, rgba(24, 24, 27, 0.04), transparent 50%),
    var(--paper);
  color: var(--ink);
}

.font-display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono);
}

::selection {
  background: var(--rose);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ——— Brand ——— */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.brand-link:hover {
  opacity: 0.92;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: var(--rose);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-mark svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--cream);
}

.brand-name .shop {
  font-weight: 500;
  opacity: 0.92;
}

.brand-link--footer .brand-name {
  font-size: 1.15rem;
  margin-bottom: 0;
}

.brand-link--footer {
  margin-bottom: 1rem;
}

/* ——— Header ——— */
.site-header {
  backdrop-filter: saturate(1.2) blur(10px);
  background: rgba(24, 24, 27, 0.96);
}

.site-header nav a {
  position: relative;
  transition: color 0.2s ease;
}

#mobileMenu.flex {
  display: flex;
}

#mobileMenu a {
  padding: 0.35rem 0;
  transition: color 0.2s ease;
}

#mobileMenu a:hover {
  color: var(--cream);
}

/* ——— Buttons ——— */
.btn-primary {
  background: var(--rose);
  color: #fff;
  border: 1px solid var(--rose);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px -12px rgba(225, 29, 72, 0.7);
}

.btn-primary:hover {
  background: #be123c;
  border-color: #be123c;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--night);
  color: var(--cream);
  border: 1px solid var(--night);
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-dark:hover {
  background: #27272a;
  transform: translateY(-1px);
}

/* ——— Spec tags ——— */
.spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--paper-lift);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.35rem 0.7rem;
  border-radius: 0.45rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.spec-tag-dark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--cream);
}

.spec-tag-cta {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
  clip-path: none;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

/* ——— Tape rule ——— */
.tape-rule {
  height: 1px;
  width: 100%;
  max-width: 12rem;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 8px,
    transparent 8px 14px
  );
  opacity: 0.35;
}

.tape-rule-light {
  background: repeating-linear-gradient(
    90deg,
    rgba(250, 248, 245, 0.55) 0 8px,
    transparent 8px 14px
  );
  opacity: 1;
  max-width: 14rem;
}

/* ——— Marquee ——— */
.marquee-wrap {
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ——— Reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ——— Product card ——— */
.product-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -24px rgba(17, 24, 39, 0.35);
  border-color: rgba(225, 29, 72, 0.28);
}

/* ——— Wishlist ——— */
.wish-btn {
  transition: transform 0.2s ease, background 0.2s ease;
}

.wish-btn:hover {
  transform: scale(1.06);
}

.wish-btn.active svg {
  fill: var(--rose);
  stroke: var(--rose);
}

/* ——— Size / color selectors ——— */
.color-swatch.selected,
.size-btn.selected,
.size-filter-btn.selected {
  border-color: var(--ink) !important;
  background: var(--ink);
  color: var(--cream);
}

.size-filter-btn.selected {
  border-color: var(--rose) !important;
  background: var(--rose);
}

/* ——— Modal ——— */
.modal-panel {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ——— Accordion ——— */
.accordion-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.chevron {
  transition: transform 0.25s ease;
}

/* ——— Hero polish ——— */
.hero-media {
  position: relative;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(17, 24, 27, 0.18));
  pointer-events: none;
  border-radius: inherit;
}

/* ——— Forms ——— */
input,
select,
textarea,
button {
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: transparent;
}

/* ——— Back to top ——— */
#backToTop:hover {
  background: var(--rose);
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .reveal,
  .product-card,
  .btn-primary,
  .btn-outline,
  .btn-dark {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
