/* =========================================================
   DESIGN TOKENS
   Palette: deep navy (institutional, trustworthy) + gold
   (Kokoomus-adjacent, but warmer and more specific than the
   party's stock blue). The recurring wave-line motif nods to
   Saimaa in Lappeenranta and the sea in Kotka — the two places
   Juho is running for.
   ========================================================= */
:root {
  --navy-950: #0a1b33;
  --navy-900: #0f2340;
  --navy-800: #17335c;
  --navy-700: #234677;

  --gold-500: #c9a24b;
  --gold-300: #e6c878;

  --paper: #f6f3ec;
  --ink-100: #eef1f6;
  --ink-500: #a9b7cf;
  --ink-700: #6f7f9c;

  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 1120px;
  --radius: 4px;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--navy-950);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.05;
  font-weight: 600;
}

p { margin: 0 0 1em; }
a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold-500);
  color: var(--navy-950);
  padding: 12px 20px;
  z-index: 1000;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.skip-link:focus {
  left: 0;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Darker gold for AA contrast on light section backgrounds */
  color: #7c5e1e;
  margin: 0 0 0.6em;
}

/* Lighter gold works fine against the dark hero background */
.hero .eyebrow,
.tue-section .eyebrow {
  color: var(--gold-300);
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 27, 51, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(201, 162, 75, 0.25);
}

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

.brand {
  text-decoration: none;
  color: var(--ink-100);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.15;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink-100);
  border-radius: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  color: var(--ink-100);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--gold-300); }

.nav-cta {
  background: var(--gold-500);
  color: var(--navy-950) !important;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--gold-300) !important; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--navy-950);
  color: var(--ink-100);
  padding: 88px 0 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 96px;
  position: relative;
  z-index: 2;
}

.hero-name {
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--paper);
  margin: 0.1em 0 0.35em;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--ink-500);
  max-width: 34ch;
  font-style: italic;
  font-family: var(--font-display);
}

.hero-location {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-top: 28px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin: 28px 0 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--gold-500);
  color: var(--navy-950);
}
.btn-primary:hover { background: var(--gold-300); }

.btn-ghost {
  border-color: rgba(238, 241, 246, 0.35);
  color: var(--ink-100);
}
.btn-ghost:hover { border-color: var(--gold-300); color: var(--gold-300); }

.hero-tagline-sub {
  font-size: 1rem;
  color: var(--ink-500);
  max-width: 34ch;
  margin-top: -0.6em;
}

.hero-photo {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
}

.hero-cutout {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

/* Signature wave motif — used in hero and as section dividers */
.wave-divider {
  display: block;
  width: 100%;
  height: 56px;
  position: relative;
  z-index: 1;
}
.wave-divider path {
  fill: var(--paper);
}

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section {
  padding: 96px 0;
}
.section-alt {
  background: var(--ink-100);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 0.8em;
  color: var(--navy-950);
  max-width: 20ch;
}

/* Esittely */
.esittely-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 56px;
  align-items: start;
}
.esittely-text p { font-size: 1.05rem; max-width: 62ch; }
.esittely-subtitle {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.6em;
}

.esittely-grid + .esittely-grid { margin-top: 64px; }

.esittely-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  display: block;
}
/* The source photo isn't shot with him centered — shift the crop
   left so he lands in the middle of the frame instead of off to one side. */
.img-pos-forest {
  object-position: 35% center;
}

.esittely-grid--reverse {
  grid-template-columns: 0.6fr 1.4fr;
}
.esittely-grid--reverse .esittely-photo { order: -1; }

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(15, 35, 64, 0.15);
}
.fact-list li {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(15, 35, 64, 0.15);
  font-size: 0.95rem;
}
.fact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-700);
}

/* Vaaliteemat */
.teema-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.teema-card {
  background: var(--paper);
  border: 1px solid rgba(15, 35, 64, 0.12);
  border-top: 3px solid var(--gold-500);
  padding: 32px 28px;
  border-radius: var(--radius);
}
.teema-num {
  display: block;
  font-family: var(--font-mono);
  color: var(--gold-500);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.teema-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5em;
}
.teema-card p {
  color: var(--ink-700);
  margin: 0;
  font-size: 0.98rem;
}

/* Tausta / CV */
.tausta-role {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--ink-700);
  margin-bottom: 2.5em;
}

.tausta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.tausta-heading {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-800);
  margin: 0 0 1em;
  padding-bottom: 0.6em;
  border-bottom: 2px solid var(--gold-500);
}
.tausta-heading--spaced { margin-top: 2em; }

.tausta-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tausta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 35, 64, 0.1);
  font-size: 0.92rem;
  line-height: 1.4;
}
.tausta-list--plain li {
  display: block;
  color: var(--ink-700);
}
.tausta-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-700);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Liity joukkoihin -lomake */
.tiimi-form {
  max-width: 480px;
  margin: 40px auto 0;
  text-align: left;
}
.hidden-field { position: absolute; left: -9999px; }
.form-row {
  margin-bottom: 20px;
}
.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 8px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--navy-800);
  border: 1px solid rgba(238, 241, 246, 0.25);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--ink-100);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--gold-500);
  outline-offset: 1px;
}
.tiimi-form .btn { margin-top: 4px; }

/* Kokoomus party logo — white version, so it only ever goes on
   the dark navy sections. Sized by context, never larger than the
   text it sits next to (it's a supporting mark, not competing
   with Juho's own name/logo). */
.party-logo {
  height: auto;
  display: block;
  width: auto;
}

.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.party-logo--eyebrow {
  height: 13px;
  opacity: 0.92;
  position: relative;
  top: -3px;
}

.party-logo--badge {
  height: 20px;
  margin: 0 auto 20px;
}

.footer-party {
  display: flex;
  align-items: center;
  gap: 10px;
}
.party-logo--footer {
  height: 14px;
  opacity: 0.85;
}
.tue-section {
  background: var(--navy-900);
  color: var(--ink-100);
  text-align: center;
}
.tue-section .section-title {
  color: var(--paper);
  margin-left: auto;
  margin-right: auto;
}
.tue-inner {
  max-width: 640px;
}
.tue-inner p {
  color: var(--ink-500);
  font-size: 1.05rem;
}

/* Yhteystiedot */
.yhteys-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 32px;
}
.yhteys-grid a {
  text-decoration: none;
  border-bottom: 1px solid var(--gold-500);
}
.social-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold-500);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--navy-950);
  color: var(--ink-700);
  padding: 32px 0;
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-inner p { margin: 0; }

/* =========================================================
   SCROLL REVEAL (progressive enhancement, JS adds .in-view)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--navy-950);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.1rem; }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-photo { order: -1; max-width: 260px; margin: 0 auto; }

  .esittely-grid,
  .esittely-grid--reverse,
  .yhteys-grid,
  .tausta-grid {
    grid-template-columns: 1fr;
  }
  .esittely-grid--reverse .esittely-photo { order: 0; }
  .esittely-photo img { aspect-ratio: 16 / 10; }
  .esittely-photo { max-width: 420px; margin: 0 auto; }

  .teema-grid {
    grid-template-columns: 1fr;
  }
}
