/* 民主改革 — static rebuild of the former Weebly site (Birdseye-style layout) */

:root {
  --text: #000;
  --muted: rgba(0, 0, 0, 0.6);
  --line: rgba(0, 0, 0, 0.13);
  --header-h: 80px;
  --gutter: 40px;
  --font-heading: "Montserrat", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-body: "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  /* Shown when a hero / dark section has no photo */
  --hero-fallback: linear-gradient(160deg, #3b4d5e 0%, #1b2530 100%);
  --dark-fallback: linear-gradient(160deg, #3a3a3a 0%, #1c1c1c 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Typography ---------- */

/* p.subheading: a paragraph set in the h3 style (second line of the index comparison cards) */
h1,
h2,
h3,
p.subheading {
  margin: 0 0 30px;
  color: inherit;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

h2,
h3,
p.subheading {
  font-size: 24px;
}

p {
  margin: 0 0 30px;
  line-height: 1.75;
}

p a {
  font-weight: 600;
  text-decoration: underline;
  transition: opacity 0.3s ease-in-out;
}

p a:hover {
  opacity: 0.75;
}

/* Replacements for the editor's <font size="1..7"> */
.fs-1 { font-size: 10px; }
.fs-2 { font-size: 13px; }
.fs-3 { font-size: 16px; }
.fs-4 { font-size: 18px; }
.fs-5 { font-size: clamp(18px, 4.5vw, 24px); }
.fs-6 { font-size: clamp(24px, 6vw, 32px); }
.fs-7 { font-size: clamp(30px, 8vw, 48px); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 20px var(--gutter);
  color: #fff;
  transition: background-color 0.3s ease, color 0.26s ease, padding 0.18s ease, box-shadow 0.3s ease;
}

body.is-scrolled .site-header {
  padding-top: 10px;
  padding-bottom: 10px;
  background: #fff;
  color: #000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s ease, font-size 0.26s ease;
}

.logo:hover {
  opacity: 0.6;
}

body.is-scrolled .logo {
  font-size: 24px;
}

.nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 12px 20px;
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.3s ease, padding 0.18s ease;
}

.nav a:hover {
  opacity: 0.6;
}

.nav a[aria-current="page"] {
  border-color: currentColor;
}

body.is-scrolled .nav a {
  padding-top: 10px;
  padding-bottom: 10px;
}

.hamburger {
  display: none;
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin-right: -10px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.hamburger span,
.hamburger span::before,
.hamburger span::after {
  position: absolute;
  left: 10px;
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  content: "";
  transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.hamburger span {
  top: 20px;
}

.hamburger span::before {
  top: -7px;
  left: 0;
}

.hamburger span::after {
  top: 7px;
  left: 0;
}

body.nav-open .hamburger {
  color: #000;
}

body.nav-open .hamburger span {
  background: transparent;
}

body.nav-open .hamburger span::before {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .hamburger span::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero banner ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  color: #fff;
  background: #1b2530 var(--hero-fallback);
  background-position: center;
  background-size: cover;
}

/* Darkens the top of the banner so the white header stays readable */
.hero::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0) 100%);
  content: "";
  pointer-events: none;
}

.hero .container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 80px) var(--gutter) 80px;
  text-align: center;
}

.hero h1 {
  margin: 15px auto;
  font-size: clamp(40px, 9vw, 80px);
  font-weight: 300;
  line-height: 1.15;
}

.hero p {
  margin: 15px auto;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.15em;
}

/* ---------- Content sections ---------- */

.section {
  background: #fff;
}

.section > .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px var(--gutter);
}

.section-dark {
  color: #fff;
  background: #1c1c1c var(--dark-fallback);
  background-position: center;
  background-size: cover;
}

.cols {
  display: flex;
  margin: 0 -15px;
}

.col {
  min-width: 0;
  padding: 0 15px;
}

.spacer {
  display: block;
}

hr.divider {
  height: 1px;
  margin: 20px 0;
  border: 0;
  background: var(--line);
}

figure.image {
  margin: 0;
  padding: 10px 0;
  text-align: center;
}

.button-row {
  margin: 10px 0;
}

.button {
  display: inline-block;
  padding: 14px 30px;
  border: 1px solid #000;
  color: #000;
  font-family: var(--font-heading);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.1s ease-in-out;
}

a.button[href]:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* ---------- Footer ---------- */

.site-footer {
  background: #f2f2f2;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px var(--gutter);
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 992px) {
  :root {
    --header-h: 50px;
    --gutter: 20px;
  }

  .site-header,
  body.is-scrolled .site-header {
    padding: 5px var(--gutter);
  }

  .logo,
  body.is-scrolled .logo {
    font-size: 20px;
  }

  .hamburger {
    display: block;
  }

  /* Full-screen dropdown menu */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-height: 0;
    overflow-y: auto;
    visibility: hidden;
    padding: 0;
    background: #fff;
    color: #000;
    transition: max-height 0.3s ease, padding 0.3s ease, visibility 0s linear 0.3s;
  }

  body.nav-open .nav {
    max-height: 100vh;
    padding: 60px 0;
    visibility: visible;
    transition: max-height 0.3s ease, padding 0.3s ease, visibility 0s;
  }

  .nav ul {
    display: block;
  }

  .nav a,
  body.is-scrolled .nav a {
    padding: 14px 0;
    border: 0;
    font-size: 16px;
    text-align: center;
  }

  .nav a[aria-current="page"] {
    background: rgba(0, 0, 0, 0.05);
  }

  .hero .container {
    padding: calc(var(--header-h) + 60px) var(--gutter) 60px;
  }

  .section > .container {
    padding: 30px var(--gutter);
  }
}

@media (max-width: 767px) {
  .cols {
    display: block;
    margin: 0;
  }

  .col {
    width: auto !important;
    padding: 0;
  }

  .col-empty {
    display: none;
  }

  /* Columns stack on phones, so right-aligned banner text reads better centred */
  .hero p {
    text-align: center !important;
  }
}
