/* Conservative Independents Alliance — cia-aus.com
   Palette from the CIA branding: navy #16213E, bronze-gold #C9A24B, off-white #F7F4EC */

:root {
  --navy: #16213E;
  --navy-2: #22305A;
  --gold: #C9A24B;
  --gold-dark: #9C7A2E;
  --paper: #F7F4EC;
  --white: #FFFFFF;
  --ink: #1D2230;
  --muted: #5A6070;
  --line: #E3DDCC;
  --ok-bg: #E8F3EA;  --ok-ink: #245B32;
  --err-bg: #FBEAEA; --err-ink: #8A2323;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Segoe UI", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(22, 33, 62, .08), 0 4px 14px rgba(22, 33, 62, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-underline-offset: 2px; }
a:hover { color: var(--gold-dark); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.25; }
h2 { font-size: 1.9rem; margin: 0 0 1.25rem; }
h2::after { content: ""; display: block; width: 64px; height: 3px; background: var(--gold); margin-top: .6rem; }
h3 { font-size: 1.3rem; margin: 0 0 .6rem; }
p { margin: 0 0 .9rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 .9rem; padding-left: 1.3rem; }
li { margin-bottom: .35rem; }

/* ---------- Preview banner ---------- */
.preview-bar {
  background: var(--gold);
  color: var(--navy);
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
  padding: .4rem 1rem;
}

/* ---------- Header ---------- */
header { background: var(--white); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; }
.brand {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: .9rem 1rem .6rem;
  text-decoration: none; color: var(--navy);
}
.brand img { width: 62px; height: auto; }
.wordmark { font-family: var(--serif); text-align: left; line-height: 1.1; }
.wordmark .l1 { display: block; font-size: 1.45rem; font-weight: 600; letter-spacing: .01em; }
.wordmark .l2 { display: block; font-size: 1.05rem; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-dark); margin-top: .2rem; }

.header-row { position: relative; }
.nav-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem;
  padding: 0 1rem .5rem;
  max-width: 1200px; margin: 0 auto;
}
.tab {
  font: 500 .95rem var(--sans);
  color: var(--navy);
  background: none; border: 0; cursor: pointer;
  padding: .45rem .75rem; border-radius: 6px;
  border-bottom: 2px solid transparent;
}
.tab:hover { background: var(--paper); }
.tab.active { border-bottom-color: var(--gold); font-weight: 700; }
.tab:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.tab.tab-join { background: var(--navy); color: var(--white); margin-left: .4rem; }
.tab.tab-join:hover, .tab.tab-join.active { background: var(--navy-2); border-bottom-color: var(--gold); }

.hamburger { display: none; }

@media (max-width: 860px) {
  .brand { justify-content: flex-start; padding-right: 4rem; }
  .brand img { width: 48px; }
  .wordmark .l1 { font-size: 1.1rem; }
  .wordmark .l2 { font-size: .85rem; }
  .hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; padding: 10px;
    background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  }
  .hamburger span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links { display: none; flex-direction: column; align-items: stretch; padding: .25rem 1rem .75rem; }
  .nav-links.open { display: flex; }
  .tab { text-align: left; padding: .7rem .75rem; }
  .tab.tab-join { margin: .3rem 0 0; text-align: center; }
}

/* ---------- Layout ---------- */
main { max-width: 1000px; margin: 0 auto; padding: 2.25rem 1rem 3rem; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tab-content.active { animation: none; } }

.lead { font-size: 1.12rem; color: var(--muted); max-width: 46rem; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.25rem;
}
.card.accent { border-left: 4px solid var(--gold); }
.card.navy { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.card.navy h3 { color: var(--gold); }
.card.navy a { color: var(--gold); }
.card.navy a.btn.gold, .card.navy a.btn.gold:hover { color: var(--navy); }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin-bottom: 1.25rem; }
.grid .card { margin-bottom: 0; }

.notice {
  background: #FFF8E6; border: 1px solid #EAD9A6; border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.notice strong { color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--paper);
  border-radius: 14px;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 90%;
  background: radial-gradient(ellipse at center, rgba(201, 162, 75, .22), transparent 65%);
  pointer-events: none;
}
.hero h1 { color: var(--white); font-size: 2.4rem; margin: 0 0 .75rem; position: relative; }
.hero .tagline { color: var(--gold); font-family: var(--serif); font-style: italic; font-size: 1.25rem; margin-bottom: 1rem; position: relative; }
.hero p { max-width: 40rem; margin: 0 auto 1.5rem; font-size: 1.1rem; position: relative; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; position: relative; }
@media (max-width: 600px) { .hero { padding: 2.25rem 1.25rem; } .hero h1 { font-size: 1.8rem; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  padding: .7rem 1.4rem; border-radius: 8px; border: 2px solid var(--navy);
  background: var(--navy); color: var(--white);
}
.btn:hover { background: var(--navy-2); color: var(--white); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.gold:hover { background: #D6B25F; color: var(--navy); }
.btn.outline { background: transparent; color: var(--navy); }
.btn.outline:hover { background: var(--paper); }
.hero .btn.outline { color: var(--white); border-color: var(--paper); }
.hero .btn.outline:hover { background: rgba(255,255,255,.1); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Principles ---------- */
.principles { counter-reset: p; list-style: none; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.principles li {
  counter-increment: p; margin: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1rem 1rem 3.2rem; position: relative;
}
.principles li::before {
  content: counter(p); position: absolute; left: 1rem; top: 1rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--navy); color: var(--gold); font: 700 .85rem/1.6rem var(--sans); text-align: center;
}
.principles strong { display: block; color: var(--navy); }
.principles span { font-size: .93rem; color: var(--muted); }

/* ---------- Steps / figures ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: .1rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 2px solid var(--gold);
  color: var(--navy); font: 700 .9rem/1.6rem var(--sans); text-align: center;
}
.figures { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 1rem 0 0; }
.figure { text-align: center; padding: 1.1rem .75rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.figure b { display: block; font: 700 2.2rem var(--serif); color: var(--navy); }
.figure small { color: var(--muted); font-size: .9rem; }

.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--paper); color: var(--gold-dark); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; margin-bottom: .5rem; }

/* ---------- Forms ---------- */
form .row > * { min-width: 0; }
form .row { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { form .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; color: var(--navy); }
.req { color: var(--err-ink); }
.hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; font: 1rem var(--sans); color: var(--ink);
  padding: .65rem .75rem; border: 1px solid #CFC7B2; border-radius: 7px; background: var(--white);
}
textarea { min-height: 110px; resize: vertical; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
legend { font: 700 1.05rem var(--serif); color: var(--navy); padding: 0 .4rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; color: var(--ink); margin-bottom: .75rem; }
.check input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--navy); }
.radio-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.radio-row label { display: flex; align-items: center; gap: .4rem; font-weight: 400; color: var(--ink); }
.conditional { display: none; }
.conditional.show { display: block; }
.hp { position: absolute; left: -9999px; }

.form-msg { display: none; border-radius: 8px; padding: .8rem 1rem; margin-top: 1rem; }
.form-msg.success { display: block; background: var(--ok-bg); color: var(--ok-ink); }
.form-msg.error { display: block; background: var(--err-bg); color: var(--err-ink); }
.form-msg.info { display: block; background: #FFF8E6; color: var(--navy); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--navy); background: var(--paper); }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: #C9CEDA; font-size: .92rem; border-top: 3px solid var(--gold); }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 2rem 1rem; text-align: center; }
.footer-links { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
footer a { color: var(--gold); }
footer p { margin-bottom: .4rem; }
.authorised { margin-top: 1rem; font-size: .85rem; color: #AEB5C6; }
