/* Agape Akatemia: sivuston tyylit. Ilme seuraa agapepalvelut.fi:tä. */

@font-face { font-family: "Roboto Slab"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/roboto-slab-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/roboto-slab-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/roboto-slab-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/roboto-latin-700-normal.woff2") format("woff2"); }

:root {
  --teal: #00796b;
  --teal-dark: #00564c;
  --teal-deep: #003d36;
  --teal-tint: #e6f2f0;
  --teal-tint-2: #cfe6e2;
  --ink: #1f2a3a;
  --text: #4e586e;
  --muted: #6b7489;
  --line: #dde3e8;
  --bg: #ffffff;
  --bg-soft: #f5f8f8;
  --warn-bg: #fff6e0;
  --warn-line: #e8c46a;
  --radius: 5px;
  --radius-lg: 10px;
  --wrap: 1120px;
  --slab: "Roboto Slab", Georgia, serif;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--slab); color: var(--teal); font-weight: 300; line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; font-weight: 400; }
h4 { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
p { margin: 0 0 1em; }
strong { color: var(--ink); font-weight: 500; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Yläpalkki */
.topbar { background: #fff; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.topbar .wrap { display: flex; justify-content: flex-end; gap: 22px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topbar a { color: var(--teal); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* Ylätunniste */
.site-header { background: var(--teal); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-family: var(--slab); font-size: 1.35rem; font-weight: 400; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { height: 44px; width: auto; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.18)); }
.brand small { display: block; font-family: var(--sans); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 500; margin-top: 1px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { white-space: nowrap; color: #fff; text-decoration: none; font-family: var(--slab); font-weight: 300; font-size: .95rem; padding: 8px 11px; border-radius: var(--radius); }
.nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav a[aria-current="page"] { font-weight: 600; }
.nav .nav-login { border: 1px solid rgba(255,255,255,.55); margin-left: 8px; font-family: var(--sans); font-weight: 500; font-size: .85rem; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: var(--radius); padding: 8px 12px; font: 500 .9rem var(--sans); cursor: pointer; min-height: 44px; }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--teal-dark); flex-direction: column; align-items: stretch; padding: 8px 12px 16px; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 13px 10px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.1); border-radius: 0; }
  .nav .nav-login { margin: 12px 0 0; text-align: center; border-radius: var(--radius); }
  .topbar .wrap { justify-content: center; gap: 14px; }
  .topbar .hours { display: none; }
}

/* Painikkeet */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 24px; border-radius: var(--radius); background: var(--teal); color: #fff; text-decoration: none; font: 600 12.5px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--teal); cursor: pointer; text-align: center; }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal); }
.btn-ghost:hover { background: var(--teal-tint); color: var(--teal-dark); }
.btn-light { background: #fff; color: var(--teal-dark); border-color: #fff; }
.btn-light:hover { background: var(--teal-tint); color: var(--teal-deep); border-color: var(--teal-tint); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Osiot */
section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-tint { background: var(--teal-tint); }
.eyebrow { font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin: 0 0 14px; }
.lead { font-size: 1.15rem; color: var(--text); max-width: 680px; }
.section-head { max-width: 720px; margin-bottom: 36px; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--teal-tint) 0%, #fff 100%); padding: 80px 0 72px; }
.hero h1 { color: var(--teal-deep); max-width: 820px; }
.hero .lead { font-size: 1.2rem; }
.page-hero { background: var(--teal-tint); padding: 56px 0 48px; }
.page-hero h1 { color: var(--teal-deep); margin-bottom: .4em; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* Kortit */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; }
.card h3 { margin-bottom: .45em; }
.card p:last-of-type { margin-bottom: 1.2em; }
.card .btn, .card .more { margin-top: auto; align-self: flex-start; }
.card-feature { border-top: 4px solid var(--teal); }
.more { font-weight: 500; text-decoration: none; }
.more::after { content: " →"; }
.icon { width: 44px; height: 44px; border-radius: 50%; background: var(--teal-tint); color: var(--teal); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 22px; height: 22px; }

.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 14px; height: 8px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }

.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } .price-box { position: static; } }

.price-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; position: sticky; top: 96px; }
.price { font-family: var(--slab); font-size: 2.6rem; color: var(--teal-deep); font-weight: 400; line-height: 1; margin: 6px 0 4px; }
.price-note { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.price-box .btn { width: 100%; }
.price-box hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

.doc-list { counter-reset: doc; list-style: none; padding: 0; display: grid; gap: 14px; }
.doc-list li { counter-increment: doc; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px 20px 70px; position: relative; margin: 0; }
.doc-list li::before { content: counter(doc); position: absolute; left: 20px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; font: 600 15px/34px var(--sans); text-align: center; }
.doc-list h4 { margin: 0 0 4px; }
.doc-list p { margin: 0; font-size: 15.5px; }
.tag { display: inline-block; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: var(--teal-tint); color: var(--teal-dark); padding: 5px 8px; border-radius: 3px; margin-left: 6px; vertical-align: 2px; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { counter-increment: step; margin: 0; }
.steps li::before { content: counter(step); display: block; font-family: var(--slab); font-size: 2.4rem; color: var(--teal); font-weight: 300; line-height: 1; margin-bottom: 10px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.note { background: var(--bg-soft); border-left: 4px solid var(--teal); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; }
.note p:last-child { margin: 0; }
.note-warn { background: var(--warn-bg); border-left-color: var(--warn-line); }
.law { font-family: var(--slab); font-weight: 300; font-size: 1.1rem; color: var(--ink); border-left: 3px solid var(--teal-tint-2); padding-left: 20px; margin: 24px 0; }
.law cite { display: block; font: 400 13px var(--sans); color: var(--muted); font-style: normal; margin-top: 8px; }

/* UKK */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--slab); font-size: 1.12rem; color: var(--ink); font-weight: 400; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 300 28px/1 var(--sans); color: var(--teal); }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 20px; max-width: 720px; }
.faq h2 { margin-top: 48px; }
.faq h2:first-child { margin-top: 0; }

/* CTA-kaista */
.cta-band { background: var(--teal); color: #e8f4f2; padding: 64px 0; }
.cta-band h2 { color: #fff; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band p { margin: 0; max-width: 620px; }

/* Yhteystiedot */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 12px; margin: 0; }
.contact-list li span:first-child { color: var(--muted); font-size: 15px; }
@media (max-width: 520px) { .contact-list li { grid-template-columns: 1fr; gap: 2px; } }

.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 500; }
.table-scroll { overflow-x: auto; }

/* Alatunniste */
.site-footer { background: var(--teal-deep); color: #b9d3cf; font-size: 15px; padding: 56px 0 28px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer-grid h4 { color: #fff; font-family: var(--slab); font-weight: 400; font-size: 1.05rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  section { padding: 52px 0; }
  .hero { padding: 52px 0 48px; }
  .card { padding: 24px; }
  .btn-row .btn { width: 100%; }
}

@media print {
  .topbar, .site-header, .cta-band, .site-footer, .nav-toggle { display: none !important; }
  section { padding: 20px 0; }
}

/* Kirjautuminen (jäsenalue) */
.login-page { background: var(--teal-tint); min-height: 100vh; display: flex; flex-direction: column; }
.login-top { background: var(--teal); }
.login-top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.login-top a.back { color: #fff; text-decoration: none; font-size: 14px; opacity: .9; }
.login-top a.back:hover { opacity: 1; text-decoration: underline; }
.login-main { flex: 1; display: grid; place-items: center; padding: 48px 16px; }
.login-box { width: 100%; max-width: 940px; display: grid; grid-template-columns: 1fr 1.05fr; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px -20px rgba(0, 61, 54, .35); }
.login-side { background: var(--teal-deep); color: #cfe6e2; padding: 44px 40px; display: flex; flex-direction: column; }
.login-side h2 { color: #fff; font-size: 1.6rem; margin-bottom: .5em; }
.login-side .eyebrow { color: #8fd0c6; }
.login-side ul { list-style: none; padding: 0; margin: 8px 0 28px; }
.login-side li { position: relative; padding-left: 28px; margin-bottom: 10px; font-size: 15.5px; }
.login-side li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 13px; height: 7px; border-left: 2px solid #8fd0c6; border-bottom: 2px solid #8fd0c6; transform: rotate(-45deg); }
.login-side .side-foot { margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; }
.login-side a { color: #fff; }
.login-form { padding: 44px 44px 36px; }
.login-form h1 { font-size: 1.9rem; color: var(--teal-deep); margin-bottom: .3em; }
.login-form .sub { color: var(--muted); font-size: 15.5px; margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.field input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #c9d2da; border-radius: var(--radius); background: #fff; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,121,107,.18); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--teal); font: 500 13px var(--sans); padding: 8px 10px; cursor: pointer; border-radius: 4px; }
.pw-toggle:hover { background: var(--teal-tint); }
.login-form .btn { width: 100%; margin-top: 6px; min-height: 50px; }
.login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; }
.login-alert { background: #fdecea; border: 1px solid #f3b8b0; color: #8a2a1f; border-radius: var(--radius); padding: 12px 14px; font-size: 15px; margin-bottom: 20px; }
.login-alert.info { background: var(--warn-bg); border-color: var(--warn-line); color: #6b4e00; }
.login-buy { margin-top: 28px; padding: 18px 20px; background: var(--bg-soft); border-radius: var(--radius-lg); font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.login-buy strong { display: block; }
.login-buy .btn { width: auto; min-height: 40px; padding: 10px 16px; margin: 0; }
.login-foot { text-align: center; font-size: 13px; color: var(--muted); padding: 0 16px 28px; }
.login-foot a { color: var(--muted); }
@media (max-width: 820px) {
  .login-box { grid-template-columns: 1fr; }
  .login-side { order: 2; padding: 30px 26px; }
  .login-form { padding: 32px 24px 28px; }
  .login-main { padding: 24px 12px; place-items: start center; }
  .login-top a.back { display: none; }
}

/* Kuvat */
.photo { margin: 0; }
.photo img { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; background: var(--teal-tint); }
.photo figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.petra-band { display: grid; grid-template-columns: 300px 1fr 300px; gap: 44px; align-items: center; }
@media (max-width: 980px) { .petra-band { grid-template-columns: 220px 1fr; } .petra-band .card { grid-column: 1 / -1; } }
@media (max-width: 600px) { .petra-band { grid-template-columns: 1fr; gap: 24px; } .petra-band .photo { max-width: 280px; } }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.hero-mark { width: 260px; height: auto; filter: drop-shadow(0 14px 28px rgba(0,61,54,.18)); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-mark { display: none; } }
