/* ============================================================
   SWELL SODA CO. — STOREFRONT STYLES
   Brand tokens up top; tweak these to restyle the whole site.
   ============================================================ */

/* Optional: drop your licensed brand font (swell_font.otf / "Healey")
   into assets/fonts/ and it will be used for headlines automatically. */
@font-face {
  font-family: "Healey";
  src: url("../assets/fonts/swell_font.otf") format("opentype");
  font-display: swap;
}

:root {
  --teal: #236265;          /* primary — pulled from swellsodacompany.com */
  --teal-dark: #184547;
  --teal-light: #dcebea;
  --sand: #f6efe3;
  --sand-deep: #e9dcc6;
  --coral: #e9806e;         /* accent — sunset / fruit purée */
  --ink: #1e1e1e;
  --muted: #5f6b6b;
  --line: #e4e0d8;
  --white: #ffffff;

  --font-display: "Healey", "Baloo 2", "Quicksand", system-ui, sans-serif;
  --font-body: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-pill: 999px;
  --shadow: 0 10px 30px rgba(24, 69, 71, 0.12);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; font-family: var(--font-body); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--teal); background: var(--teal); color: var(--white);
  padding: 13px 28px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: background .2s, transform .15s, color .2s;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn:active { transform: scale(.98); }
.btn--ghost { background: transparent; color: var(--teal); }
.btn--ghost:hover { background: var(--teal-light); color: var(--teal-dark); }
.btn--light { background: var(--white); color: var(--teal); border-color: var(--white); }
.btn--light:hover { background: var(--sand); border-color: var(--sand); color: var(--teal-dark); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Announcement + header ---------- */
.announce {
  background: var(--teal-dark); color: var(--white);
  text-align: center; font-size: .88rem; font-weight: 600; padding: 8px 16px;
}
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal); }
.brand__logo { width: 46px; height: 46px; color: var(--teal); }
.brand__word { display: flex; flex-direction: column; line-height: 1; }
.brand__word strong { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .04em; }
.brand__word span { font-size: .6rem; letter-spacing: .32em; font-weight: 700; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; color: var(--ink); font-size: .95rem; }
.nav a:hover { color: var(--teal); }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal); color: var(--white); border: 0;
  padding: 10px 16px; border-radius: var(--radius-pill); font-weight: 700;
}
.cart-btn svg { width: 20px; height: 20px; }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--coral); color: var(--white); font-size: .78rem;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #2e7a7c 0%, var(--teal) 55%, var(--teal-dark) 100%);
  color: var(--white);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 72px 20px 120px; }
.eyebrow { font-weight: 600; font-size: 1.15rem; opacity: .9; margin: 0 0 10px; }
.hero p.lead { font-size: 1.15rem; max-width: 30em; opacity: .92; margin: 18px 0 30px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__ctas .btn--ghost { color: var(--white); border-color: rgba(255,255,255,.7); }
.hero__ctas .btn--ghost:hover { background: rgba(255,255,255,.12); color: var(--white); }
.hero__art { display: flex; justify-content: center; }
.hero__badge {
  width: min(360px, 80%); aspect-ratio: 1; color: var(--teal-dark);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.25));
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
.hero__waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; }

/* ---------- Shop ---------- */
.section { padding: 72px 0; }
.section--sand { background: var(--sand); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section__head p { margin: 8px 0 0; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 2px solid var(--line); background: var(--white); color: var(--ink);
  padding: 8px 16px; border-radius: var(--radius-pill); font-weight: 600; font-size: .92rem;
}
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card__media {
  position: relative; aspect-ratio: 1; background: var(--sand);
  display: flex; align-items: center; justify-content: center; border: 0; padding: 0; width: 100%;
}
.card__media img, .card__media svg { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--white); color: var(--teal); font-size: .75rem; font-weight: 700;
  padding: 5px 10px; border-radius: var(--radius-pill); box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.badge--soon { background: var(--coral); color: var(--white); }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.card__title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.card__title button { all: unset; cursor: pointer; }
.card__title button:hover { color: var(--teal); }
.price { font-weight: 700; color: var(--teal); white-space: nowrap; }
.swatches { display: flex; gap: 8px; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--line); padding: 0;
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--teal); }
.card__actions { margin-top: auto; display: flex; gap: 8px; }
.card__actions .btn { flex: 1; padding: 10px 14px; font-size: .92rem; white-space: nowrap; }
.card__actions .btn--ghost { flex: 0 0 auto; padding: 10px 16px; }

/* ---------- Protein teaser ---------- */
.teaser {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  background: var(--teal); color: var(--white); border-radius: 28px; padding: 48px;
}
.teaser p { opacity: .9; }
.notify { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.notify input {
  flex: 1; min-width: 200px; padding: 13px 18px; border-radius: var(--radius-pill);
  border: 0; font: inherit;
}
.teaser__art { display: flex; justify-content: center; gap: 16px; }
.teaser__art svg { width: 44%; max-width: 200px; border-radius: 20px; }

/* ---------- Visit ---------- */
.locations { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.loc { background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.loc h3 { color: var(--teal); margin-bottom: 8px; }
.loc p { margin: 2px 0; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--teal-dark); color: rgba(255,255,255,.85); padding: 48px 0 28px; }
.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer a { color: var(--white); }
.footer .brand { color: var(--white); }
.footer .brand__logo { color: var(--teal-dark); }
.footer small { display: block; margin-top: 28px; opacity: .6; }

/* ---------- Drawer + modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 35, 36, .45);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  background: var(--white); z-index: 60; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s ease;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head, .modal__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 1.6rem; }
.icon-btn { background: none; border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 1.4rem; line-height: 1; }
.icon-btn:hover { background: var(--sand); }
.drawer__items { flex: 1; overflow-y: auto; padding: 8px 22px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line__img { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--sand); }
.line__img svg, .line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-weight: 700; margin: 0; }
.line__meta { color: var(--muted); font-size: .85rem; margin: 2px 0 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-pill); }
.qty button { background: none; border: 0; width: 32px; height: 30px; font-size: 1.05rem; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.line__right { text-align: right; }
.line__remove { background: none; border: 0; color: var(--muted); font-size: .8rem; text-decoration: underline; padding: 0; margin-top: 6px; }
.drawer__foot { padding: 20px 22px; border-top: 1px solid var(--line); background: var(--sand); }
.totals { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.fine { color: var(--muted); font-size: .82rem; margin: 0 0 14px; }
.empty { text-align: center; color: var(--muted); padding: 60px 10px; }

.modal {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__panel {
  background: var(--white); border-radius: 24px; width: min(880px, 100%); max-height: 92vh; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; position: relative; box-shadow: var(--shadow);
}
.modal__panel--sm { width: min(460px, 100%); display: block; padding: 32px; text-align: center; }
.modal__media { background: var(--sand); aspect-ratio: 1; }
.modal__media svg, .modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 34px 30px; display: flex; flex-direction: column; gap: 16px; }
.modal__body h2 { font-size: 2rem; }
.modal__close { position: absolute; top: 12px; right: 12px; background: var(--white); }
.opt-label { font-weight: 700; font-size: .9rem; margin-bottom: 8px; display: block; }
.opt-label span { font-weight: 500; color: var(--muted); }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.size {
  min-width: 48px; padding: 9px 12px; border-radius: 10px;
  border: 2px solid var(--line); background: var(--white); font-weight: 700;
}
.size[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-light); color: var(--teal-dark); }
.modal .swatch { width: 30px; height: 30px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px);
  background: var(--ink); color: var(--white); padding: 12px 20px; border-radius: var(--radius-pill);
  font-weight: 600; z-index: 80; transition: transform .3s ease, opacity .3s; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .hero__inner { grid-template-columns: 1fr; padding: 48px 20px 110px; text-align: left; }
  .hero__art { order: -1; }
  .hero__badge { width: 170px; }
  .teaser { grid-template-columns: 1fr; padding: 32px 24px; }
  .modal__panel { grid-template-columns: 1fr; }
  .modal__media { aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card__body { padding: 12px; }
  .card__top { flex-direction: column; gap: 2px; }
  .card__title { font-size: .95rem; }
  .card__actions .btn--ghost { display: none; }
  .section { padding: 52px 0; }
  .brand__word span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
