/* Selän Vuoksi – tyylit
   Värit ja fontit on koottu muuttujiksi, joten ilmeen säätö onnistuu tästä ylhäältä. */

:root {
  --cream: #fbfaf3;        /* sivun pohja */
  --beige: #efede4;        /* yläpalkki, aukioloajat */
  --sage: #d4d6c5;         /* hoitokokemukset */
  --green: #4c5b32;        /* otsikot, napit */
  --green-dark: #4a5a2a;   /* footer */
  --ink: #3b3e2f;          /* leipäteksti */
  --ink-soft: #746c52;     /* serif-leipäteksti, alaotsikot */
  --line: rgba(76, 91, 50, .35);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max: 1100px;
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  overflow-x: clip;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

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

a { color: var(--green); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--green);
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

p { margin: 0 0 1em; }

/* Otsikon alle lyhyt viiva – jäsentää tekstilohkot */
section h2:not(.no-rule)::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: var(--green);
  opacity: .6;
  margin-top: .35em;
}
section.hero h2::after, section.banner h2::after, .site-footer h2::after { display: none; }

/* Vuorottelevat taustat */
.intro, .prices { background: var(--beige); }
.gonstead h3 { margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.gonstead h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.callout { background: var(--beige); border-left: 4px solid var(--green); padding: 1.4em 1.6em; margin: 2.5em 0; border-radius: 0 6px 6px 0; }
.callout h3 { margin: 0 0 .4em; padding: 0; border: 0; font-size: 1.5rem; }
.callout p { margin: 0; }
.analysis h4 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; color: var(--green); margin: 0 0 .25em; }
.serif { font-family: var(--serif); font-size: 1.25em; line-height: 1.45; color: var(--ink-soft); }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 62ch; }

section { padding-block: clamp(56px, 8vw, 110px); }

/* Nappi */
.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  text-decoration: none;
  padding: .85em 1.8em;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}
.btn:hover { background: #3d4a27; }
.btn-small { padding: .55em 1.2em; font-size: .95rem; }
.btn-outline { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }

/* ---------- Yläpalkki ---------- */
.site-header {
  background: var(--beige);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}
.brand {
  text-decoration: none;
  color: var(--green);
  font-family: var(--serif);
  line-height: 1.15;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
}
.brand .fish { width: 44px; height: auto; fill: none; stroke: var(--green); stroke-width: 7; stroke-linecap: round; }
.brand b { display: block; font-weight: 600; font-size: 1.35rem; }
.brand span { display: block; font-size: 1.05rem; color: var(--ink-soft); }

.nav-toggle {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer;
  font: inherit; color: var(--green); padding: 8px;
}
.nav-toggle .bars { width: 26px; height: 2px; background: var(--green); box-shadow: 0 -7px 0 var(--green), 0 7px 0 var(--green); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; align-items: center; }
.site-nav a.btn { color: #fff; }
.site-nav a.btn:hover { text-decoration: none; }
.site-nav a { text-decoration: none; color: var(--green); font-size: 1rem; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
}
@media (max-width: 899px) {
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--beige); border-top: 1px solid var(--line); }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { display: block; padding: 12px 0; font-family: var(--serif); font-size: 1.4rem; }
  .site-nav a.btn { display: inline-block; font-family: var(--sans); font-size: 1rem; margin-top: 10px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 9vw, 130px) 0 0; text-align: center; overflow-x: clip; }
.hero h1 { margin-bottom: .25em; }
.hero h1::after { display: none; }
.hero .serif { font-size: clamp(1.15rem, 2.4vw, 1.7rem); margin-bottom: 2em; }
.hero-image {
  margin-top: clamp(40px, 6vw, 80px);
  position: relative;
  /* kaareva yläreuna – leveämmäksi kuin näyttö, jotta kaari on loiva */
  width: 124vw;
  margin-left: -12vw;
  height: clamp(300px, 40vw, 560px);
  border-radius: 50% 50% 0 0 / 45% 45% 0 0;
  overflow: hidden;
}
/* Parallaksi: kuva on säiliötä korkeampi ja JS liikuttaa sitä skrollin mukaan */
.hero-image img {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 190%;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, var(--shift, -47%), 0);
  will-change: transform;
}
/* Läpikuultavat kaarirenkaat reunassa */
.hero-image::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border-style: solid;
  border-color: rgba(251, 250, 243, .45);
  border-width: 3vw 3vw 0;
}
@media (max-width: 700px) {
  .hero-image { width: 160vw; margin-left: -30vw; height: clamp(260px, 70vw, 360px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-image img { transform: translate3d(0, -47%, 0); }
}

/* ---------- Kiropraktikko ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (min-width: 820px) { .two-col { grid-template-columns: 5fr 7fr; } }
.two-col figure { margin: 0; }
.two-col figure img { border-radius: 4px; }
.two-col figcaption { font-family: var(--serif); color: var(--ink-soft); font-size: 1.05rem; margin-top: 10px; }

/* ---------- Gonstead-banneri ---------- */
.banner {
  position: relative;
  padding: 0;
  min-height: clamp(220px, 32vw, 420px);
  display: grid;
  place-items: center;
  overflow: hidden;
  clip-path: polygon(0 4%, 100% 0, 100% 88%, 0 100%);
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.banner h2 {
  position: relative;
  color: var(--green);
  margin: 0;
  padding: .3em 1em;
  text-align: center;
  background: rgba(251, 250, 243, .72);
  border-radius: 999px;
  backdrop-filter: blur(3px);
}

.analysis { counter-reset: step; list-style: none; padding: 0; margin: 2em 0 0; }
.analysis li { position: relative; padding: 1.2em 1.2em 1.2em 3.6rem; margin-bottom: .8em; background: var(--beige); border-radius: 6px; }
.analysis li p { margin: 0; }
.analysis li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 1.1rem; top: 1rem;
  font-family: var(--serif); font-size: 2.2rem; color: var(--green); line-height: 1;
}
.refs { font-size: .95rem; color: var(--ink-soft); }

/* ---------- Hinnat ---------- */

.price-list { list-style: none; padding: 0; margin: 2em 0 3em; font-size: 1.15rem; }
.price-list li { margin-bottom: 1em; padding: 1em 1.2em; background: var(--cream); border-radius: 6px; }
.price-list strong { font-weight: 600; }
.prices h3 { margin-top: 1.5em; }
.prices small { display: block; font-size: .95rem; }

/* ---------- Ota yhteyttä ---------- */
.contact .two-col { align-items: center; }
@media (min-width: 820px) { .contact .two-col { grid-template-columns: 6fr 6fr; } }
.contact .phone { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--green); margin: .2em 0 .6em; line-height: 1; }
.contact .phone a { text-decoration: none; color: inherit; }
.contact .phone a:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact .alt { font-size: .95rem; color: var(--ink-soft); margin-top: 1.2em; }

/* ---------- Vastaanotto ---------- */
.visit { background: var(--beige); }
.visit .two-col { align-items: center; }
@media (min-width: 820px) { .visit .two-col { grid-template-columns: 5fr 7fr; } }
.facts { margin: 0 0 1.8em; }
.facts dt { font-family: var(--serif); font-size: 1.3rem; color: var(--green); margin-top: 1em; }
.facts dd { margin: .15em 0 0; }
.map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; display: block; border-radius: 6px; filter: saturate(.7); }

/* ---------- Kasvikuvio ennen footeria ---------- */
.pre-footer { background: var(--sage); position: relative; height: clamp(110px, 16vw, 200px); padding: 0; }
.plants { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: clamp(60px, 9vw, 130px); display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: #f3f2e8; padding: clamp(40px, 6vw, 72px) 0; }
.site-footer .wrap { display: grid; gap: 32px; }
@media (min-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; align-items: end; } }
.site-footer h2 { color: #fff; font-size: 2rem; }
.site-footer a { color: #fff; }
.site-footer p { margin-bottom: .6em; font-size: .95rem; }
.site-footer .legal { font-size: .9rem; }
