/* ============================================================
   AIKA — suomalaisen mediakulttuurin verkkojulkaisu
   Pohjoismainen typografia: rauha, ilma, kontrasti.
   ============================================================ */

:root {
  --paper: #f6f4ee;
  --paper-raised: #fdfcf9;
  --ink: #171a1f;
  --ink-soft: #3c414a;
  --muted: #6b7078;
  --line: #d9d4c9;
  --line-strong: #b9b2a3;
  --petrol: #0e4a5a;
  --petrol-deep: #09313c;
  --copper: #b4552d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 238, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: 0.32em;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
}

.brand span {
  color: var(--copper);
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--petrol);
  border-bottom-color: var(--copper);
}

/* ---------- Hero (CSS only — valokuvaton) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #f2efe6;
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(180, 85, 45, 0.42) 0%, rgba(180, 85, 45, 0) 46%),
    radial-gradient(90% 120% at 8% 110%, rgba(20, 92, 110, 0.55) 0%, rgba(14, 74, 90, 0) 55%),
    linear-gradient(158deg, var(--petrol-deep) 0%, var(--petrol) 52%, #12617a 100%);
}

.hero::before {
  /* aikakellon kehät — samankeskiset renkaat */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(
    circle at 78% 24%,
    rgba(242, 239, 230, 0.075) 0 1px,
    transparent 1px 72px
  );
  pointer-events: none;
}

.hero::after {
  /* paperin rakeisuus */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.016) 0 2px,
    rgba(0, 0, 0, 0.016) 2px 4px
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7.5rem) 1.5rem clamp(3.5rem, 7vw, 6rem);
}

.hero__kicker {
  font-size: 0.875rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #e8c9a8;
  margin: 0 0 1.1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0 0 1.4rem;
  max-width: 24ch;
}

.hero__lede {
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  line-height: 1.65;
  max-width: 58ch;
  color: #e6e2d5;
  margin: 0 0 2.2rem;
}

.btn {
  display: inline-block;
  color: #f6f4ee;
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border: 1px solid rgba(246, 244, 238, 0.55);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: rgba(246, 244, 238, 0.12);
  border-color: #f6f4ee;
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn--ghost:hover {
  background: rgba(14, 74, 90, 0.06);
  color: var(--petrol);
  border-color: var(--petrol);
}

/* ---------- Page hero (alasivut) ---------- */

.page-head {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2.6rem, 5vw, 4.2rem) 1.5rem 1.6rem;
}

.kicker {
  font-size: 0.875rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 0.9rem;
}

.page-head h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  max-width: 26ch;
}

.page-head .lede {
  font-family: var(--serif);
  font-size: 1.16rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

.rule {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.rule::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--line) 55%, transparent);
}

/* ---------- Artikkeli ---------- */

.article {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.4rem 1.5rem 3.5rem;
}

.article__body {
  max-width: var(--measure);
}

.article__body > p {
  margin: 0 0 1.35rem;
}

.article__body a {
  color: var(--petrol);
  text-decoration: underline;
  text-decoration-color: rgba(14, 74, 90, 0.35);
  text-underline-offset: 3px;
}

.article__body a:hover {
  text-decoration-color: var(--copper);
}

.article__body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 2.6rem 0 0.9rem;
  letter-spacing: -0.008em;
}

.article__body h3 {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--petrol);
  margin: 2.2rem 0 0.7rem;
}

.article__body blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 3px solid var(--copper);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.article__body ul {
  padding-left: 1.2rem;
  margin: 0 0 1.35rem;
}

.article__body li {
  margin-bottom: 0.5rem;
}

.article__body figcaption,
.caption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Ensimmäinen tekstikappale */
.drop-start::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.3em;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--petrol);
}

.byline {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2.2rem;
}

.byline::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Card-palkit ---------- */

.cards {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.4rem 1.3rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(23, 26, 31, 0.35);
  border-color: var(--line-strong);
}

.card__tag {
  font-size: 0.875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--copper);
}

.card h2,
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.3;
  margin: 0;
}

.card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
  flex: 1;
}

.card__more {
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--petrol);
}

/* ---------- Osio-otsikko ---------- */

.section-title {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem 1.1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-title h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
}

.section-title a {
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--petrol);
  text-decoration: none;
  white-space: nowrap;
}

.section-title a:hover {
  color: var(--copper);
}

/* ---------- Haku ---------- */

.search-box {
  display: flex;
  gap: 0.6rem;
  max-width: 34rem;
  margin: 1.8rem 0 1rem;
}

.search-box input {
  flex: 1;
  font: inherit;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-raised);
  color: var(--ink);
}

.search-box input:focus {
  outline: 2px solid var(--petrol);
  outline-offset: 1px;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  max-width: var(--measure);
}

.search-results li {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.search-results a {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--petrol);
  text-decoration: none;
}

.search-results a:hover {
  color: var(--copper);
}

.search-results p {
  margin: 0.3rem 0 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

/* ---------- Yhteystieto-laatikot ---------- */

.contact-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.6rem 1.5rem;
  max-width: var(--measure);
  margin: 0 0 1.2rem;
}

.contact-card h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.contact-card a { color: var(--petrol); }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: #efece3;
  margin-top: 2rem;
}

.site-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
}

.site-footer h3 {
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li { margin-bottom: 0.45rem; }

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-footer a:hover { color: var(--petrol); }

.site-footer__note {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem 2.2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Responsiivisuus ---------- */

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .site-header__inner { padding: 0.8rem 1.1rem; }
  .hero__inner { padding: 3.2rem 1.1rem 3rem; }
  .page-head, .article, .cards, .section-title, .rule { padding-left: 1.1rem; padding-right: 1.1rem; }
  .drop-start::first-letter { font-size: 2.9em; }
  .search-box { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Valokuvat ---------- */
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(6,38,49,0.94) 0%, rgba(6,38,49,0.66) 52%, rgba(6,38,49,0.22) 100%);
}
.article__figure { margin: 0 0 2.2rem; }
.article__figure img {
  width: 100%; max-width: 100%; height: auto;
  aspect-ratio: 3/2; object-fit: cover;
  display: block; border-radius: 4px;
}


/* ---------- Saavutettavuus: kosketuskohteet ≥ 40 px ---------- */
.site-nav a { padding: 12px .75rem; }
.search-results a { display: block; padding: 10px 0; }
.site-footer a { display: inline-block; padding: 10px 6px; margin-left: -6px; }
.site-footer li { margin-bottom: 0; }
