/* Sadie's Custom Gifts — design system
   Shared aesthetic with charlotteclark.dev: dark, lime-accented.
   Fonts (Playfair Display + Inter) are loaded via <link> in the layout <head> (views/partials/fonts.ejs). */

:root {
  --color-bg: #1a1714;
  --color-bg-secondary: #211e1a;
  --color-accent: #c8f53b;
  --color-accent-hover: #b8e52b;
  --color-text-primary: #f0ece4;
  --color-text-secondary: #a09990;
  --color-text-muted: #6b6258;
  --color-border: #2e2a25;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s ease;
  --radius: 4px;
  --max-width: 1200px;
}

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

/* clip (not hidden): hidden turns body into a scroll container and breaks position:sticky */
html,
body {
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
.btn-primary:focus-visible,
.btn-text-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

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

a {
  color: inherit;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Buttons ---------- */

/* Primary: pill-shaped CTA with diagonal fill-wipe + animated arrow */
.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 1.1rem 2.5rem;
  border: none;
  border-radius: 50px;
  background: var(--color-accent);
  color: #111;
  transition: transform 0.3s ease, box-shadow 0.3s ease, gap 0.3s ease;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 0;
  width: 130%;
  height: 140%;
  background: var(--color-accent-hover);
  transform: translateX(-115%) skewX(-18deg);
  transform-origin: left center;
  transition: transform 0.45s ease;
}

.btn-primary__label,
.btn-primary__arrow {
  position: relative;
  z-index: 1;
}

.btn-primary__arrow {
  transition: transform 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(200, 245, 59, 0.25);
  gap: 0.9rem;
}

.btn-primary:hover::before,
.btn-primary:focus-visible::before {
  transform: translateX(-15%) skewX(-18deg);
}

.btn-primary:hover .btn-primary__arrow,
.btn-primary:focus-visible .btn-primary__arrow {
  transform: translateX(4px);
}

/* Secondary: outlined pill; fills with lime on hover, same wipe, lift and glow */
.btn-secondary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 1.05rem 2.25rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 50px;
  background: transparent;
  color: var(--color-accent);
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.btn-secondary::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 0;
  width: 130%;
  height: 140%;
  background: var(--color-accent);
  transform: translateX(-115%) skewX(-18deg);
  transform-origin: left center;
  transition: transform 0.45s ease;
}

.btn-secondary__label {
  position: relative;
  z-index: 1;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(200, 245, 59, 0.25);
  color: #111;
}

.btn-secondary:hover::before,
.btn-secondary:focus-visible::before {
  transform: translateX(-15%) skewX(-18deg);
}

.btn-secondary--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

/* Text link: pure text with a left-to-right underline draw */
.btn-text-link {
  position: relative;
  display: inline;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.btn-text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.btn-text-link:hover::after,
.btn-text-link:focus-visible::after {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .btn-primary:hover,
  .btn-primary:focus-visible {
    transform: none;
  }
  .btn-primary::before,
  .btn-secondary::before {
    display: none;
  }
  .btn-secondary:hover,
  .btn-secondary:focus-visible {
    transform: none;
    background: var(--color-accent);
  }
  .btn-primary:hover .btn-primary__arrow,
  .btn-primary:focus-visible .btn-primary__arrow {
    transform: none;
  }
  .btn-text-link::after {
    display: none;
  }
  .btn-text-link:hover,
  .btn-text-link:focus-visible {
    text-decoration: underline;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--color-bg);
  padding-top: 2.5rem;
  padding-bottom: 1.75rem;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

/* Logo lockup: [dog tumbler] [red-orange "Sadie's" wordmark + bold uppercase "Custom Gifts"], vertically centered.
   --wm is the wordmark width; the tumbler is sized from it (about the wordmark's height) so the pair scales together.
   Phones: tumbler left, wordmark with "Custom Gifts" under it on the right. 700px+: wordmark and text on one line. */
.hero__lockup {
  --wm: clamp(190px, 48vw + 40px, 300px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 2.5vw, 1.1rem);
  margin-bottom: 0.9rem;
  font-size: inherit; /* it's the page's <h1>; the text inside sets its own size */
  font-weight: inherit;
  line-height: inherit;
}

.hero__tumbler {
  flex: none;
  height: calc(var(--wm) * 0.54);
  width: auto; /* 128x371 source: shown smaller than native, never enlarged */
}

.hero__lockup-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.hero__wordmark {
  width: var(--wm);
  max-width: 100%;
  height: auto;
}

.hero__lockup-text {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(0.85rem, 1.6vw + 0.5rem, 2.3rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

/* Tablet/desktop: same stacked lockup as phones, just a bit larger (capped so it isn't oversized on big screens) */
@media (min-width: 700px) {
  .hero__lockup {
    --wm: clamp(250px, 14vw + 140px, 340px);
  }
  .hero__lockup-text {
    font-size: calc(var(--wm) * 0.066);
  }
}

.hero__tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: 420px;
  margin: 0 auto 1rem;
}

.hero__tagline::before,
.hero__tagline::after {
  content: '';
  flex: none;
  width: 24px;
  height: 1px;
  background: var(--color-border);
}

.hero__tagline span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Local pickup block under the tagline */
.hero__pickup {
  max-width: 34rem;
  margin: 0 auto 1.25rem;
  text-align: center;
}

.hero__pickup-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Each town on its own line; a line never breaks in the middle (the type shrinks a little on very narrow phones) */
.hero__pickup-town {
  font-size: clamp(0.8rem, 4.4vw, 0.95rem);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--color-text-primary);
}

.hero__pickup-note + .hero__pickup-note { margin-top: 0.1rem; }
.hero__pickup-note {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

@media (min-width: 700px) {
  .hero__pickup { max-width: none; }
  .hero__pickup-town { font-size: 1.05rem; }
  .hero__pickup-note { font-size: 0.9rem; white-space: nowrap; } /* wide screens: each note stays on one line */
}

/* "Need a gift now?" + the Grab and Go button */
.hero__gift {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.hero__gift-prompt {
  margin-bottom: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.hero__gift .hero__cta {
  max-width: 100%;
  padding-left: clamp(1.4rem, 6vw, 2.5rem);
  padding-right: clamp(1.4rem, 6vw, 2.5rem);
  text-align: center;
}

/* The seasonal holiday button (Site text -> Home — hero): the green button's size, shape and hover lift, in festive red, with a snowflake,
   a small white NEW pill and a soft shimmer every few seconds (none for people who prefer reduced motion). It sits to the LEFT of the green one. */
.hero__cta-row { display: flex; align-items: stretch; justify-content: center; gap: 0.8rem; max-width: 100%; }
.hero__cta-row .hero__cta { justify-content: center; }
.btn-holiday { background: #c8102e; color: #fff; }
.btn-holiday::before { background: #a30d25; }
.btn-holiday:hover, .btn-holiday:focus-visible { box-shadow: 0 8px 25px rgba(200, 16, 46, 0.45); }
.btn-holiday:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn-holiday__text { display: inline-block; height: 1em; line-height: 1; text-align: center; white-space: nowrap; } /* one line at full size: exactly the green button's height */
.btn-holiday__text .icon { display: inline-block; vertical-align: -0.2em; margin: -3px 0.4rem -3px 0; }
.btn-holiday__tag { display: inline-block; vertical-align: 0.12em; margin-right: 0.4rem; padding: 0.22em 0.55em; border-radius: 999px; background: #fff; color: #c8102e; font-size: 0.62em; font-weight: 800; letter-spacing: 0.08em; line-height: 1; }
.btn-holiday::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none; background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%); transform: translateX(-160%) skewX(-18deg); animation: holiday-shimmer 5.5s ease-in-out 1.6s infinite; }
.btn-holiday__text .icon { animation: holiday-twinkle 5.5s ease-in-out 1.6s infinite; }
@keyframes holiday-shimmer { 0%, 62% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(380%) skewX(-18deg); } }
@keyframes holiday-twinkle { 0%, 60%, 100% { transform: scale(1) rotate(0deg); } 70% { transform: scale(1.3) rotate(30deg); } 82% { transform: scale(1) rotate(60deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-holiday::after, .btn-holiday__text .icon { animation: none; }
  .btn-holiday::after { display: none; }
}
/* Phones (and small tablets, up to 767px — below that the two full-size buttons don't fit one row): the two buttons share ONE row as half-width
   buttons (smaller text, labels may wrap to two lines, never shorter than 44px) so the hero doesn't grow. */
@media (max-width: 767px) {
  .hero__gift:has(.hero__cta-row--pair) { align-self: stretch; }
  .hero__cta-row--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; width: 100%; }
  .hero__gift .hero__cta-row--pair .hero__cta { min-height: 44px; width: 100%; padding: 0.5rem 0.4rem; font-size: 0.8rem; line-height: 1.15; gap: 0; }
  .hero__cta-row--pair .btn-primary__arrow { display: none; }
  .hero__cta-row--pair .btn-holiday__text { height: auto; line-height: 1.15; white-space: normal; } /* phones: free to wrap onto two lines */
  .hero__cta-row--pair .btn-holiday__text .icon { width: 14px; height: 14px; margin-right: 0.3rem; vertical-align: -0.18em; }
  .hero__cta-row--pair .btn-holiday__tag { margin-right: 0.3rem; font-size: 0.66em; }
}
@media (min-width: 480px) and (max-width: 767px) {
  .hero__gift .hero__cta-row--pair .hero__cta { font-size: 0.95rem; padding: 0.65rem 0.8rem; }
  .hero__cta-row--pair .btn-holiday__text .icon { width: 17px; height: 17px; }
  .hero__cta-row--pair .btn-holiday__tag { font-size: 0.62em; }
}

/* Staggered fade-in-up on load */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__eyebrow,
.hero__lockup,
.hero__tagline,
.hero__pickup,
.hero__gift {
  opacity: 0;
  animation: fade-in-up 0.7s ease forwards;
}

.hero__eyebrow {
  animation-delay: 0.1s;
}
.hero__lockup {
  animation-delay: 0.3s;
}
.hero__tagline {
  animation-delay: 0.5s;
}
.hero__pickup {
  animation-delay: 0.65s;
}
.hero__gift {
  animation-delay: 0.8s;
}

@media (prefers-reduced-motion: reduce) {
  .hero__eyebrow,
  .hero__lockup,
  .hero__tagline,
  .hero__pickup,
  .hero__gift {
    animation: none;
    opacity: 1;
  }
}

/* ---------- Product showcase ---------- */
.showcase {
  background: var(--color-bg);
  padding-top: 2.5rem;
  padding-bottom: 1.25rem;
}

.showcase__heading {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  text-align: center;
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin-bottom: 2.25rem;
}

.showcase__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.product-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-secondary);
  transition: box-shadow 0.3s ease;
}

.product-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* The photo area: a fixed 4:5 box showing the WHOLE photo (never cropped) — object-fit: contain
   letterboxes it, and the box's own background (matching the page) fills that empty space so it
   reads as intentional, not a broken image. */
.product-card__media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-bg);
}

.product-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--color-bg);
  display: block;
  transition: transform 0.6s ease;
}

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

/* Name/price/etc. live in normal flow below the photo now — nothing overlays the picture. */
.product-card__body {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem 1.1rem;
}

.product-card__name {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.product-card__price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1.25rem;
}

.product-card__options {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__cta {
  margin-top: 0.45rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-accent);
}

.product-card__price-prefix {
  font-style: italic;
  font-weight: 400;
  color: var(--color-text-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .product-card:hover .product-card__img {
    transform: none;
  }
}

.showcase__note {
  margin-top: 2rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  font-family: var(--font-body);
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.showcase__note-line {
  display: block;
}

.showcase__note .btn-text-link {
  color: var(--color-accent);
  font-weight: 700;
}

.btn-primary--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-bg);
  padding: 3rem 2rem 2rem;
}

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

.footer__note {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 46ch;
  margin: 0 auto;
}

/* Keep the phone number in one piece: it wraps to the next line as a unit, never at a hyphen. */
.footer__phone {
  white-space: nowrap;
}

.footer__divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 2rem auto;
}

.footer__copyright {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.footer__links { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer__links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.15rem 1.4rem; font-family: var(--font-body); font-size: 0.95rem; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-text-secondary); text-decoration: none; }
.footer__links a:hover, .footer__links a:focus-visible { color: var(--color-accent); text-decoration: underline; text-underline-offset: 4px; }
.footer__social { gap: 0.4rem; }
.footer__social-link { justify-content: center; min-width: 44px; border-radius: 50%; color: var(--color-text-primary) !important; }
.footer__signup { max-width: 26rem; margin: 0 auto; }
.footer__signup-title { font-family: var(--font-body); font-weight: 700; color: var(--color-text-primary); margin: 0 0 0.75rem; }

.newsletter-form__row { display: flex; gap: 0.6rem; }
.newsletter-form__input { flex: 1; min-width: 0; }
.newsletter-form__btn { flex: none; }
.newsletter-form__msg { margin: 0.6rem 0 0; font-size: 0.85rem; color: var(--color-text-secondary); }
.newsletter-form__msg.is-error { color: #e65a46; }
.newsletter-form__msg.is-ok { color: var(--color-accent); }

/* ---------- Responsive ---------- */

/* Phone: under 480px */
@media (max-width: 479px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero {
    padding-top: 1.75rem;
    padding-bottom: 1.25rem;
  }

  .hero__eyebrow {
    font-size: 0.6rem;
    margin-bottom: 0.75rem;
  }

  .hero__tagline {
    margin-bottom: 0.85rem;
  }

  .showcase__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .showcase__heading {
    margin-bottom: 1rem;
  }

  .showcase {
    padding-top: 1.25rem;
    padding-bottom: 1rem;
  }

  .footer {
    padding: 2.5rem 1.25rem 2rem;
  }
}

/* Tablet: 480px – 899px */
@media (min-width: 480px) and (max-width: 899px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }

  .hero__tagline span {
    font-size: 0.72rem;
  }

  .showcase__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .showcase {
    padding-top: 2.5rem;
    padding-bottom: 1.25rem;
  }
}

/* Desktop: 900px and up */
@media (min-width: 900px) {
  .container {
    padding: 0 2rem;
  }

  .hero {
    padding-top: 3.5rem;
    padding-bottom: 2.25rem;
  }

  .hero__tagline span {
    font-size: 0.8rem;
  }

  .showcase {
    padding-top: 2rem;
    padding-bottom: 1.25rem;
  }
}
