@font-face{
  font-family: "Ogg";
  src: url("../fonts/Ogg Ogg Bold/Ogg Ogg Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Figtree";
  src: url("../fonts/Figtree/Figtree-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Figtree";
  src: url("../fonts/Figtree/Figtree-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root{
  --bg: #fff;
  --ink: #1f1f23;
  --muted: #5f5f6b;

  --tint: #f5e2e6;           /* vaaleanpunainen tausta */
  --accent: #b04655;         /* viininpunainen otsikoille/napeille */
  --accent-2: #8f3341;

  --card: #ffffff;
  --border: rgba(0,0,0,.08);
  --shadow: 0 12px 30px rgba(0,0,0,.12);

  --radius: 18px;
  --radius-lg: 26px;

  --container: 1100px;

  --serif: "Ogg", "Playfair Display", ui-serif, Georgia, serif;
  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --focus: 0 0 0 4px rgba(176,70,85,.22);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.2;
}

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

.container{
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header{
  position: sticky;
  top:0;
  z-index: 50;
  background: #f5e2e6;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height: 64px;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
  color: inherit;
}
.brand-mark{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.06);
  font-weight: 600;
  letter-spacing:.04em;
  color: var(--accent-2);
}
.brand-text{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.site-nav{
  display:flex;
  gap: 18px;
  align-items:center;
}
.nav-link{
  text-decoration:none;
  color: rgba(31,31,35,.82);
  font-size: .95rem;
  padding: 10px 10px;
  border-radius: 12px;
}
.nav-link:hover{
  background: rgba(255,255,255,.6);
}
.nav-link.is-active{
  color: var(--accent-2);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.06);
}
.nav-cta{
  color: #fff;
  background: var(--accent);
}
.nav-cta:hover{ background: var(--accent-2); }

.nav-toggle{
  display:none;
  background: transparent;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 10px 12px;
}
.nav-toggle:focus{ outline:none; box-shadow: var(--focus); }
.burger{
  width: 22px; height: 2px;
  background: rgba(31,31,35,.85);
  display:block;
  position: relative;
}
.burger::before,.burger::after{
  content:"";
  position:absolute;
  left:0;
  width: 22px; height: 2px;
  background: rgba(31,31,35,.85);
}
.burger::before{ top: -7px; }
.burger::after{ top: 7px; }

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

/* Hero */
.hero{
  position: relative;
  min-height: clamp(420px, 62vh, 680px);
  display:grid;
}
.hero-media{
  position:absolute;
  inset:0;
  background: url("../images/P%C3%A4%C3%A4kuva.webp") center/cover no-repeat;
  transform: translateZ(0);
}
.hero-fade{
  position:absolute;
  inset:auto 0 0 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  display:none;
}

.hero-content{
  position: relative;
  display:flex;
  align-items:center;
  padding-block: 56px;
}
.hero-card{
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  max-width: 520px;
  color: #fff;
  backdrop-filter: blur(1px);
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
}
.hero-card h1{
  font-family: var(--serif);
  font-weight: 700;
  margin: 0 0 6px 0;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  letter-spacing: .01em;
}
.lead{
  margin: 0 0 18px 0;
  opacity: .92;
  font-weight: 300;
  letter-spacing: .02em;
}
.hero-actions{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Sections */
.section{
  padding: clamp(56px, 7vw, 92px) 0;
}
.section-tinted{
  background: var(--tint);
}
#tunnit{
  background: #c9d7e2;
}
.section-head{
  text-align:center;
  max-width: 780px;
  margin: 0 auto 26px auto;
}
.section-head h2{
  margin:0;
}

#joogapolku .section-head{
  text-align: left;
  max-width: none;
  margin: 0 0 26px 0;
}

h2{
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  color: var(--accent-2);
  letter-spacing:.01em;
}
.content h2{ margin-top: 0; }
h3{
  margin: 0 0 10px 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing:.01em;
}
h4{
  margin: 0 0 10px 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing:.01em;
}
p{ margin: 0 0 12px 0; }
.subhead{ color: rgba(31,31,35,.76); margin-top: 10px; }
.kicker{ color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.muted{ color: var(--muted); }
.small{ font-size: .92rem; }

/* Split layout */
.split{
  display:grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(22px, 4vw, 44px);
  align-items:start;
}
.image-card{
  margin:0;
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: #fff;
  align-self: start;
}
.image-card img{
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}

.content blockquote{
  margin: 18px 0 0 0;
  padding: 14px 16px;
  border-left: 4px solid rgba(176,70,85,.55);
  background: #f5e2e6;
  border-radius: 14px;
  font-style: italic;
  color: rgba(31,31,35,.78);
}

.inline-actions{ margin-top: 16px; }
.text-link{
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}
.text-link:hover{ text-decoration: underline; }

/* Cards */
.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px;
}
.card{
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  padding: 18px 18px 16px 18px;
}
.card-icon{
  width: 200px;
  height: 200px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: #f5e2e6;
  border: 1px solid rgba(176,70,85,.14);
  margin-bottom: 10px;
  font-size: 1.2rem;
  margin-inline: auto;
}
.card-icon img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.card-link{
  display:inline-block;
  margin-top: 6px;
  text-decoration:none;
  color: var(--accent-2);
  font-weight: 600;
}
.card-link:hover{ text-decoration: underline; }

.note{
  margin-top: 18px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

/* Break images */
.break{
  margin:0;
  padding:0;
}
.break img{
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  display:block;
  filter: saturate(1.02) contrast(1.02);
}
.break-full{
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
}
.break-full img{
  width: 100vw;
  max-width: 100vw;
  height: clamp(420px, 62vh, 680px);
  object-fit: cover;
}

/* Timeline */
.timeline{
  margin-top: 26px;
  display:flex;
  flex-direction: column;
  gap: 14px;
}
.timeline.compact{ margin-top: 16px; }
.row{
  display:block;
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.6);
}
.row.subtle{
  background: rgba(255,255,255,.35);
}
.item-head{
  display:flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.year{
  font-weight: 700;
  color: rgba(31,31,35,.72);
  min-width: 92px;
}
.item h4{ margin: 0; }
.item p{ margin: 0; color: rgba(31,31,35,.78); }

/* Contact */
.contact{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items:start;
}
.social{ margin-top: 16px; }
.social-link{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  color: var(--ink);
  font-weight: 600;
}
.social-link img{
  width: 20px; height: 20px;
  opacity: .9;
}
.social-link:hover{ text-decoration: underline; }

.form{
  background: var(--tint);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
label{ display:block; margin-bottom: 12px; }
label span{
  display:block;
  font-size: .92rem;
  color: rgba(31,31,35,.78);
  margin-bottom: 6px;
}
input, textarea{
  width: 100%;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 14px;
  padding: 12px 12px;
  font: inherit;
  background: rgba(255,255,255,.92);
}
/* Honeypot field for spam protection (keep off-screen, not visible) */
.hp{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
input:focus, textarea:focus{
  outline:none;
  box-shadow: var(--focus);
  border-color: rgba(176,70,85,.35);
}
.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  padding: 11px 16px;
  border: 1px solid rgba(255,255,255,.35);
  background: var(--accent);
  color: #fff;
  text-decoration:none;
  font-weight: 600;
  letter-spacing:.01em;
}
.btn:hover{ background: var(--accent-2); }
.btn:focus{ outline:none; box-shadow: var(--focus); }
.btn-ghost{
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.38);
}
.btn-ghost:hover{
  background: rgba(255,255,255,.26);
}
.btn-wide{
  width: 100%;
  margin-top: 6px;
}

/* Footer */
.site-footer{
  background: var(--tint);
  border-top: 1px solid rgba(0,0,0,.06);
  padding: 26px 0;
}
.footer-inner{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 14px;
  justify-content:center;
  text-align:center;
}
.footer-heart img{
  width: 72px;
  height: auto;
  display:block;
}
.footer-text p{ margin: 2px 0; }

/* Helpers */
.mt-xl{ margin-top: 42px; }

/* Responsive */
@media (max-width: 980px){
  .cards{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  /* .image-card img keeps natural ratio on mobile */
  .contact{ grid-template-columns: 1fr; }
  .hero-content{ align-items: flex-start; padding-block: 120px 16px; }
  .hero-card{ max-width: 80%; }
  .item-head{ flex-direction: column; gap: 4px; align-items: flex-start; }
  .year{ min-width: 0; }
}

@media (max-width: 860px){
  .nav-toggle{ display:inline-flex; align-items:center; }
  .site-nav{
    position: absolute;
    right: 20px;
    top: 64px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 18px 44px rgba(0,0,0,.14);
    display:none;
    flex-direction: column;
    gap: 6px;
    min-width: 240px;
  }
  .site-nav.is-open{ display:flex; }
  .nav-link{ width: 100%; }
  .nav-cta{ width: 100%; text-align:center; }
}
