/* Terapia Rahko — psykoterapeuhtta.info
   Väripaletti ja kirjasimet alkuperäisestä Kadence-teemasta.
   Kirjasimet paikallisina — ei Google Fontsia, ei CDN:ää, ei seurantaa. */

@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/open-sans-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/open-sans-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Oswald'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/oswald-normal-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Oswald'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/oswald-normal-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --pohja:         #fbf8f2;
  --pohja-savy:    #f7f2ea;
  --otsikko:       #1a1a1a;
  --teksti:        #2b2b2b;
  --teksti-vaimea: #5a5a5a;
  --aksentti:      #0f4c81;
  --aksentti-tumma:#0c3a63;
  --korostus:      #a04040;
  --reuna:         #e3dbcd;
  --kortti:        #ffffff;
  --varjo:         0 1px 2px rgba(26,26,26,.04), 0 4px 16px rgba(26,26,26,.06);
  --leveys:        68rem;
  --kapea:         44rem;
  --pyoristys:     10px;
  --otsikkofontti: 'Oswald', 'Helvetica Neue', Arial, sans-serif;
  --leipafontti:   'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--pohja); color: var(--teksti);
  font-family: var(--leipafontti); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--otsikkofontti); font-weight: 700; line-height: 1.15; color: var(--otsikko); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); letter-spacing: .005em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: .7em; }
h3 { font-size: 1.15rem; letter-spacing: .01em; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--aksentti); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--aksentti-tumma); }
:focus-visible { outline: 2px solid var(--aksentti); outline-offset: 3px; border-radius: 3px; }

.ohita { position: absolute; left: -9999px; top: 0; background: var(--aksentti); color: #fff; padding: .7rem 1.2rem; z-index: 100; }
.ohita:focus { left: .5rem; top: .5rem; }

.rajaus { width: 100%; max-width: var(--leveys); margin: 0 auto; padding: 0 1.4rem; }
.rajaus--kapea { max-width: var(--kapea); }

.ylapalkki { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 242, .92); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--reuna); }
.ylapalkki__sisus { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 62px; }
.tunnus { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--otsikko); font-family: var(--otsikkofontti); font-weight: 700; letter-spacing: .01em; }
.tunnus__merkki { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--aksentti); color: #fff; font-size: 1rem; }
.ylapalkki nav { display: flex; align-items: center; gap: 1.5rem; font-size: .93rem; }
.ylapalkki nav a { color: var(--teksti-vaimea); text-decoration: none; }
.ylapalkki nav a:hover { color: var(--otsikko); }
@media (max-width: 640px) { .tunnus__teksti { display: none; } .ylapalkki nav { gap: 1rem; font-size: .88rem; } }
@media (max-width: 460px) { .ylapalkki nav a:not(.nappi) { display: none; } }

.nappi { display: inline-block; background: var(--aksentti); color: #fff !important; padding: .85rem 1.6rem; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: .97rem; letter-spacing: .01em; transition: background .15s ease; }
.nappi:hover { background: var(--aksentti-tumma); }
.nappi--pieni { padding: .5rem 1.1rem; font-size: .9rem; }
.linkki-vaimea { color: var(--teksti-vaimea); text-decoration: none; font-size: .97rem; border-bottom: 1px solid var(--reuna); padding-bottom: 2px; }
.linkki-vaimea:hover { color: var(--otsikko); border-color: var(--aksentti); }

.hero { padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem); }
.merkki { display: inline-block; font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; color: var(--aksentti); background: rgba(15, 76, 129, .08); padding: .4rem .9rem; border-radius: 3px; margin-bottom: 1.6rem; }
.ingressi { font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--teksti-vaimea); max-width: 36rem; }
.hero__toiminnot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin: 2rem 0 1.6rem; }
.hero__huomio { font-size: .9rem; color: var(--teksti-vaimea); }
.erotin { margin: 0 .4rem; opacity: .45; }

.osio { padding: clamp(3rem, 7vw, 5rem) 0; }
.osio--savy { background: var(--pohja-savy); border-block: 1px solid var(--reuna); }
.johdanto { max-width: 40rem; color: var(--teksti-vaimea); margin-bottom: 2.4rem; }
.kooste { margin-top: 2rem; font-size: 1.05rem; }
.kooste--vaimea { color: var(--teksti-vaimea); font-size: .95rem; }

.ajatukset { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.ajatukset li { background: var(--kortti); border: 1px solid var(--reuna); border-left: 3px solid var(--aksentti); padding: .9rem 1.2rem; border-radius: 4px; color: var(--teksti-vaimea); font-style: italic; }

.ruudukko { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--reuna); border: 1px solid var(--reuna); border-radius: var(--pyoristys); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.ruudukko li { background: var(--kortti); padding: 1.4rem; }
.ruudukko h3 { margin-bottom: .35em; color: var(--aksentti); }
.ruudukko p { font-size: .93rem; color: var(--teksti-vaimea); margin: 0; }

.kortit { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.kortti { background: var(--kortti); border: 1px solid var(--reuna); border-radius: var(--pyoristys); padding: 1.6rem; box-shadow: var(--varjo); }
.kortti h3 { color: var(--aksentti); margin-bottom: .6em; }
.kortti p { font-size: .95rem; color: var(--teksti-vaimea); margin-bottom: .7em; }
.kortti__paino { font-family: var(--otsikkofontti); font-size: 1.35rem !important; color: var(--otsikko) !important; }

.askeleet { list-style: none; counter-reset: askel; margin: 0; padding: 0; display: grid; gap: 1.7rem; }
.askeleet li { counter-increment: askel; padding-left: 3.4rem; position: relative; }
.askeleet li::before { content: counter(askel); position: absolute; left: 0; top: -3px; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; background: var(--aksentti); color: #fff; font-family: var(--otsikkofontti); font-weight: 700; font-size: 1rem; }
.askeleet p { color: var(--teksti-vaimea); font-size: .96rem; margin: 0; }

.esittely { display: grid; gap: 2.2rem; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); align-items: start; }
@media (max-width: 720px) { .esittely { grid-template-columns: 1fr; gap: 1.6rem; } }
.esittely__kuva { margin: 0; }
.esittely__kuva img { display: block; width: 100%; height: auto; border-radius: var(--pyoristys); box-shadow: var(--varjo); border: 1px solid var(--reuna); }
.esittely__kuva figcaption { margin-top: .6rem; font-size: .85rem; color: var(--teksti-vaimea); }

.patevyys { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .5rem; }
.patevyys li { padding-left: 1.5rem; position: relative; color: var(--teksti-vaimea); font-size: .95rem; }
.patevyys li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--aksentti); }

details { background: var(--kortti); border: 1px solid var(--reuna); border-radius: 6px; margin-bottom: .7rem; overflow: hidden; }
summary { padding: 1.05rem 1.3rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--otsikko); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--aksentti); font-size: 1.4rem; line-height: 1; flex: none; }
details[open] summary::after { content: "−"; }
details p { padding: 0 1.3rem 1.2rem; margin: 0; color: var(--teksti-vaimea); font-size: .95rem; }

.posti { margin: 2rem 0; text-align: center; }
.posti a { display: inline-block; font-size: clamp(1.05rem, 3vw, 1.35rem); font-weight: 600; background: var(--kortti); border: 1px solid var(--reuna); padding: 1rem 1.8rem; border-radius: var(--pyoristys); text-decoration: none; box-shadow: var(--varjo); word-break: break-word; }
.posti a:hover { border-color: var(--aksentti); }
.ohjaus { background: rgba(15, 76, 129, .05); border: 1px solid rgba(15, 76, 129, .18); border-radius: var(--pyoristys); padding: 1.6rem; }
.ohjaus h3 { color: var(--aksentti); margin-bottom: .8em; }
.ohjaus p { font-size: .95rem; color: var(--teksti-vaimea); }
.ohjaus strong { color: var(--otsikko); }
.tietosuoja { margin-top: 1.5rem; font-size: .87rem; color: var(--teksti-vaimea); text-align: center; }

.alapalkki { background: var(--pohja-savy); border-top: 1px solid var(--reuna); padding: 3rem 0 2rem; font-size: .92rem; color: var(--teksti-vaimea); }
.alapalkki__sisus { display: grid; gap: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.alapalkki__nimi { font-family: var(--otsikkofontti); font-weight: 700; font-size: 1.1rem; color: var(--otsikko); margin-bottom: .3em; }
.alapalkki p { margin-bottom: .7em; }
.alapalkki__huomio { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--reuna); font-size: .85rem; opacity: .85; }

/* ---- aiheruudukko: laajenevat laatikot ---- */
.ruudukko li { padding: 0; }
.ruudukko details {
  background: transparent; border: 0; border-radius: 0;
  margin: 0; height: 100%;
}
.ruudukko summary {
  padding: 1.15rem 1.3rem;
  font-family: var(--otsikkofontti); font-weight: 700;
  font-size: 1.1rem; letter-spacing: .01em;
  color: var(--aksentti);
}
.ruudukko summary:hover { background: rgba(15, 76, 129, .04); }
.ruudukko summary::after { content: "+"; color: var(--aksentti); font-size: 1.4rem; line-height: 1; flex: none; }
.ruudukko details[open] summary::after { content: "−"; }
.ruudukko details[open] summary { padding-bottom: .5rem; }
.ruudukko details p {
  padding: 0 1.3rem 1.15rem; margin: 0;
  font-size: .93rem; color: var(--teksti-vaimea);
}

/* erilliset kortit -> ei tyhjaa taustaa vajaalle riville */
.ruudukko {
  gap: .8rem; background: transparent;
  border: 0; border-radius: 0; overflow: visible;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.ruudukko li {
  border: 1px solid var(--reuna); border-radius: 6px;
  background: var(--kortti); overflow: hidden;
}
