/* ============================================================
   KW LA JOLLA EVENTS — brand styles v2
   Palette: black / charcoal / beige / deep red / tan (mood board)
   Type: Inter, thin weights, large & legible
   ============================================================ */

:root {
  --black: #121212;
  --charcoal: #2b2a28;
  --gray: #4a4a4a;
  --beige: #d9d3c9;
  --beige-light: #eeebe5;
  --white: #ffffff;
  --red: #7b1416;
  --tan: #b58963;
  --tan-deep: #96714f;
  --max: 1180px;
}

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

body {
  font-family: "Inter", -apple-system, sans-serif;
  background: var(--white);
  color: var(--black);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- header ---------- */
header {
  padding: 26px 0 20px;
  border-bottom: 1px solid var(--beige);
  background: var(--white);
}
.brand { display: flex; justify-content: center; }
.brand .logo {
  width: 300px; height: 104px;
  object-fit: cover;
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 76px 0 60px;
  background: var(--beige-light);
  border-bottom: 1px solid var(--beige);
}
.hero .kicker {
  font-size: 12px; letter-spacing: .42em; text-transform: uppercase;
  font-weight: 500; color: var(--tan-deep); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 100;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero .rule { width: 56px; height: 2px; background: var(--red); margin: 26px auto; }
.hero p {
  font-size: 19px; font-weight: 300; color: var(--gray);
  max-width: 560px; margin: 0 auto; letter-spacing: .02em;
}

/* ---------- filters ---------- */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 44px 0;
}
.chip {
  border: 1px solid var(--beige); background: var(--white);
  padding: 9px 22px; font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 400; cursor: pointer;
  font-family: inherit; transition: all .2s; color: var(--black);
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.active { background: var(--black); color: var(--white); border-color: var(--black); }

/* ---------- month label ---------- */
.month-label {
  font-size: 14px; letter-spacing: .3em; text-transform: uppercase;
  font-weight: 500; color: var(--charcoal);
  margin: 20px 0 24px; display: flex; align-items: center; gap: 18px;
}
.month-label::before { content: ""; width: 26px; height: 2px; background: var(--red); }
.month-label::after { content: ""; flex: 1; height: 1px; background: var(--beige); }

/* ---------- event grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 28px; padding-bottom: 40px;
}
.card {
  border: 1px solid var(--beige);
  background: var(--white);
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(18,18,18,.12); }

.card-visual {
  aspect-ratio: 16/9; position: relative; overflow: hidden;
  background: var(--charcoal);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 20px 22px;
}
.card-visual img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%;
}
/* Portrait flyers letterbox on charcoal instead of cropping */
.card-visual img.portrait { object-fit: contain; object-position: center; }
.card-visual .cat {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  font-weight: 500; color: var(--tan); position: relative;
}
.card-visual .cat::after {
  content: ""; display: block; width: 24px; height: 2px;
  background: var(--red); margin-top: 10px;
}
.card-visual .big-date { position: relative; }
.card-visual .big-date .num { font-size: 58px; font-weight: 100; line-height: 1; color: var(--white); }
.card-visual .big-date .mo {
  font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  font-weight: 400; color: var(--beige);
}
.badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--beige-light); color: var(--black);
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  padding: 5px 10px; font-weight: 500;
}

.badge.price {
  left: 16px; right: auto;
  background: var(--red); color: var(--white);
  font-weight: 500;
}

.rsvp-note {
  font-size: 13.5px; color: var(--gray);
  letter-spacing: .02em; margin: -4px 0 14px;
}

.card-body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 21px; font-weight: 300; line-height: 1.35; letter-spacing: .01em; }
.card-meta { font-size: 13.5px; color: var(--gray); font-weight: 400; letter-spacing: .03em; }
.card-meta div { margin-bottom: 3px; }
.card-body p { font-size: 15px; color: var(--gray); flex: 1; }
.card-link {
  font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 500; color: var(--black);
  border-bottom: 1px solid var(--red); align-self: flex-start;
  padding-bottom: 3px; margin-top: 6px; transition: color .2s;
}
.card:hover .card-link { color: var(--red); }

/* ---------- event page ---------- */
.event-hero {
  background: var(--beige-light);
  padding: 80px 0 64px; text-align: center;
  border-bottom: 1px solid var(--beige);
}
.event-hero.has-image {
  padding: 0; background: var(--charcoal); border-bottom: none;
}
.event-hero img.hero-img {
  width: 100%; max-height: 560px; object-fit: contain;
  margin: 0 auto;
}
.event-hero .cat {
  font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  font-weight: 500; color: var(--red); margin-bottom: 20px;
}
.event-hero h1 {
  font-size: clamp(32px, 5vw, 58px); font-weight: 100;
  letter-spacing: .04em; max-width: 900px; margin: 0 auto;
}
.event-hero .when {
  margin-top: 24px; font-size: 17px; letter-spacing: .06em;
  font-weight: 300; color: var(--gray);
}

/* Event page: 2x2 grid.
   top-left  Details      top-right    Register
   bot-left  Graphic      bot-right    Description                         */
.event-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 56px 56px;
  padding: 64px 0 96px;
  /* default align-items:stretch — top row blocks match height, see below */
}

/* Details and Register are a matched pair: both blocks fill the row height so
   their bottom edges line up. The details block lays out as a column with the
   Add-to-Calendar button pushed to the bottom, so the extra height reads as
   deliberate spacing rather than a gap. */
.cell-details, .cell-register { display: flex; }
.cell-details > .block, .cell-register > .block {
  flex: 1; display: flex; flex-direction: column;
}
.cell-details .cal-btn { margin-top: auto; }
.cell-register .rsvp-frame { flex: 1; display: flex; }
.cell-register .rsvp-frame iframe { flex: 1; }
/* If a cell is missing, its row-mate spans the full width. */
.event-grid.no-register .cell-details { grid-column: 1 / -1; }
.event-grid.no-graphic  .cell-desc    { grid-column: 1 / -1; }

.cell-graphic { align-self: start; }
.cell-graphic .event-graphic {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--beige);
  box-shadow: 0 18px 44px rgba(18,18,18,.10);
}

@media (max-width: 860px) {
  .event-grid { grid-template-columns: 1fr; gap: 40px; }
  /* Stack action-first on a phone: register, details, graphic, description. */
  .event-grid .cell-register { order: 1; }
  .event-grid .cell-details  { order: 2; }
  .event-grid .cell-graphic  { order: 3; }
  .event-grid .cell-desc     { order: 4; }
  .event-grid.no-register .cell-details,
  .event-grid.no-graphic .cell-desc { grid-column: auto; }
}

.event-desc h2, .cell h2 {
  font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 20px; color: var(--black);
  display: flex; align-items: center; gap: 14px;
}
.event-desc h2::before, .cell h2::before {
  content: ""; width: 22px; height: 2px; background: var(--red);
}
.event-desc { font-size: 16.5px; color: #2c2c2c; }
.event-desc p { margin-bottom: 16px; }
.event-desc a { color: var(--red); border-bottom: 1px solid var(--beige); word-break: break-all; }
.event-desc ul, .event-desc ol { margin: 0 0 16px 22px; }
.cell .block {
  border: 1px solid var(--beige); padding: 26px 26px 28px;
  background: var(--white);
}
.cell .block.details-block { background: var(--beige-light); border-color: var(--beige); }
.cell .label {
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--tan-deep); font-weight: 600; margin-bottom: 5px;
}
.cell .value { font-size: 16px; font-weight: 300; margin-bottom: 18px; }
.cell .value:last-child { margin-bottom: 0; }
.cell .value a { color: var(--red); font-weight: 400; }

.btn {
  display: block; text-align: center; background: var(--black); color: var(--white);
  padding: 17px 20px; font-size: 13px; letter-spacing: .24em; text-transform: uppercase;
  font-weight: 500; transition: background .2s; border: none; cursor: pointer; width: 100%;
  font-family: inherit;
}
.btn:hover { background: var(--red); }
.btn.ghost { background: transparent; color: var(--black); border: 1px solid var(--black); }
.btn.ghost:hover { background: var(--black); color: var(--white); }

.rsvp-frame { border: 1px solid var(--beige); }
.rsvp-frame iframe { width: 100%; min-height: 560px; border: none; display: block; }

.back-link {
  display: inline-block; margin: 28px 0 0;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 500;
  color: var(--gray); transition: color .2s;
}
.back-link::before { content: "←  "; }
.back-link:hover { color: var(--red); }

/* ---------- states / footer ---------- */
.state { text-align: center; padding: 80px 20px; color: var(--gray); font-weight: 300; }

footer {
  background: var(--black); color: var(--beige);
  margin-top: 60px; padding: 52px 0 56px; text-align: center;
  font-size: 13px; letter-spacing: .1em; font-weight: 300;
}
footer .foot-rule { width: 40px; height: 2px; background: var(--red); margin: 0 auto 24px; }
footer .foot-brand {
  font-size: 14px; letter-spacing: .35em; font-weight: 500; color: var(--white);
  text-transform: uppercase; margin-bottom: 8px;
}
footer .foot-brand span { font-weight: 200; }

/* ============================================================
   v3 — dynamic landing page (parallax hero + featured)
   ============================================================ */

/* ---------- parallax hero ---------- */
.phero {
  position: relative; height: 86vh; min-height: 540px;
  background: transparent;
  display: flex; align-items: flex-end;
}
/* The photo is FIXED to the viewport — it stays in place while the
   page (featured, all events, footer) scrolls up and over it. */
.phero-media {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 0;
}
.phero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.phero.no-img .phero-media {
  background: linear-gradient(160deg, var(--charcoal) 0%, var(--black) 70%);
}
.phero.no-img .phero-media img { display: none; }
.phero-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 1;
  background: linear-gradient(to top, rgba(18,18,18,.72) 0%, rgba(18,18,18,.25) 45%, rgba(18,18,18,.08) 100%);
  pointer-events: none;
}
.phero-content {
  position: relative; z-index: 2; width: 100%; padding-bottom: 72px; color: var(--white);
}
/* Everything after the hero rides OVER the pinned photo */
.featured, .all-events, footer {
  position: relative; z-index: 3;
}
.featured, .all-events { background: var(--white); }
.featured { box-shadow: 0 -30px 60px rgba(18,18,18,.18); }
footer { margin-top: 0; padding-top: 52px; }
.phero-kicker {
  font-size: 12px; letter-spacing: .42em; text-transform: uppercase;
  font-weight: 500; color: var(--beige); margin-bottom: 20px;
}
.phero h1 {
  font-size: clamp(56px, 9vw, 120px);
  font-weight: 100; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1.02;
}
.phero p {
  margin-top: 22px; font-size: 18px; font-weight: 300;
  color: var(--beige); max-width: 520px; letter-spacing: .02em;
}
.phero-scroll {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 34px; font-size: 12px; letter-spacing: .3em;
  text-transform: uppercase; font-weight: 500; color: var(--white);
  border-bottom: 1px solid var(--tan); padding-bottom: 6px;
  transition: color .2s;
}
.phero-scroll:hover { color: var(--tan); }
.phero-scroll .arr { display: inline-block; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- section heads ---------- */
.sec-head {
  display: flex; align-items: baseline; gap: 24px;
  padding: 84px 0 44px;
}
.sec-title {
  font-size: clamp(34px, 4.6vw, 56px); font-weight: 100;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.sec-sub {
  font-size: 13px; letter-spacing: .24em; text-transform: uppercase;
  font-weight: 400; color: var(--tan-deep);
  flex: 1; display: flex; align-items: center; gap: 18px;
}
.sec-sub::before { content: ""; width: 40px; height: 2px; background: var(--red); flex-shrink: 0; }
.all-events .sec-head { border-top: 1px solid var(--beige); }
/* Solid white must be continuous — margins collapse out of sections and expose
   the fixed hero photo, so contain spacing with padding instead */
.featured { padding-bottom: 48px; }
.all-events { padding-top: 40px; padding-bottom: 40px; }
.all-events .sec-head { margin-top: 0; }

/* ---------- featured cards ---------- */
.feat {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  border: 1px solid var(--beige); background: var(--white);
  margin-bottom: 44px; overflow: hidden;
  transition: box-shadow .3s;
}
.feat:hover { box-shadow: 0 26px 60px rgba(18,18,18,.14); }
.feat.flip { grid-template-columns: 1fr 1.15fr; }
.feat.flip .feat-media { order: 2; }
.feat.flip .feat-body { order: 1; }

.feat-media {
  position: relative; overflow: hidden; min-height: 380px; background: var(--charcoal);
}
.feat-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; will-change: transform;
  transition: filter .4s;
}
.feat:hover .feat-media img { filter: brightness(1.06); }
.feat-media.gen { display: flex; align-items: center; justify-content: center; }

/* Real event graphics: never crop — pane fits the flyer exactly */
.feat-media.has-img {
  display: flex; align-items: center; justify-content: center;
  min-height: 0; background: var(--charcoal);
}
.feat-media.has-img img {
  position: static; inset: auto;
  width: 100%; height: auto; max-height: 660px;
  object-fit: contain;
}
.feat-gen-inner { text-align: center; will-change: transform; }
.feat-gen-inner .num { font-size: 140px; font-weight: 100; line-height: 1; color: var(--white); }
.feat-gen-inner .mo {
  font-size: 15px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--beige); margin-top: 10px;
}
.feat-gen-inner .gcat {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--tan); margin-top: 26px;
}
.feat-gen-inner .gcat::before {
  content: ""; display: block; width: 26px; height: 2px;
  background: var(--red); margin: 0 auto 12px;
}

.feat-body {
  padding: 52px 56px; display: flex; flex-direction: column; gap: 14px;
  justify-content: center; position: relative;
}
.feat-no {
  position: absolute; top: 30px; right: 36px;
  font-size: 15px; font-weight: 200; letter-spacing: .1em; color: var(--beige);
}
.feat-meta {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 500; color: var(--tan-deep);
}
.feat-body h3 {
  font-size: clamp(26px, 2.6vw, 36px); font-weight: 200; line-height: 1.25;
  letter-spacing: .01em; transition: color .2s;
}
.feat:hover .feat-body h3 { color: var(--red); }
.feat-body p { font-size: 15.5px; color: var(--gray); }
.feat-loc { font-size: 13.5px; color: var(--gray); font-weight: 400; letter-spacing: .04em; }

@media (max-width: 820px) {
  .feat, .feat.flip { grid-template-columns: 1fr; }
  .feat.flip .feat-media { order: 0; }
  .feat.flip .feat-body { order: 1; }
  .feat-media { min-height: 240px; }
  .feat-body { padding: 32px 28px; }
  .phero { height: 72vh; }
}

/* ---------- subscribe band ---------- */
.subscribe {
  background: var(--charcoal); color: var(--beige-light);
  padding: 72px 0;
  /* the home hero sits in its own layer; sections after it must match the
     z-index .all-events uses or the photo shows through this band */
  position: relative; z-index: 3;
  /* the home header is fixed and ~151px tall — without this the "Explore"
     anchor lands with the heading tucked underneath it */
  scroll-margin-top: 160px;
}
.sub-inner {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: 56px; align-items: center;
}
.sub-kicker {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--tan); font-weight: 600; margin-bottom: 14px;
}
.sub-title {
  font-size: 34px; font-weight: 200; line-height: 1.25;
  letter-spacing: .01em; margin-bottom: 14px;
}
.sub-copy p {
  font-size: 16px; line-height: 1.7; color: rgba(238,235,229,.78);
  max-width: 54ch;
}
.sub-actions { display: flex; flex-direction: column; gap: 12px; }
.sub-btn { width: 100%; }
.subscribe .btn { background: var(--beige-light); color: var(--black); }
.subscribe .btn:hover { background: var(--tan); color: var(--white); }
.subscribe .btn.ghost {
  background: transparent; color: var(--beige-light);
  border: 1px solid rgba(238,235,229,.45);
}
.subscribe .btn.ghost:hover { background: var(--beige-light); color: var(--black); }
.sub-note {
  font-size: 12.5px; color: rgba(238,235,229,.55);
  letter-spacing: .02em; margin-top: 2px; text-align: center;
}
@media (max-width: 820px) {
  .subscribe { padding: 52px 0; }
  .sub-inner { grid-template-columns: 1fr; gap: 30px; }
  .sub-title { font-size: 27px; }
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(38px);
  transition: opacity .7s cubic-bezier(.16,.84,.32,1), transform .7s cubic-bezier(.16,.84,.32,1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .phero-scroll .arr { animation: none; }
}

/* ---------- home: photo to the very top, frosted translucent header ---------- */
.home header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255,255,255,.35);
  transition: background .3s;
}
.home.scrolled header { background: rgba(255,255,255,.88); }
.home .phero { height: 100vh; min-height: 600px; }
@media (max-width: 820px) { .home .phero { height: 88vh; } }
