/* ==========================================================================
   GREEN WEEK AT THE CO. — Nov 23–28, 2026
   Shared styles for the homepage feature (index.html #green-week) and the
   landing page (/green-week/). Banners are built in HTML/CSS (not flat
   images) following the Canva "TCC - Green Week Campaign" layouts; only the
   text-free artwork (gw-art-*.webp) comes from Canva.
   ========================================================================== */

:root {
  --gw-green: #7eed57;
  --gw-gold: #ffd84d;
  --gw-pink: #ff3fa4;
  --gw-line: rgba(255, 255, 255, 0.12);
}

/* ── Banner shell ──────────────────────────────────────────────────────── */
.gwb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(380px, 34vw, 500px);
  border-radius: 22px;
  border: 1px solid rgba(126, 237, 87, 0.3);
  background:
    radial-gradient(ellipse 45% 70% at 18% 60%, rgba(255, 63, 164, 0.16), transparent 70%),
    #050505;
  box-shadow: 0 30px 80px -35px rgba(0, 0, 0, 0.95), 0 0 70px -35px rgba(126, 237, 87, 0.55);
  color: #fff;
  text-align: center;
}
.gwb-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  z-index: -1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
}
.gwb-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--gw-art-pos, center);
}
/* Portrait artwork (from 4:5 social layouts): narrower column, less zoom */
.gwb-art.is-tall { width: 46%; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%); mask-image: linear-gradient(90deg, transparent 0%, #000 22%); }
.gwb-content {
  position: relative;
  container-type: inline-size;
  width: min(50%, 660px);
  padding: clamp(28px, 3.4vw, 52px) clamp(20px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Headline lockup: GREEN [leaf] WEEK / AT THE CO. ─────────────────────── */
.gwb-lockup {
  margin: 0;
  font-family: "Anton", Impact, "Arial Narrow", sans-serif;
  font-weight: 400;
  font-style: italic;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.005em;
  font-size: clamp(44px, 6.2vw, 96px);
  /* "GREEN 🍃 WEDNESDAY" is ~7.8em wide: cap the size to the text column so
     the animated word never gets cut off (cqi = 1% of .gwb-content width). */
  font-size: min(clamp(44px, 6.2vw, 96px), 12.4cqi);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}
.gwb-lockup-row { display: flex; align-items: center; justify-content: center; gap: 0.08em; white-space: nowrap; }
.gwb-green { color: var(--gw-green); }
.gwb-leaf { width: 0.86em; height: 0.86em; flex: none; color: var(--gw-green); filter: drop-shadow(0 0 10px rgba(126, 237, 87, 0.45)); }
/* Brush underline — same textured stroke as the homepage hero ("where the locals shop"),
   used as a mask so it can be tinted (gold by default, green on the small lockup). */
.gwb-brush {
  display: block;
  width: 92%;
  aspect-ratio: 860 / 34;
  margin: 0.06em auto 0;
  color: var(--gw-gold);
  background: currentColor;
  -webkit-mask: url("/assets/images/green-week/gw-brush.svg") center / 100% 100% no-repeat;
  mask: url("/assets/images/green-week/gw-brush.svg") center / 100% 100% no-repeat;
}
.gwb-content > .gwb-brush { width: min(100%, 520px); margin-top: 8px; }
.gwb-title + .gwb-brush { margin-top: 2px; }
.gwb-brush--green { color: var(--gw-green); }

/* Brush-stroke draw-in. Day banners draw once each time their tab opens;
   the main lockup redraws every cycle as WEEK lands (synced to the 7s swap). */
@media (prefers-reduced-motion: no-preference) {
  .gwb-brush { animation: gwBrushDraw 1.2s cubic-bezier(.25, 1, .5, 1) .5s both; }
  .gwb-lockup--sm .gwb-brush { animation-delay: .15s; }
  .gwb-lockup:has(.gwb-swap.is-animated) + .gwb-brush {
    animation: gwBrushLoop 7s cubic-bezier(.65, 0, .35, 1) infinite;
    filter: drop-shadow(0 0 8px rgba(255, 216, 77, .45));
  }
}
@keyframes gwBrushDraw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes gwBrushLoop {
  0%, 42% { clip-path: inset(0 100% 0 0); }
  54%, 92% { clip-path: inset(0 0 0 0); }
  98%, 100% { clip-path: inset(0 0 0 100%); }
}

/* Small lockup used at the top of day banners */
.gwb-lockup--sm { font-size: clamp(26px, 2.6vw, 38px); margin-bottom: 14px; }
.gwb-lockup--sm .gwb-brush { width: 92%; aspect-ratio: 860 / 64; margin-top: 4px; }

/* Day title: GREEN WEDNESDAY / BLACK FRIDAY … */
.gwb-title {
  margin: 0;
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.95;
  font-size: clamp(38px, 4.5vw, 70px);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}
.gwb-title .gwb-white { font-style: italic; }

.gwb-tag {
  margin: 14px 0 0;
  font-family: "Bebas Neue", sans-serif;
  font-style: italic;
  font-size: clamp(20px, 2.1vw, 30px);
  letter-spacing: 1px;
  color: #fff;
}

.gwb-date {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 8px 22px 6px;
  border: 1.5px solid var(--gw-pink);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.82);
  box-shadow: 0 0 22px -6px rgba(255, 63, 164, 0.55);
  font-family: "Anton", sans-serif;
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 40px);
  line-height: 1.1;
  color: var(--gw-gold);
  transform: skewX(-8deg);
  white-space: nowrap;
}
.gwb-date svg { width: 1.05em; height: 1.05em; flex: none; }

.gwb-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  min-width: min(100%, 300px);
  min-height: 56px;
  padding: 0 34px;
  border-radius: 999px;
  background: var(--gw-green);
  color: #000;
  font: 400 clamp(22px, 2vw, 28px)/1 "Bebas Neue", sans-serif;
  letter-spacing: 0.5px;
  text-decoration: none;
  box-shadow: 0 12px 30px -10px rgba(126, 237, 87, 0.7);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.gwb-cta:hover { transform: translateY(-2px); background: #a2ff80; }
.gwb-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Street-art doodles */
.gwb-doodle { position: absolute; z-index: 1; pointer-events: none; opacity: 0.9; }
.gwb-doodle--crown { top: 9%; left: 5%; width: 56px; color: var(--gw-green); transform: rotate(-12deg); }
.gwb-doodle--heart { top: 12%; left: 42%; width: 40px; color: var(--gw-pink); transform: rotate(8deg); }
.gwb-doodle--peace { bottom: 16px; left: 16px; width: 30px; color: var(--gw-green); }

.gwb-title, .gw-h2 { text-wrap: balance; }
/* Tablet: the text column is too narrow for doodles without overlapping */
@media (min-width: 768px) and (max-width: 1023px) {
  .gwb-doodle { display: none; }
}

/* ── GREEN WEDNESDAY → GREEN WEEK swap (homepage + landing hero) ────────────
   "WEEK" is the real text; "WEDNESDAY" is CSS-generated so the heading and
   SEO read "Green Week". Without animation it simply shows "WEEK".          */
/* The slot shrinks from WEDNESDAY's width (4.44em) to WEEK's (2.03em), so the
   centred row re-centres smoothly instead of the long word spilling out. */
.gwb-swap { position: relative; display: inline-block; text-align: left; }
.gwb-swap-old { position: absolute; left: 0; top: 0; white-space: nowrap; visibility: hidden; opacity: 0; color: #fff; }
.gwb-swap-old::before { content: attr(data-word); }

@media (prefers-reduced-motion: no-preference) {
  .gwb-swap.is-animated { width: 2.03em; animation: gwSlot 7s cubic-bezier(.7, 0, .3, 1) infinite; }
  .gwb-swap.is-animated .gwb-swap-old { visibility: visible; animation: gwOld 7s cubic-bezier(.7, 0, .3, 1) infinite; }
  .gwb-swap.is-animated .gwb-swap-old::after {
    content: "";
    position: absolute;
    left: -3%;
    top: 46%;
    width: 106%;
    height: 0.1em;
    background: var(--gw-green);
    box-shadow: 0 0 18px rgba(126, 237, 87, 0.8);
    transform-origin: left center;
    transform: scaleX(0) rotate(-3deg);
    animation: gwStrike 7s cubic-bezier(.7, 0, .3, 1) infinite;
  }
  .gwb-swap.is-animated .gwb-swap-new { display: inline-block; animation: gwNew 7s cubic-bezier(.34, 1.4, .64, 1) infinite; }
}
/* 0–34% WEDNESDAY · struck at ~30% · drops away · WEEK slams in at 40–48% · hold · reset */
@keyframes gwSlot {
  0%, 34% { width: 4.44em; }
  44%, 94% { width: 2.03em; }
  100% { width: 4.44em; }
}
@keyframes gwOld {
  0%, 3% { opacity: 0; transform: translateY(-40%); }
  8%, 34% { opacity: 1; transform: none; }
  42%, 100% { opacity: 0; transform: translateY(70%) rotate(4deg); }
}
@keyframes gwStrike {
  0%, 20% { transform: scaleX(0) rotate(-3deg); }
  30%, 34% { transform: scaleX(1) rotate(-3deg); }
  42%, 100% { transform: scaleX(1) rotate(-3deg); opacity: 0; }
}
@keyframes gwNew {
  0%, 40% { opacity: 0; transform: scale(1.6); filter: blur(6px); }
  48%, 92% { opacity: 1; transform: none; filter: none; }
  97%, 100% { opacity: 0; transform: translateY(-30%); }
}

/* ── Full-width (edge-to-edge) banner ──────────────────────────────────────
   Content lines up with the 1420px site container; art fills the right. */
.gwb--full {
  min-height: clamp(420px, 34vw, 580px);
  border-radius: 0;
  border-width: 1px 0;
  border-color: rgba(126, 237, 87, 0.28);
  box-shadow: none;
  background:
    radial-gradient(ellipse 40% 80% at 15% 60%, rgba(255, 63, 164, 0.14), transparent 70%),
    #050505;
}
.gwb--full .gwb-art {
  width: min(64%, 1080px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
}
.gwb--full .gwb-content {
  width: min(50%, 680px);
  margin-left: max(0px, calc((100% - 1420px) / 2));
  padding-left: clamp(20px, 4vw, 48px);
}

/* ── Homepage feature section (boxed banner) ───────────────────────────── */
.gw-home { padding: clamp(40px, 6vw, 80px) 0; background: #000; }
.gw-home-inner { max-width: 1420px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.gw-home .gwb { min-height: clamp(400px, 36vw, 540px); }

/* ── Mobile: art on top, content below ─────────────────────────────────── */
@media (max-width: 767px) {
  .gwb { flex-direction: column; align-items: stretch; min-height: 0; border-radius: 18px; }
  .gwb-art {
    position: relative;
    inset: auto;
    width: 100%;
    height: 220px;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  }
  .gwb-content { width: 100%; margin-top: -54px; padding: 0 16px 26px; }
  .gwb-lockup { font-size: clamp(42px, 13vw, 60px); font-size: min(clamp(42px, 13vw, 60px), 12.4cqi); }
  .gwb-lockup--sm { font-size: 26px; }
  .gwb-title { font-size: clamp(32px, 10vw, 46px); }
  .gwb-art.is-tall {
    width: 100%;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  }
  .gwb-date { font-size: clamp(18px, 6vw, 26px); padding: 7px 14px 5px; }
  .gwb-cta { width: 100%; }
  .gwb-doodle--heart { top: 18px; left: auto; right: 18px; }
  .gwb-doodle--crown { top: 14px; left: 14px; width: 42px; }
  .gwb-doodle--peace { display: none; }
  .gwb--full { min-height: 0; border-radius: 0; }
  .gwb--full .gwb-art { width: 100%; }
  .gwb--full .gwb-content { width: 100%; margin-left: 0; padding: 0 16px 28px; }
}
.gwb-gold { color: var(--gw-gold); }
