/*
Theme Name: ICEOUTOF.CA Campaign Theme
Theme URI: https://iceoutof.ca/
Author: OpenAI
Author URI: https://openai.com/
Description: Custom single-page campaign theme for E-Petition 7319 with sticky header/footer, petition countdown, blog support, and signature counter.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: iceoutof
*/

:root {
  --bg: #080808;
  --panel: rgba(16, 16, 16, 0.88);
  --panel-2: rgba(28, 28, 28, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f4f4;
  --muted: #c9c9c9;
  --red: #c31c1c;
  --red-dark: #7d1010;
  --white: #f6f6f6;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
  --footer-h: 92px;
  --content-max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(194, 24, 24, 0.18), transparent 30%),
    linear-gradient(180deg, #111 0%, #060606 100%);
  background-color: var(--bg);
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { line-height: 1.6; }

.site-wrap { min-height: 100vh; }
.container {
  width: min(calc(100% - 40px), var(--content-max));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(18,18,18,0.98), rgba(12,12,12,0.96));
  backdrop-filter: blur(8px);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.18), transparent 40%),
    linear-gradient(145deg, #1a1a1a, #090909);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.03), 0 4px 12px rgba(0,0,0,.4);
}
.brand-mark span {
  color: var(--red);
  font-size: 26px;
  line-height: 1;
}
.brand-text {
  min-width: 0;
}
.brand-title {
  font-weight: 900;
  font-size: clamp(1.3rem, 2vw, 2.3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand-tagline {
  color: #bbbbbb;
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav li { position: relative; }
.primary-nav a {
  text-transform: uppercase;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ececec;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  color: #fff;
}

.menu-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 8px 10px;
}

.btn,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 14px 24px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover { transform: translateY(-1px); }
.btn-primary {
  color: white;
  background: linear-gradient(180deg, #d72a2a, #8e1414);
  box-shadow: 0 8px 18px rgba(142,20,20,.35);
}
.btn-secondary {
  color: white;
  background: linear-gradient(180deg, #343434, #1e1e1e);
  border: 1px solid rgba(255,255,255,.12);
}
.btn-share {
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(180deg, #b41f1f, #7d1111);
}
.btn-outline {
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  background: rgba(255,255,255,.03);
}

.site-main {
  padding-top: var(--header-h);
  padding-bottom: calc(var(--footer-h) + 28px);
}

.hero {
  position: relative;
  min-height: min(85vh, 880px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.40) 25%, rgba(0,0,0,0.55)),
    url('assets/img/hero-flag.jpg') center/cover no-repeat;
  filter: saturate(1.06) contrast(1.05);
  transform: scale(1.02);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(123, 0, 0, 0.32), transparent 26%, transparent 74%, rgba(123, 0, 0, 0.32)),
    radial-gradient(circle at center, transparent 0, rgba(0,0,0,.15) 45%, rgba(0,0,0,.45) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 40px), 1200px);
  margin: 0 auto;
  text-align: center;
  padding: 80px 0 110px;
}
.hero-kicker {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2vw, 2.5rem);
  letter-spacing: 0.04em;
  font-weight: 900;
  text-transform: uppercase;
}
.hero-title {
  margin: 0;
  font-size: clamp(3.6rem, 8vw, 8rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 4px 18px rgba(0,0,0,.45);
}
.hero-title .accent { color: #cb2323; }
.hero-subtitle {
  max-width: 980px;
  margin: 18px auto 0;
  font-size: clamp(2rem, 3.7vw, 4rem);
  line-height: 1.02;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.hero-copy {
  max-width: 850px;
  margin: 22px auto 0;
  color: #ececec;
  font-size: 1.1rem;
}

.section {
  position: relative;
  padding: 70px 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    radial-gradient(circle at top, rgba(183, 17, 17, 0.10), transparent 28%);
}
.section + .section {
  border-top: 1px solid rgba(255,255,255,.06);
}
.section-title {
  text-align: center;
  margin: 0 0 34px;
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.section-intro {
  max-width: 900px;
  margin: 0 auto 34px;
  color: #ddd;
  text-align: center;
}

.demands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.demand-card,
.post-card,
.panel {
  background: linear-gradient(180deg, rgba(26,26,26,.92), rgba(14,14,14,.94));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}
.demand-card {
  padding: 24px 22px 22px;
  min-height: 270px;
}
.demand-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 14px;
  background: radial-gradient(circle at 30% 30%, #d02727, #410707);
  border: 2px solid rgba(255,255,255,.08);
}
.demand-card h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.15;
  text-transform: uppercase;
}
.demand-card p { margin: 0; color: #d8d8d8; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.post-card {
  overflow: hidden;
}
.post-card .thumb {
  aspect-ratio: 16 / 9;
  background: url('assets/img/blog-flag.jpg') center/cover no-repeat;
}
.post-card .entry {
  padding: 18px;
}
.post-meta {
  color: #b7b7b7;
  font-size: .88rem;
  margin-bottom: 10px;
}
.post-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}
.read-more {
  margin-top: 8px;
  display: inline-flex;
  padding: 10px 14px;
  font-size: .82rem;
}

.about-panel,
.share-panel,
.blog-listing,
.content-panel {
  padding: 34px;
}
.about-panel {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 34px;
  align-items: center;
}
.about-image {
  min-height: 340px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.55)),
    url('assets/img/card-flag.jpg') center/cover no-repeat;
  border: 1px solid rgba(255,255,255,0.08);
}
.about-panel h2,
.share-panel h2,
.content-panel h1,
.content-panel h2 { margin-top: 0; }

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.social-link {
  padding: 12px 16px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 700;
}

.site-footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  height: var(--footer-h);
  border-top: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(14,14,14,.98), rgba(8,8,8,.99));
  box-shadow: 0 -10px 28px rgba(0,0,0,.35);
}
.footer-bar-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1.25fr auto auto 1.25fr;
  gap: 18px;
  align-items: center;
}
.footer-block {
  min-width: 0;
}
.metric-label,
.countdown-label {
  color: #d1d1d1;
  font-size: .92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.metric-value {
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  font-weight: 900;
  margin-top: 4px;
}
.footer-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.countdown {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}
.countdown-group {
  min-width: 68px;
  padding: 8px 10px;
  text-align: center;
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.countdown-value {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 900;
}
.countdown-text {
  display: block;
  margin-top: 4px;
  font-size: .74rem;
  color: #cfcfcf;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.deadline-line {
  color: #e9e9e9;
  font-weight: 700;
  margin-top: 4px;
}

.entry-content,
.archive-grid { color: #e8e8e8; }
.content-shell {
  padding: 54px 0;
}
.content-panel,
.blog-listing {
  background: linear-gradient(180deg, rgba(22,22,22,.96), rgba(12,12,12,.96));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.post-navigation,
.pagination,
.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: #fff;
  padding: 14px 16px;
}
textarea { min-height: 180px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1180px) {
  .demands-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: 1fr; }
  .about-panel { grid-template-columns: 1fr; }
  .footer-bar-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 0;
    height: auto;
  }
  .site-footer-bar {
    height: auto;
  }
  .site-main {
    padding-bottom: 220px;
  }
  .countdown { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 920px) {
  .primary-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--header-h) + 8px);
    display: none;
    padding: 20px;
    border-radius: 10px;
    background: rgba(15,15,15,0.98);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .menu-toggle { display: inline-flex; }
  .header-actions { display: flex; gap: 10px; align-items: center; }
  .hero-title { font-size: clamp(3rem, 12vw, 6rem); }
  .hero-subtitle { font-size: clamp(1.7rem, 6vw, 3rem); }
  .archive-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 76px; }
  .container { width: min(calc(100% - 24px), var(--content-max)); }
  .brand-title { font-size: 1.15rem; }
  .hero-inner { padding: 60px 0 90px; }
  .demands-grid { grid-template-columns: 1fr; }
  .footer-actions { flex-direction: column; align-items: stretch; }
  .countdown-group { min-width: 58px; }
}


/* Header fix: full logo image on left, centered menu, single share button on far right */
.site-header {
  overflow: visible;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand.brand-image-only {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 430px;
  flex: 0 0 auto;
}
.brand-logo-image {
  display: block;
  width: auto;
  max-width: min(380px, 30vw);
  max-height: 52px;
  object-fit: contain;
}
.header-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
}
.primary-nav {
  justify-self: center;
}
.primary-nav ul {
  justify-content: center;
}
.header-share {
  justify-self: end;
  white-space: nowrap;
}
.primary-nav a[href="#share"] {
  display: none;
}
@media (max-width: 1080px) {
  .brand-logo-image {
    max-width: min(300px, 28vw);
    max-height: 46px;
  }
  .primary-nav ul {
    gap: 22px;
  }
}
@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }
  .brand.brand-image-only {
    max-width: 250px;
  }
  .brand-logo-image {
    max-width: 100%;
    max-height: 40px;
  }
  .header-actions {
    grid-template-columns: auto auto;
    gap: 12px;
  }
  .primary-nav {
    position: absolute;
    top: calc(var(--header-h) - 4px);
    left: 20px;
    right: 20px;
  }
}
