/*
Theme Name: Shawshank
Template: ollie
Description: FSE child theme for The Shawshank Redemption Australian production site. Prestige-theatre tone: prison grey/dark-blue scale with a warm gold spotlight accent.
Version: 1.1.5
Text Domain: shawshank
*/

/*
 * Convenience aliases pointing at WP preset vars — the source of truth is always
 * theme.json; these just keep the CSS below readable against the design spec.
 */
:root {
  --ss-ink:      var(--wp--preset--color--ink);
  --ss-charcoal: var(--wp--preset--color--charcoal);
  --ss-slate:    var(--wp--preset--color--slate);
  --ss-slate-2:  var(--wp--preset--color--slate-2);
  --ss-fog:      var(--wp--preset--color--fog);
  --ss-paper:    var(--wp--preset--color--paper);
  --ss-gold:     var(--wp--preset--color--gold);
  --ss-gold-dim: var(--wp--preset--color--gold-dim);
}

/* ─── Global ──────────────────────────────────────────────────── */

body {
  background-color: var(--ss-ink);
}

/* Prevent Ollie's white flash on load */
html {
  background: var(--ss-ink);
}

/* ─── Site header ─────────────────────────────────────────────── */

/* Header layout (background, padding, widths) is owned by the Site
   Editor part: an ink wrapper group around an alignwide .site-header
   flex row. CSS only pins the whole part to the top on scroll —
   remove this rule for a fully static header. */
.wp-site-blocks > header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
}

/* Keep in-page anchor targets (#tour-dates, #waitlist…) clear of the
   sticky header. */
.wp-site-blocks [id] {
  scroll-margin-block-start: 100px;
}

.footer-logomark {
  height: 40px;
  width: auto;
  display: block;
  margin-bottom: var(--wp--preset--spacing--30, 16px);
}

.site-nav a {
  font-family: var(--wp--preset--font-family--body);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ss-paper);
  opacity: 0.8;
  text-decoration: none;
  transition: opacity 0.15s;
}

.site-nav a:hover { opacity: 1; color: var(--ss-paper); }

/* The root block-gap leaves a 24px strip between the header bar and pages
   that open with a full-bleed section — collapse it just for those pages.
   Text pages keep the default breathing room below the header. */
.wp-site-blocks > .wp-block-post-content:has(> .alignfull:first-child) {
  margin-block-start: 0;
}

/* ─── Cinematic Spotlight cover (block style; .ss-hero = legacy alias) ── */
/* Opt-in via the "Cinematic Spotlight" style on any Cover block.
   Plain covers remain standard WordPress covers. */

.wp-block-cover.is-style-cinematic,
.wp-block-cover.ss-hero {
  position: relative;
  min-height: 96vh;
  overflow: hidden;
  perspective: 1600px;
  --mx: 50%;
  --my: 42%;
}

/* Spotlight + legibility gradient overlay */
.wp-block-cover.is-style-cinematic::before,
.wp-block-cover.ss-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 1100px 850px at var(--mx) var(--my),
      rgba(217,154,63,0.38) 0%,
      rgba(217,154,63,0.12) 40%,
      transparent 62%),
    linear-gradient(180deg,
      rgba(5,7,9,0.35) 0%,
      rgba(5,7,9,0.12) 40%,
      rgba(5,7,9,0.55) 78%,
      rgba(5,7,9,0.85) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Vignette + floor warm-glow pool */
.wp-block-cover.is-style-cinematic::after,
.wp-block-cover.ss-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 660px 190px at var(--mx) 100%,
      rgba(217,154,63,0.45) 0%,
      transparent 74%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 100%);
  box-shadow: inset 0 0 260px 80px #05070a;
  pointer-events: none;
  z-index: 2;
}

.wp-block-cover.is-style-cinematic .wp-block-cover__inner-container,
.wp-block-cover.ss-hero .wp-block-cover__inner-container {
  position: relative;
  /* z-index:auto (NOT a number) so the container doesn't form a stacking
     context — that would isolate the marquee heading's mix-blend-mode from
     the photo backdrop. Core pins this to z-index:1 with a huge :not(:has())
     selector, hence the !important. Children are elevated individually below. */
  z-index: auto !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--wp--preset--spacing--40);
}

/* The flex column above centres children at their natural width, which
   defeats the editor's Wide/Full alignment — let those children stretch.
   Wide stays capped by the cover's constrained max-width rule. */
.wp-block-cover.is-style-cinematic .wp-block-cover__inner-container > .alignwide,
.wp-block-cover.is-style-cinematic .wp-block-cover__inner-container > .alignfull,
.wp-block-cover.ss-hero .wp-block-cover__inner-container > .alignwide,
.wp-block-cover.ss-hero .wp-block-cover__inner-container > .alignfull {
  align-self: stretch;
}

/* Each inner block sits above the spotlight overlays (z-index 2) on its own */
.wp-block-cover.is-style-cinematic .wp-block-cover__inner-container > *,
.wp-block-cover.ss-hero .wp-block-cover__inner-container > * {
  position: relative;
  z-index: 3;
}

/* Inner blocks sit above the gradients */
.wp-block-cover.is-style-cinematic .wp-block-cover__background,
.wp-block-cover.ss-hero .wp-block-cover__background {
  z-index: 0;
}

/* Restore the theme's gold heading default inside cinematic covers only —
   core cover CSS forces white on headings without an explicit colour.
   An editor-picked colour (has-text-color) always wins. */
.wp-block-cover.is-style-cinematic :is(h1, h2, h3, h4, h5, h6):not(.has-text-color),
.wp-block-cover.ss-hero :is(h1, h2, h3, h4, h5, h6):not(.has-text-color) {
  color: var(--ss-gold);
}

/* ─── Marquee Tilt heading (block style) ──────────────────────── */
/* Works on any heading level at any size/colour — the editor keeps
   full control of those; this only adds the projected-tilt transform.
   hero-tilt.js drives the transform on mousemove inside a cinematic cover. */

.is-style-marquee {
  line-height: 0.94;
  max-width: 1100px;
  margin-inline: auto;
  /* "screen" lets the photo + tracked spotlight glow through the glyphs —
     projected-light look. Needs an un-isolated backdrop: the cinematic
     cover's inner container must stay z-index:auto (see rule above). */
  mix-blend-mode: screen;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.12s ease-out;
  transform: perspective(1400px) rotateX(5deg) rotateY(-7deg) skewX(-2deg);
}

@media (prefers-reduced-motion: reduce) {
  .is-style-marquee { transform: none; transition: none; }
}

.ss-hero-kicker {
  font-family: var(--wp--preset--font-family--body);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ss-gold);
  margin: 0;
}

.ss-hero-attribution {
  font-family: var(--wp--preset--font-family--body);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ss-fog);
  margin: 0;
}

/* ─── Button styles ───────────────────────────────────────────── */
/* Default (fill)   = primary: gold bg / ink text — from theme.json.
   Outline          = secondary: paper text, fog border, fills paper on hover.
   Outline Gold     = ticket-row style: gold text/border, fills gold on hover. */

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--ss-paper);
  border: 1px solid var(--ss-fog);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--ss-paper);
  border-color: var(--ss-paper);
  color: var(--ss-ink);
}

.wp-block-button.is-style-outline-gold .wp-block-button__link {
  background: transparent;
  color: var(--ss-gold);
  border: 1px solid var(--ss-gold);
}
.wp-block-button.is-style-outline-gold .wp-block-button__link:hover {
  background: var(--ss-gold);
  border-color: var(--ss-gold);
  color: var(--ss-ink);
}

/* ─── Section eyebrow (small gold label above sections) ──────── */

.ss-section-eyebrow {
  font-family: var(--wp--preset--font-family--body);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ss-gold) !important;
  margin-block-end: var(--wp--preset--spacing--50);
}

/* ─── Reviews grid (Group with class ss-reviews) ──────────────── */

.ss-reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ss-slate-2);
}

.ss-reviews > * {
  background: var(--ss-charcoal);
  padding: 44px 40px;
}

.ss-stars {
  color: var(--ss-gold);
  letter-spacing: 3px;
  font-size: 18px;
  display: block;
  margin-block-end: var(--wp--preset--spacing--30);
}

.ss-reviews blockquote,
.review-card__quote {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 22px;
  line-height: 1.4;
  color: var(--ss-paper);
  margin: 0 0 var(--wp--preset--spacing--30);
  padding: 0;
  border: none;
}

.ss-reviews cite,
.review-card__cite {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ss-fog);
  font-style: normal;
}

@media (max-width: 900px) {
  .ss-reviews { grid-template-columns: 1fr; }
}

/* ─── Review block (carousel layout lives in blocks/review-grid) ─ */

.review-card {
  background: var(--ss-charcoal);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
}

/* ─── Synopsis section ────────────────────────────────────────── */

.ss-synopsis {
  padding-block: var(--wp--preset--spacing--60);
}

.ss-synopsis .ss-eyebrow {
  font-family: var(--wp--preset--font-family--body);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ss-gold);
  display: block;
  margin-block-end: var(--wp--preset--spacing--30);
}

.ss-synopsis p {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 19px;
  line-height: 1.7;
  color: #d6d2c9;
}

/* ─── Tour dates list ─────────────────────────────────────────── */

.ss-section-heading {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--x-large);
  color: var(--ss-paper);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-block-end: var(--wp--preset--spacing--50);
}

.ss-dates-list,
.block-location-list {
  display: flex;
  flex-direction: column;
}

.ss-date-row,
.location-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  align-items: center;
  gap: 24px;
  padding-block: 26px;
  border-bottom: 1px solid var(--ss-slate-2);
}

.ss-date-row:first-child,
.location-row:first-child {
  border-top: 1px solid var(--ss-slate-2);
}

.ss-city,
.location-row__city {
  font-family: var(--wp--preset--font-family--display);
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ss-paper);
}

.ss-venue,
.location-row__venue {
  color: var(--ss-fog);
  font-size: 14px;
}

.location-row__dates {
  color: var(--ss-fog);
  font-size: 14px;
  font-style: italic;
}

.location-row__status {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ss-fog);
}

/* Outlined gold ticket button */
.location-row .wp-block-button__link,
.location-row__ticket {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--ss-gold);
  background: transparent;
  color: var(--ss-gold);
  font-family: var(--wp--preset--font-family--body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.location-row .wp-block-button__link:hover,
.location-row__ticket:hover {
  background: var(--ss-gold);
  color: var(--ss-ink);
}

.location-row__sold-out {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ss-fog);
  opacity: 0.5;
}

@media (max-width: 900px) {
  .ss-date-row,
  .location-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .location-row__dates,
  .ss-venue { grid-column: 1 / 3; }
}

/* ─── CTA band ────────────────────────────────────────────────── */

.ss-cta-band {
  background: var(--wp--preset--gradient--cta-band);
  text-align: center;
  padding: 110px 48px;
  /* Cancel the root block-gap margin so the band sits flush against
     the section above it (other sections zero this in block attrs). */
  margin-block-start: 0;
}

.ss-cta-band h2 {
  color: var(--ss-paper);
}

/* ─── Gravity Forms (dark theme) ──────────────────────────────── */

.gform_wrapper .gfield_label {
  color: var(--ss-paper);
  font-family: var(--wp--preset--font-family--body);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gform_wrapper .gfield_required {
  color: var(--ss-gold) !important; /* GF's own theme CSS out-cascades us here */
}

.gform_wrapper input[type='text'],
.gform_wrapper input[type='email'],
.gform_wrapper input[type='tel'],
.gform_wrapper.gravity-theme .gfield select,
.gform_wrapper select,
.gform_wrapper textarea {
  background: var(--ss-charcoal);
  border: 1px solid var(--ss-slate-2);
  border-radius: 2px;
  color: var(--ss-paper);
  padding: 12px 14px;
  font-family: var(--wp--preset--font-family--body);
  font-size: 15px;
  width: 100%;
}

.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus {
  outline: none;
  border-color: var(--ss-gold);
}

.gform_wrapper .gform_button {
  background: var(--ss-gold);
  color: var(--ss-ink);
  border: none;
  border-radius: 2px;
  padding: 16px 32px;
  font-family: var(--wp--preset--font-family--body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}

.gform_wrapper .gform_button:hover {
  background: var(--ss-paper);
}

.gform_wrapper .gform_validation_errors,
.gform_wrapper .gfield_validation_message {
  background: transparent;
  border: 1px solid #a4433b;
  color: #e08b84;
  border-radius: 2px;
}

.gform_confirmation_message {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 19px;
  color: var(--ss-paper);
  border-left: 3px solid var(--ss-gold);
  padding-left: 20px;
}

/* Waitlist consent checkbox (Kit / ConvertKit opt-in) */
.gform_wrapper .gfield--type-consent .gfield_consent_label {
  color: var(--ss-fog);
  font-size: 14px;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
}

.gform_wrapper .gfield--type-consent input[type='checkbox'] {
  accent-color: var(--ss-gold);
  width: 18px;
  height: 18px;
}

/* Waitlist section shell — narrow, centred form */
.ss-waitlist .gform_wrapper {
  max-width: 560px;
  margin-inline: auto;
}

/* ─── Site footer ─────────────────────────────────────────────── */

.site-footer {
  background: var(--ss-charcoal);
  padding-block: var(--wp--preset--spacing--60);
  border-top: 1px solid var(--ss-slate-2);
}

.site-footer p,
.site-footer li,
.site-footer a {
  font-size: 13px;
  color: var(--ss-fog);
}

.site-footer a:hover { color: var(--ss-paper); }

/* ─── Inherited block overrides ───────────────────────────────── */

/* Push content below fixed header */
.wp-site-blocks > :first-child:not(.site-header) {
  padding-block-start: 0;
}
