/* Tapani Keurulainen — 40 vuotta taksialalla
   Palette: yönsininen asfaltti + lämmin meripihka (taksin valo) +
   vaimea fairway-vihreä toisena aksenttina. Sisarsivusto keurulainen.fi:lle:
   sama rakennejärjestelmä, oma väriperhe. */

:root {
  --night: #0e141d;
  --night-2: #161e2a;
  --night-3: #1e2836;
  --paper: #f7f4ee;
  --paper-2: #efeade;
  --text: #212832;
  --muted: #5b6472;
  --muted-dark: rgba(238, 233, 222, .72);
  --line: #ded7c8;
  --line-dark: rgba(255, 255, 255, .1);
  --amber: #e2a233;
  --amber-deep: #a97313;   /* AA-turvallinen aksenttiteksti vaalealla */
  --green: #3f6b53;
  --cream: #f1ece1;

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--night); color: #fff; padding: .75rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; border-radius: 6px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .5rem clamp(1rem, 3vw, 2rem);
  padding: .8rem var(--pad);
  background: rgba(14, 20, 29, .85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.nav__brand {
  flex: none;
  font-family: var(--serif);
  font-weight: 700; font-size: 1.1rem; letter-spacing: .1em;
  color: var(--cream);
  border: 1.5px solid rgba(226, 162, 51, .55);
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center; border-radius: 50%;
}
.nav__links {
  margin-left: auto;
  display: flex; align-items: center; gap: clamp(.9rem, 2.6vw, 1.9rem);
}
.nav__links a {
  color: rgba(241, 236, 225, .78);
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 500; white-space: nowrap; transition: color .2s;
}
.nav__links a:hover { color: var(--amber); }

/* ---------- HERO ---------- */
.hero {
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(226, 162, 51, .2), transparent 62%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  color: var(--cream);
  padding: clamp(3rem, 8vw, 6rem) var(--pad) clamp(3.5rem, 9vw, 6.5rem);
}
.hero__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: clamp(2rem, 6vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.15fr .85fr; }
}

.eyebrow {
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--amber); font-weight: 600; margin-bottom: 1rem;
}
.hero__name {
  font-family: var(--serif); font-weight: 700; line-height: .95;
  font-size: clamp(2.9rem, 9vw, 5.4rem);
  letter-spacing: -.01em;
}
.hero__name span { color: var(--amber); }
.hero__lead {
  margin-top: 1.4rem; max-width: 46ch;
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  color: var(--muted-dark);
}
.hero__tags {
  list-style: none; display: flex; flex-wrap: wrap; gap: .55rem;
  margin-top: 1.9rem;
}
.hero__tags li {
  border: 1px solid rgba(226, 162, 51, .38);
  color: rgba(241, 236, 225, .9);
  border-radius: 999px; padding: .34rem .95rem;
  font-size: .78rem; letter-spacing: .07em; text-transform: uppercase;
}

/* Portrait + 40 v -merkki */
.hero__portrait { position: relative; justify-self: center; max-width: 26rem; width: 100%; }
.hero__portrait img {
  width: 100%; height: auto; border-radius: 14px;
  border: 1px solid rgba(226, 162, 51, .28);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .45);
  background: var(--night-3);
}
.hero__badge {
  position: absolute; right: -.6rem; bottom: -1.4rem;
  width: 6.6rem; height: 6.6rem; border-radius: 50%;
  background: var(--amber); color: #1b1408;
  display: grid; place-content: center; text-align: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
  border: 3px solid var(--night);
}
.hero__badge-num {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: 2.2rem; line-height: 1;
}
.hero__badge-txt {
  display: block; font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; line-height: 1.25;
  margin-top: .18rem;
}

/* ---------- SHARED SECTION BITS ---------- */
.section { padding: clamp(3.2rem, 8vw, 5.6rem) 0; }

.kicker {
  font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 600; color: var(--amber-deep); margin-bottom: .7rem;
}
.h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.75rem, 4.4vw, 2.7rem); line-height: 1.15;
  color: var(--night);
}
.lead {
  margin-top: 1.1rem; max-width: 62ch;
  font-size: clamp(1rem, 2vw, 1.1rem); color: var(--muted);
}

/* ---------- MILESTONE ---------- */
.milestone { background: var(--paper-2); border-block: 1px solid var(--line); }

.stats {
  list-style: none; margin-top: clamp(2rem, 5vw, 3rem);
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); } }

.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.6rem 1.4rem; text-align: center;
}
.stat__num {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1; color: var(--night);
}
.stat__lbl {
  display: block; margin-top: .55rem;
  font-size: .78rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.stat--hero {
  background: var(--night); border-color: var(--night);
  box-shadow: 0 16px 40px rgba(14, 20, 29, .22);
}
.stat--hero .stat__num { color: var(--amber); font-size: clamp(2.8rem, 8vw, 3.8rem); }
.stat--hero .stat__lbl { color: rgba(241, 236, 225, .82); }

/* ---------- URA-KORTIT ---------- */
.cards {
  list-style: none; margin-top: clamp(2rem, 5vw, 3rem);
  display: grid; gap: 1.1rem; grid-template-columns: 1fr;
}
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); } }

.card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 1.8rem 1.6rem 1.7rem;
  transition: transform .25s, box-shadow .25s;
}
.card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--amber), var(--amber-deep));
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(14, 20, 29, .1); }
.card__no {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: 1.05rem; color: var(--amber-deep); letter-spacing: .06em;
}
.card__title {
  font-family: var(--serif); font-weight: 700; font-size: 1.4rem;
  color: var(--night); margin: .3rem 0 .6rem;
}
.card p { color: var(--muted); font-size: .98rem; }

/* ---------- ELÄMÄ-RUUDUT ---------- */
.life { background: var(--night); color: var(--cream); }
.life .kicker { color: var(--amber); }
.life .h2 { color: #fff; }

.tiles {
  list-style: none; margin-top: clamp(2rem, 5vw, 3rem);
  display: grid; gap: 1.1rem; grid-template-columns: 1fr;
}
@media (min-width: 820px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

.tile {
  background: var(--night-2); border: 1px solid var(--line-dark);
  border-radius: 12px; padding: 1.9rem 1.6rem;
  transition: transform .25s, border-color .25s;
}
.tile:hover { transform: translateY(-3px); border-color: rgba(226, 162, 51, .38); }
.tile__icon { width: 2.9rem; height: 2.9rem; color: var(--amber); margin-bottom: 1.1rem; }
.tile__icon svg { width: 100%; height: 100%; }
.tile--golf .tile__icon { color: #6ba585; }
.tile__title {
  font-family: var(--serif); font-weight: 700; font-size: 1.4rem;
  color: #fff; margin-bottom: .55rem;
}
.tile p { color: var(--muted-dark); font-size: .97rem; }

/* ---------- TRIBUTE ---------- */
.tribute {
  background:
    radial-gradient(900px 400px at 50% 120%, rgba(63, 107, 83, .22), transparent 65%),
    var(--night-3);
  color: var(--cream); text-align: center;
}
.tribute__inner { display: grid; gap: 1.4rem; justify-items: center; }
.tribute__quote {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.35rem, 3.6vw, 2.1rem); line-height: 1.4;
  max-width: 30ch;
}
.tribute__sig {
  font-size: .84rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--amber); font-weight: 600;
}

/* ---------- FOOTER ---------- */
.foot {
  background: var(--night); color: rgba(241, 236, 225, .62);
  padding: 2.2rem 0; border-top: 1px solid var(--line-dark);
  font-size: .85rem;
}
.foot__inner {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: center; justify-content: space-between;
}
.foot a { color: var(--amber); }
.foot a:hover { text-decoration: underline; }

/* ---------- SCROLL-REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .6s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
