/*
Theme Name: Protect & Build Nova Scotia
Theme URI: https://pcpartyns.ca/
Author: ONE Digital
Description: A focused one-page campaign theme for the Nova Scotia PC Party, integrated with Movement forms.
Version: 2.2.0
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: protect-build-ns
*/

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --campaign-blue: #1764c5;
  --campaign-blue-deep: #0d4fa8;
  --campaign-blue-soft: #2c74cf;
  --campaign-yellow: #ffd83d;
  --campaign-yellow-soft: #ffe675;
  --ink: #0a254b;
  --muted: #66758a;
  --paper: #ffffff;
  --panel: #f4f7fc;
  --line: #d8e0ec;
  --shadow: 0 26px 70px rgba(3, 38, 85, 0.24);
  --container: min(1280px, calc(100% - 64px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--campaign-blue);
  font-family: "Plus Jakarta Sans", "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; }
h1, h2, h3, p { margin-top: 0; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.site-header { position: relative; z-index: 10; background: var(--campaign-blue); }
.header-inner {
  width: var(--container);
  min-height: 112px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.site-logo { width: 158px; }
.site-logo img { width: 100%; filter: brightness(0) invert(1); }

.campaign-main { min-height: calc(100vh - 112px); }
.campaign-hero {
  position: relative;
  min-height: calc(100vh - 112px);
  padding: clamp(58px, 7vw, 98px) 0 clamp(70px, 8vw, 112px);
  overflow: hidden;
  background: var(--campaign-blue);
}
.campaign-shell {
  position: relative;
  z-index: 1;
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(390px, 0.72fr);
  gap: clamp(46px, 7vw, 94px);
  align-items: start;
}
.campaign-content { min-width: 0; }
.campaign-content h1 {
  max-width: 810px;
  margin: 0 0 24px;
  color: #fff;
  font-size: clamp(3rem, 5.7vw, 5.85rem);
  font-weight: 800;
  letter-spacing: -0.062em;
  line-height: 0.98;
}
.campaign-content h1 span { color: var(--campaign-yellow); }
.campaign-intro {
  max-width: 760px;
  margin-bottom: 38px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
}

.plan-topics { display: grid; gap: 14px; }
.plan-topic {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.plan-topic[open] {
  border-color: rgba(255, 216, 61, 0.5);
  background: rgba(255, 255, 255, 0.1);
}
.plan-topic summary {
  min-height: 102px;
  display: grid;
  grid-template-columns: 88px 1fr 32px;
  gap: 18px;
  align-items: center;
  padding: 13px 18px 13px 0;
  color: #fff;
  cursor: pointer;
  list-style: none;
}
.plan-topic summary::-webkit-details-marker { display: none; }
.plan-topic summary:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.plan-orb {
  width: 84px;
  height: 84px;
  margin-left: -10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--campaign-yellow);
  color: var(--ink);
  font-size: 2.1rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  animation: bubble-float 4.6s ease-in-out infinite;
  transform-origin: center;
}
.plan-topic:nth-child(2) .plan-orb { animation-delay: -1.55s; animation-duration: 5.2s; }
.plan-topic:nth-child(3) .plan-orb { animation-delay: -3.1s; animation-duration: 4.9s; }
.plan-topic[open] .plan-orb {
  animation-play-state: paused;
  background: var(--campaign-yellow-soft);
  transform: translateY(-2px) scale(1.035);
}
@keyframes bubble-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  45% { transform: translate3d(3px, -7px, 0) rotate(1.5deg); }
  70% { transform: translate3d(-2px, -3px, 0) rotate(0deg); }
}
.plan-summary-copy { min-width: 0; }
.plan-summary-copy strong {
  display: block;
  margin-bottom: 5px;
  color: var(--campaign-yellow);
  font-size: clamp(1rem, 1.4vw, 1.28rem);
  font-weight: 800;
  line-height: 1.2;
}
.plan-summary-copy small {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  line-height: 1.4;
}
.plan-toggle { position: relative; width: 27px; height: 27px; border-radius: 50%; background: var(--campaign-yellow); }
.plan-toggle::before,
.plan-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.plan-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.plan-topic[open] .plan-toggle::after { display: none; }
.plan-detail {
  margin: 0 18px 0 122px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding: 20px 4px 24px;
  color: #fff;
  animation: detail-in 220ms ease-out;
}
@keyframes detail-in {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}
.plan-detail h2 { margin-bottom: 14px; color: var(--campaign-yellow); font-size: clamp(1.08rem, 1.25vw, 1.22rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; }
.plan-detail ul {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  list-style: none;
}
.plan-detail li {
  position: relative;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.88rem;
  line-height: 1.55;
}
.plan-detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--campaign-yellow);
}
.plan-detail strong { color: #fff; }

.form-card {
  position: sticky;
  top: 28px;
  border-radius: 10px;
  padding: clamp(28px, 3.2vw, 42px);
  background: #fff;
  box-shadow: var(--shadow);
}
.form-card h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.form-card h2 span { color: var(--campaign-blue); }
.form-card > p { margin-bottom: 25px; color: var(--muted); font-size: 0.92rem; }
.movement-cta-form .form-grid { display: grid; grid-template-columns: 1fr; gap: 13px; }
.movement-cta-form .field-full { grid-column: auto; }
.movement-cta-form label {
  display: block;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}
.movement-cta-form .form-control {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.movement-cta-form .form-control:focus { border-color: var(--campaign-blue); box-shadow: 0 0 0 4px rgba(23, 100, 197, 0.14); }
.movement-cta-form .btn {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  background: var(--campaign-yellow);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.movement-cta-form .btn:hover {
  transform: translateY(-2px);
  background: var(--campaign-yellow-soft);
  box-shadow: 0 12px 25px rgba(10, 37, 75, 0.16);
}
.movement-cta-form .btn:focus-visible { outline: 3px solid var(--campaign-blue); outline-offset: 3px; }
.form-consent {
  display: flex !important;
  gap: 9px;
  align-items: flex-start;
  margin: 1px 0 4px !important;
  color: var(--muted) !important;
  font-size: 0.7rem !important;
  line-height: 1.4;
}
.form-consent input { margin-top: 3px; accent-color: var(--campaign-blue); }
.movement-msg-alert {
  margin-bottom: 15px;
  border-radius: 6px;
  padding: 12px 14px;
  background: #edf4ff;
  color: var(--campaign-blue-deep);
  font-weight: 700;
}
.movement-msg-alert.alert-danger { background: #fff0f0; color: #8c1d28; }
.movement-msg-alert.d-none { display: none; }
.plugin-notice { border: 1px dashed var(--line); border-radius: 6px; padding: 18px; color: var(--muted); }

.site-footer { padding: 20px 0; background: #0c4b9f; color: #fff; }
.footer-inner { width: var(--container); margin: 0 auto; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
}
.standard-content {
  width: min(860px, calc(100% - 40px));
  min-height: 70vh;
  margin: 0 auto;
  padding: 90px 0;
  color: #fff;
}
.standard-content h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }

@media (max-width: 1040px) {
  :root { --container: min(100% - 44px, 900px); }
  .campaign-shell { grid-template-columns: 1fr; }
  .campaign-content h1 { max-width: 860px; }
  .form-card { position: static; max-width: 680px; }
}

@media (min-width: 1041px) {
  .plan-topic:nth-child(2) { margin-left: 22px; margin-right: -22px; }
  .plan-topic:nth-child(3) { margin-left: 44px; margin-right: -44px; }
}

@media (max-width: 680px) {
  :root { --container: calc(100% - 30px); }
  .header-inner { min-height: 82px; }
  .site-logo { width: 126px; }
  .campaign-main { min-height: calc(100vh - 82px); }
  .campaign-hero { min-height: calc(100vh - 82px); padding: 46px 0 68px; }
  .campaign-shell { gap: 34px; }
  .campaign-content h1 { font-size: clamp(2.65rem, 13vw, 4.2rem); }
  .campaign-intro { margin-bottom: 30px; font-size: 0.98rem; }
  .plan-topic summary {
    min-height: 94px;
    grid-template-columns: 68px 1fr 25px;
    gap: 12px;
    padding-right: 13px;
  }
  .plan-orb { width: 68px; height: 68px; margin-left: -7px; font-size: 1.65rem; }
  .plan-summary-copy strong { font-size: 0.96rem; }
  .plan-summary-copy small { font-size: 0.72rem; }
  .plan-toggle { width: 24px; height: 24px; }
  .plan-detail { margin: 0 14px; padding: 18px 2px 20px; }
  .plan-detail ul { grid-template-columns: 1fr; }
  .form-card { padding: 27px 22px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
