/* Kaisa Rahu – personaaltreener. Plain CSS, mobile first. */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #fff8f3;            /* cream */
  --surface: #ffffff;
  --line: #eee2d8;
  --ink: #0f2a3d;           /* deep navy: text, headings */
  --muted: #4a5d6b;
  --accent: #6ec1f2;        /* light blue: button backgrounds. Always navy text on it, never white */
  --accent-hover: #4fb0ea;
  --accent-ink: #0b6fb0;    /* blue for TEXT on light backgrounds: links, years, FAQ +, markers, icon strokes */
  --accent-tint: #dceffc;   /* icon circles, pills */
  --alt-bg: #eef7fd;        /* .section-alt */
  --dark: #0f2a3d;          /* contact section */
  --dark-2: #0a1d2b;        /* footer */
  --focus: #0f2a3d;         /* 3px ring with offset; differs from the button colour */

  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 24px;
  --radius-sm: 14px;
  --radius-photo: 32px;
  --wrap: 1120px;
  --gutter: 20px;
  --header-h: 64px;
  --shadow: 0 1px 2px rgb(15 42 61 / 6%), 0 8px 24px rgb(15 42 61 / 7%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6.6vw, 3.4rem); font-weight: 800; line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

/* Placeholder marker for open items */
.ph { outline: 2px dashed #c9a227; outline-offset: 2px; background: #fff8dc; border-radius: 4px; padding: 0 .2em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 24px;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--ink); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--accent); color: var(--ink); }
.btn-ext::after { content: "↗"; font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 248 243 / 94%);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.logo { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; color: var(--ink); text-decoration: none; line-height: 1.1; margin-right: auto; padding-block: 8px; }
.logo span { display: block; font-family: var(--font-body); font-weight: 600; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.lang { display: flex; gap: 2px; font-weight: 700; font-size: .9rem; }
.lang a, .lang span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px; text-decoration: none; }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--ink); background: var(--accent-tint); }
.lang [aria-current] { color: var(--ink); background: var(--accent-tint); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 700 .9rem var(--font-body); color: var(--ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars { flex: none; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }

.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.site-nav ul { list-style: none; display: flex; flex-direction: column; padding: 8px var(--gutter) 16px; }
.site-nav a { display: flex; align-items: center; min-height: 48px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a:hover { color: var(--accent-ink); }
/* Without JS the toggle is hidden and the nav shows as a scrollable row */
.no-js .nav-toggle { display: none; }
.no-js .site-nav { display: block; order: 10; width: 100%; overflow-x: auto; }
.no-js .site-nav ul { flex-direction: row; gap: 16px; padding: 0 0 8px; }
.no-js .header-inner { flex-wrap: wrap; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .no-js .site-nav { display: block; position: static; width: auto; order: 0; box-shadow: none; border: 0; background: none; overflow: visible; }
  .site-nav ul, .no-js .site-nav ul { flex-direction: row; gap: 4px; padding: 0; }
  .site-nav a { border: 0; min-height: 44px; padding: 0 12px; border-radius: 999px; font-size: .95rem; }
  .site-nav a:hover { background: var(--accent-tint); color: var(--ink); }
  .site-nav .nav-cta { background: var(--accent); color: var(--ink); font-weight: 700; margin-left: 6px; }
  .site-nav .nav-cta:hover { background: var(--accent-hover); color: var(--ink); }
}

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section-alt { background: var(--alt-bg); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.lead { font-size: 1.15rem; color: var(--muted); }

@media (min-width: 768px) { .section { padding-block: 96px; } :root { --gutter: 32px; } }

/* ---------- Hero ---------- */
.hero { padding-block: 32px 56px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hero .lead { max-width: 34em; margin-bottom: 1.4em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.photo-frame {
  position: relative; aspect-ratio: 4 / 5; width: 100%; max-width: 440px; margin-inline: auto;
  border-radius: var(--radius-photo); overflow: hidden; background: var(--dark);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.photo-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 100%; padding: 24px; text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgb(255 255 255 / 12%), transparent 55%),
    linear-gradient(160deg, var(--dark) 0%, #1f5f8b 100%);
  color: #fff; border: 2px dashed rgb(255 255 255 / 45%); border-radius: inherit;
}
.photo-placeholder .mono { font-family: var(--font-head); font-size: 4.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.photo-placeholder small { font-size: .85rem; opacity: .85; }

@media (min-width: 900px) {
  .hero { padding-block: 56px 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; }
}

/* ---------- Specialties ---------- */
.cards { list-style: none; display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--muted); }
.card p a { white-space: nowrap; }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); margin-bottom: 16px; }
.card-icon svg { width: 24px; height: 24px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Prices ---------- */
.prices { display: grid; gap: 16px; }
.price-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); }
.price-card h3 { font-size: 1.3rem; margin-bottom: .4em; }
.price-list { margin: 0; }
.price-list div { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 480px) { .price-list div { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 16px; } }
.price-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.price-list dd { margin: 0; white-space: nowrap; }
@media (min-width: 480px) { .price-list dd { text-align: right; } }
.price-list dd strong { font-size: 1.1rem; }
.price-note { margin: 20px 0 0; color: var(--muted); font-size: .95rem; }
@media (min-width: 800px) { .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } .price-card { padding: 24px; } }

/* ---------- Locations ---------- */
.gyms { display: grid; gap: 16px; }
.gym { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); }
.gym h3 { font-size: 1.3rem; margin-bottom: .15em; }
.gym-addr { color: var(--muted); margin-bottom: .2em; }
.gym-map { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.gym-cta { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.gym-cta .btn { width: 100%; }
.booking-fallback { margin: 24px 0 0; color: var(--muted); }
@media (min-width: 1000px) {
  .gyms { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  /* Subgrid lines up name, address, map link and button across the three cards */
  .gym { padding: 24px; display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .gym-map { justify-self: start; align-self: start; }
  .gym-cta { margin-top: 0; align-self: end; }
}

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding: 24px 24px 24px 80px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
  content: counter(step); position: absolute; left: 24px; top: 22px;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font: 800 1.1rem var(--font-head);
}
.steps h3 { margin-bottom: .25em; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { padding: 80px 24px 24px; }
  .steps li::before { left: 24px; top: 24px; }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: 32px; }
.about-grid .photo-frame { aspect-ratio: 1 / 1; max-width: 360px; margin: 0; }
.about-bio p { font-size: 1rem; line-height: 1.65; margin: 0 0 .9em; max-width: 65ch; }
.about-bio p:last-child { margin-bottom: 0; }
.about-list { list-style: none; display: grid; gap: 10px; margin-top: 8px; }
.about-list li { padding-left: 28px; position: relative; }
.about-list li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent-ink); transform: rotate(45deg); }
.about-details { display: grid; gap: 28px; }
.about-details h3 { margin-bottom: .5em; }
.xp { list-style: none; display: grid; gap: 12px; }
.xp strong { display: block; color: var(--accent-ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 640px) {
  .xp li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; }
}
@media (min-width: 1000px) {
  .about-details { grid-template-columns: 1fr 1.9fr; gap: 56px; }
}
.about-details { margin: 0; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 360px 1fr; gap: 40px 56px; align-items: start; }
  .about-details { grid-column: 1 / -1; }
}
/* Desktop: photo sticks at the top of its column while the long bio + details scroll past */
@media (min-width: 1000px) {
  .about-grid .photo-frame { grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 24px); }
  .about-details { grid-column: 2; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 14px 20px; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 700 1.5rem/1 var(--font-head); color: var(--accent-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--dark); color: #fff; }
.contact h2 { color: #fff; }
.contact .lead { color: rgb(255 255 255 / 85%); }
.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.contact .btn-light { background: var(--accent); color: var(--ink); }
.contact .btn-light:hover { background: var(--accent-hover); color: var(--ink); }
.contact .btn-outline-light { border-color: #fff; color: #fff; }
.contact .btn-outline-light:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.contact :focus-visible { outline-color: #fff; }
.contact .ph { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-2); color: rgb(255 255 255 / 80%); padding-block: 28px; font-size: .95rem; }
.site-footer a { color: #fff; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 32px; }

/* ---------- Legal (privacy) pages ---------- */
.legal { padding-block: 48px 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { font-size: 1.4rem; margin-top: 1.8em; }
.legal ul { padding-left: 1.3em; margin-bottom: 1em; }
.legal li { margin-bottom: .3em; }
.legal table { width: 100%; border-collapse: collapse; margin-bottom: 1em; font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { background: var(--alt-bg); }
.legal .updated { color: var(--muted); font-size: .9rem; }
