/* =========================================================
   Such and Such — styles
   Colors live here at the top. Change one and it updates everywhere.
   ========================================================= */
:root {
  --space: #12082a;        /* deep space purple-black (header, footer, hero) */
  --space-2: #23104d;
  --purple: #7c3aed;       /* main brand purple */
  --purple-dark: #5b21b6;
  --purple-soft: #ede4ff;
  --page: #f8f4ff;         /* page background (soft lavender) */
  --lime: #c3f53c;         /* UFO-light green */
  --lime-dark: #8dbf14;
  --green: #5fdc4c;        /* planet green */
  --blue: #2f6fe0;         /* planet blue */
  --pink: #ff5fae;
  --orange: #ffa63d;
  --ink: #1e1238;          /* main text */
  --muted: #6b5f86;
  --card: #ffffff;
  --border: #e6dcfb;

  --radius: 22px;
  --shadow: 0 12px 28px rgba(76, 29, 149, 0.12);
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--purple); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.15rem; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }

.section-title {
  display: inline-block;
  position: relative;
  margin-bottom: 0.9em;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 56px;
  height: 6px;
  border-radius: 6px;
  background: var(--lime);
}

.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }

/* ---------- Starry background (used in header, hero, footer) ---------- */
.starfield {
  background-color: var(--space);
  background-image:
    radial-gradient(1.6px 1.6px at 24px 32px, #fff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 88px 124px, #fff 50%, transparent 55%),
    radial-gradient(2px 2px at 156px 64px, #e3d3ff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 212px 182px, #fff 50%, transparent 55%),
    radial-gradient(1.6px 1.6px at 268px 96px, #fff 50%, transparent 55%),
    radial-gradient(1px 1px at 120px 200px, #c3f53c 50%, transparent 55%);
  background-size: 300px 230px;
  color: #fff;
}

/* ---------- Free shipping banner ---------- */
.banner {
  background: var(--lime);
  color: var(--ink);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
}
.banner .spark { color: var(--purple); margin: 0 0.4em; }
@media (max-width: 370px) {
  .banner { font-size: 0.88rem; padding: 7px 10px; }
  .banner .spark { display: none; } /* keeps the message on one line on small phones */
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 3px solid var(--purple);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.brand-icon { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.brand-text small { font-size: 0.8rem; color: var(--lime); font-weight: 700; letter-spacing: 0.04em; }

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.15s;
}
@media (hover: hover) {
  .site-nav a:hover { background: var(--space-2); }
}
.site-nav a[aria-current="page"] { background: var(--lime); color: var(--ink); }
.site-nav .short { display: none; }

@media (max-width: 720px) {
  /* On phones the header scrolls away so the keychains get the whole screen */
  .site-header { position: static; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .brand { justify-content: center; }
  .brand-icon { width: 36px; height: 36px; }
  .brand-text strong { font-size: 1.2rem; }
  .site-nav { justify-content: space-between; gap: 2px; flex-wrap: nowrap; }
  /* 44px tall: big enough to tap with a thumb */
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 0.98rem; }
  .site-nav .long { display: none; }
  .site-nav .short { display: inline; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.8em 1.4em;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 0 var(--purple-dark);
  transition: transform 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}
/* Hover effects only on devices with a mouse, so they don't "stick" after a tap on phones */
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--purple-dark); }
  .btn-lime:hover { box-shadow: 0 6px 0 var(--lime-dark); }
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--purple-dark); }

.btn-lime { background: var(--lime); color: var(--ink); box-shadow: 0 4px 0 var(--lime-dark); }
.btn-lime:active { box-shadow: 0 2px 0 var(--lime-dark); }

.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.btn-ghost:hover, .btn-ghost:active { box-shadow: inset 0 0 0 2px #fff; }

.btn-small { font-size: 0.92rem; padding: 0.6em 1.1em; }
.btn-big { font-size: 1.2rem; padding: 0.9em 1.8em; }

.btn.is-disabled {
  background: #e7e1f3;
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Home hero ---------- */
.hero {
  text-align: center;
  padding: 24px 0 56px;
  overflow: hidden;
}
.hero-logo {
  width: min(480px, 100%);
  margin: -8px auto -12px;
  mix-blend-mode: lighten; /* lets the logo's black background melt into the stars */
}
.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  max-width: 24ch;
  margin: 4px auto 12px;
}
.hero h1 .hl { color: var(--lime); }
.hero p { color: #d9ccf5; max-width: 44ch; margin: 0 auto 26px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Feature cards ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature h3 { margin: 12px 0 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 1rem; }
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
}
.feature-icon svg { width: 28px; height: 28px; }
.bg-purple { background: var(--purple); }
.bg-blue { background: var(--blue); }
.bg-green { background: var(--green); }
.bg-pink { background: var(--pink); }
.bg-orange { background: var(--orange); }

/* ---------- Category tiles (home) ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  padding: 20px 22px;
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  transition: transform 0.15s;
}
@media (hover: hover) {
  .tile:hover { transform: translateY(-4px) rotate(-1deg); }
}
.tile strong { font-size: 1.5rem; font-weight: 600; }
.tile span { opacity: 0.9; }

/* ---------- Instagram callout ---------- */
.callout {
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
}
.callout h2 { margin-bottom: 0.3em; }
.callout p { color: #d9ccf5; margin: 0 0 20px; }

/* ---------- Shop filters ---------- */
.shop-head { padding: 40px 0 8px; }
.shop-head p { margin: 0; color: var(--muted); }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 12px;
}
.filter {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s, background 0.15s;
}
@media (hover: hover) {
  .filter:hover { border-color: var(--purple); }
}
.filter[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.filter .count { opacity: 0.65; font-size: 0.85em; margin-left: 4px; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  min-height: 44px;
  margin-bottom: 12px;
}
.toggle input { width: 20px; height: 20px; accent-color: var(--purple); }

/* ---------- Product grid + cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px) rotate(-0.5deg); box-shadow: var(--shadow); }
}

.card-photo {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--purple-soft);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; }

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-body h3 { margin: 0; font-size: 1.08rem; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--purple); }
.card-foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}

.chip {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
}

/* Sold */
.card.is-sold .card-photo img,
.gallery.is-sold .gallery-main img { filter: grayscale(0.7); opacity: 0.7; }
.sold-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transform: rotate(10deg);
}
.sold-badge.big { font-size: 1.4rem; padding: 8px 20px; top: 18px; right: 18px; }
.sold-note { color: var(--muted); font-weight: 700; font-size: 0.92rem; }

@media (max-width: 560px) {
  .card-body { padding: 10px 10px 12px; }
  .card-body h3 { font-size: 0.98rem; }
  .price { font-size: 1.05rem; }
  .card-foot .btn { width: 100%; min-height: 44px; }
  .sold-badge { font-size: 0.8rem; padding: 4px 10px; top: 8px; right: 8px; }
}

/* Messages (loading, empty, errors) */
.notice {
  grid-column: 1 / -1;
  text-align: center;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  color: var(--muted);
}

/* ---------- Product page ---------- */
.back-link {
  display: inline-block;
  margin: 18px 0 8px;
  padding: 10px 0; /* bigger tap area, same spacing */
  font-weight: 700;
  text-decoration: none;
}
.product {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; gap: 24px; }
}

.gallery-main {
  position: relative;
  aspect-ratio: 3 / 4; /* matches upright phone photos, so nothing gets cut off */
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--purple-soft);
  border: 2px solid var(--border);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main { touch-action: pan-y pinch-zoom; } /* lets a sideways swipe change the photo */
.photo-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(18, 8, 42, 0.72);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
}
.thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 4px 2px;
}
.thumb {
  flex: 0 0 76px;
  height: 76px;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid transparent;
  background: var(--purple-soft);
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--purple); }

.product-info h1 { margin: 10px 0 6px; }
.product-info .price { font-size: 1.8rem; display: block; margin-bottom: 18px; }
.product-info .description { margin: 22px 0; white-space: pre-line; }
.product-info .btn-big { width: 100%; max-width: 360px; }

.perks {
  list-style: none;
  padding: 18px 20px;
  margin: 22px 0 0;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
}
.perks li { display: flex; gap: 10px; align-items: baseline; }
.perks li::before { content: "✦"; color: var(--purple); }

.sold-panel {
  background: #fff0f7;
  border: 2px solid #ffc2df;
  border-radius: var(--radius);
  padding: 16px 18px;
}
.sold-panel strong { font-family: var(--font-display); font-size: 1.2rem; color: #d42f84; }
.sold-panel p { margin: 4px 0 0; }

/* Buy bar: sticks to the bottom of the screen on phones so Buy is always one tap away */
.buy-bar { display: none; }
@media (max-width: 820px) {
  .buy-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--card);
    border-top: 2px solid var(--border);
    box-shadow: 0 -8px 24px rgba(76, 29, 149, 0.12);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s;
  }
  .buy-bar.is-visible { transform: none; visibility: visible; }
  .buy-bar-info { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
  .buy-bar-name {
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .buy-bar .btn { min-height: 48px; padding: 0 2em; font-size: 1.1rem; }
  body.has-buy-bar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- Text pages (About, Shipping) ---------- */
.page-hero { padding: 48px 0 36px; text-align: center; }
.page-hero p { color: #d9ccf5; max-width: 50ch; margin: 0 auto; }

.prose { max-width: 760px; margin: 0 auto; }
.panel {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 10px;
  margin-bottom: 20px;
}
.panel h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.panel h2 .dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.panel p, .panel ul { margin: 0 0 16px; }
.panel ul { padding-left: 1.2em; }

.about-photo {
  border-radius: var(--radius);
  border: 2px solid var(--border);
  margin: 0 0 20px;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 28px; margin-top: 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .site-footer ul { gap: 0; }
  .site-footer li a { display: inline-block; padding: 10px 0; } /* easier to tap */
}
.site-footer h3 { font-size: 1rem; color: var(--lime); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { color: #cbbbef; margin: 8px 0 0; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.88rem;
  color: #b9a8e3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
