/* ==========================================================================
   Äänipaja design system
   1 Tokens   2 Base   3 Layout   4 Components   5 Page parts
   Muokkaa värejä ja mittoja vain tokeneista, komponentit lukevat ne täältä.
   ========================================================================== */

/* 1 Tokens ---------------------------------------------------------------- */
:root {
  /* color: supplied teals (003135, 024950, 0FA4AF, AFDDE5) with a rose accent, plus a pale aqua paper derived from them */
  --paper: #e8f3f5;        /* page background (AFDDE5 lightened) */
  --surface: #f6fbfc;      /* cards, inputs */
  --ink: #003135;          /* text, footer, dark panels */
  --deep: #024950;         /* second dark: full-width dark sections */
  --muted: #355a5e;        /* secondary text */
  --line: #bcd8dd;         /* hairlines */
  --line-strong: #7fa3aa;  /* input borders */
  --accent: #e28090;       /* actions (rose); text on it is --on-accent */
  --on-accent: #003135;    /* text on rose */
  --accent-deep: #024950;  /* focus rings, small accents on light backgrounds (deep teal) */
  --teal: #0fa4af;         /* bright teal: checkmarks, highlight tile; text on it is --ink */
  --tint: #afdde5;         /* aqua tint for sections and tiles */
  --on-ink: #f3fafb;       /* text on dark */
  --on-ink-muted: #9ccdd6; /* secondary text on dark */
  --wave-raw: #3f858c;     /* waveform: untouched audio */
  --wave-cut: #e28090;     /* waveform: removed (same rose as the accent) */
  --wave-ok: #afdde5;      /* waveform: kept */

  /* type */
  --font: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;

  /* space (rem) */
  --sp-1: .5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2.5rem; --sp-5: 4rem; --sp-6: 6rem;

  /* shape: three radii with distinct jobs */
  --r-s: .4rem;   /* inputs, links, tags */
  --r-m: .65rem;  /* buttons, nav */
  --r-l: 1rem;    /* cards, panels, photos */

  --max: 72rem;
}

/* Oman fontin voi ladata näin (woff2 palvelimelta, ei Google Fontsia):
@font-face { font-family: "Oma"; src: url("/assets/fonts/oma.woff2") format("woff2"); font-display: swap; }
ja lisää "Oma" --font-listan alkuun. */

/* 2 Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { font: 1.0625rem/1.6 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg, audio { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em; }
h1, h2, h3 { font-weight: 700; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.25rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -.02em; }
p { max-width: var(--measure); }
p + p { margin-top: 1em; }
small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--sp-2); top: var(--sp-2); z-index: 20; background: var(--surface); padding: var(--sp-1) var(--sp-2); border-radius: var(--r-s); }
.muted { color: var(--muted); }

/* 3 Layout ---------------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.section { padding-block: var(--sp-6); }
.section--tight { padding-block: var(--sp-4); }
.section--tint { background: var(--tint); }
.section--ink { background: var(--deep); color: var(--on-ink); }
.section--ink .muted { color: var(--on-ink-muted); }

.split { display: grid; gap: var(--sp-3) var(--sp-5); }
@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .split--form { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* 4 Components ------------------------------------------------------------ */

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 650; padding: .8em 1.5em; border: 2px solid transparent; border-radius: var(--r-m); text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--ink); color: var(--on-ink); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--on-ink); }
.btn--ink { background: var(--ink); color: var(--on-ink); }
.btn--ink:hover { background: var(--surface); color: var(--ink); }
.btn--sm { padding: .55em 1.1em; font-size: .95rem; }
.btn--block { display: flex; width: 100%; margin-top: auto; }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 750; font-size: 1.3rem; letter-spacing: -.035em; text-decoration: none; margin-right: auto; }
.brand__mark { width: 1.6rem; height: 1.6rem; fill: var(--accent); }
.nav { display: flex; gap: .1rem; padding: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r-m) + .25rem); order: 3; width: 100%; }
.nav a { padding: .45rem 1rem; border-radius: var(--r-m); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav a { flex: 1 1 auto; text-align: center; padding-inline: .25rem; font-size: clamp(.72rem, 3.3vw, .85rem); }
.nav a:hover { background: var(--tint); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
@media (min-width: 52rem) {
  .nav { order: 0; width: auto; }
  .nav a { flex: none; padding-inline: 1rem; font-size: .95rem; }
  .brand { margin-right: 0; flex: 1; }
  .bar__cta { order: 1; flex: 1; justify-content: center; max-width: max-content; margin-left: auto; }
}

/* hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem); }
.hero--page { padding-bottom: var(--sp-3); }
.hero--page + .section { padding-top: var(--sp-5); }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.5; color: var(--muted); margin-top: var(--sp-3); max-width: 46ch; }
.hero--page .lead { max-width: 56ch; }
.hero__grid { display: grid; gap: var(--sp-5) var(--sp-4); align-items: center; }
@media (min-width: 60rem) { .hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.hero__text h1 { max-width: 14ch; }

/* wave visual: the one memorable element */
.wavecard { background: var(--ink); color: var(--on-ink); border-radius: var(--r-l); padding: var(--sp-3); display: grid; gap: var(--sp-3); }
.wavecard__label { font-size: .875rem; font-weight: 600; color: var(--on-ink-muted); margin-bottom: .4rem; }
.wave { width: 100%; height: 5.5rem; }
.wave .keep { fill: var(--wave-raw); }
.wave .cut { fill: var(--wave-cut); }
.wave .ok { fill: var(--wave-ok); }
.wave--edited .ok { transform-box: fill-box; transform-origin: center; animation: grow .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 14ms + .2s); }
@keyframes grow { from { transform: scaleY(0); } }
.wavecard__cap { font-size: .875rem; color: var(--on-ink-muted); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
@media (max-width: 40rem) { .wavecard__cap .key--ok { margin-left: 0; } }
.key { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; }
.key--cut { background: var(--wave-cut); }
.key--ok { background: var(--wave-ok); }
.wavecard__cap .key--ok { margin-left: .5rem; }

/* bento: service tiles of different weight */
.bento { display: grid; gap: var(--sp-2); margin-top: var(--sp-4); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tile { grid-column: span 6; display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) var(--sp-3); border-radius: var(--r-l); text-decoration: none; min-height: 15rem; border: 1px solid transparent; }
.tile h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.tile p { color: inherit; opacity: .82; }
.tile__price { font-size: 1.7rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; opacity: 1 !important; }
.tile__price small { font-size: .9rem; font-weight: 500; letter-spacing: 0; margin-left: .35rem; opacity: .75; }
/* legacy class names kept so the HTML needs no changes: lilac = aqua tint, mint = bright teal */
.tile--lilac { background: var(--tint); }
.tile--mint { background: var(--teal); color: var(--ink); }
.tile--white { background: var(--surface); border-color: var(--line); }
a.tile:hover { border-color: var(--ink); }
a.tile:hover h3 { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .2em; }
@media (min-width: 48rem) {
  .tile--wide { grid-column: span 4; }
  .tile--narrow { grid-column: span 2; }
  .tile--half { grid-column: span 3; }
  .tile { padding: var(--sp-4); }
}

/* photos: real studio images, used sparingly */
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: var(--r-l); background: var(--line); }
.photo--side { margin-top: var(--sp-3); max-width: 24rem; }
.photo--wide figcaption { margin-top: var(--sp-1); font-size: .9rem; color: var(--muted); }
.split + .photo--wide { margin-top: var(--sp-5); }
.section--photo { padding-block: 0 var(--sp-6); }

/* process: a real sequence, so numbered */
.steps { list-style: none; padding: 0; display: grid; gap: var(--sp-3); counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; column-gap: var(--sp-2); }
.steps li::before { content: counter(step); grid-row: span 2; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-weight: 700; }
.steps h3 { align-self: center; }
.steps p { grid-column: 2; color: var(--muted); margin-top: .25rem; }

/* people */
.people { display: grid; gap: var(--sp-3); }
@media (min-width: 40rem) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.person h3 { margin-bottom: .4rem; }
.person p { color: var(--muted); }
.person--card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--sp-4) var(--sp-3); }
.person--card h2 { font-size: 1.75rem; margin-bottom: var(--sp-2); }
.person--card p:not(.tag) { color: var(--ink); }

/* small label that states the situation a block applies to */
.tag { display: inline-block; margin-top: var(--sp-2); padding: .3rem .8rem; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; color: var(--ink); }
.section--tint .tag { border-color: transparent; }
.person--card .tag { margin: 0 0 var(--sp-2); background: var(--tint); border-color: transparent; }

/* facts (dark section) */
.facts { display: grid; gap: var(--sp-3); }
.facts > div { padding-top: var(--sp-2); border-top: 1px solid rgba(255, 255, 255, .25); }
.facts dt { font-weight: 700; font-size: 1.15rem; }
.facts dd { color: var(--on-ink-muted); margin-top: .2rem; }

/* price rows: a list where each row is a price */
.price-rows { list-style: none; padding: 0; margin-top: var(--sp-3); border-top: 1px solid var(--ink); max-width: none; }
.price-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding-block: var(--sp-2); border-bottom: 1px solid var(--line); }
.price-rows span { font-weight: 650; }
.price-rows span small { display: block; font-weight: 400; color: var(--muted); margin-top: .1rem; }
.price-rows b { font-size: 1.35rem; letter-spacing: -.02em; text-align: right; white-space: nowrap; }
.price-rows b small { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.price-rows + p { margin-top: var(--sp-3); }
.price-note { font-size: .9rem; color: var(--muted); margin-top: var(--sp-2); max-width: none; }

/* tiers: comparable packages */
.tiers { display: grid; gap: var(--sp-2); margin-top: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.tier { display: flex; flex-direction: column; gap: var(--sp-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--sp-4) var(--sp-3); }
.tier__price { font-size: 2.6rem; font-weight: 750; letter-spacing: -.045em; line-height: 1; }
.tier__price small { display: block; font-size: .9rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: .35rem; }
.tier__lead { font-weight: 650; margin-top: .5rem; }
.tier .ticks { margin-bottom: var(--sp-2); }

/* checklist */
.ticks { list-style: none; padding: 0; display: grid; gap: .55rem; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l3 3 5-6' fill='none' stroke='%23003135' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }
@media (min-width: 40rem) { .ticks--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 2rem; } }

/* FAQ */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: var(--sp-2); padding-block: var(--sp-3); font-weight: 650; font-size: 1.1rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent-deep); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--sp-3); color: var(--muted); }

/* closing call to action */
.cta { background: var(--accent); color: var(--on-accent); border-radius: var(--r-l); padding: clamp(2rem, 6vw, 4.5rem) var(--sp-3); text-align: center; display: grid; justify-items: center; gap: var(--sp-2); }
.cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.04em; }
.cta p { margin-bottom: var(--sp-2); }

/* samples (shown once audio exists) */
.samples { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
.sample { border-top: 1px solid rgba(255, 255, 255, .25); padding-top: var(--sp-2); display: grid; gap: var(--sp-1); }
.sample figcaption { display: grid; }
.sample figcaption span { color: var(--on-ink-muted); }
.sample audio { width: 100%; }

/* forms */
.form { display: grid; gap: var(--sp-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--sp-3); }
.form label { display: grid; gap: .4rem; font-weight: 600; }
.form input, .form textarea { font: inherit; font-weight: 400; padding: .75em .9em; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--paper); color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 3px solid var(--accent-deep); outline-offset: 1px; border-color: var(--accent-deep); }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -999px; }
.contact p + p { margin-top: .5rem; }
.contact h2 { margin-bottom: var(--sp-2); }
.contact .muted { margin-top: var(--sp-2); }

/* footer */
.site-footer { background: var(--ink); color: var(--on-ink); padding-top: var(--sp-5); }
.footer__grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.footer__brand { font-size: 1.5rem; font-weight: 750; letter-spacing: -.035em; margin-bottom: .4rem; }
.footer__h { font-size: .95rem; font-weight: 650; letter-spacing: 0; color: var(--on-ink-muted); margin-bottom: var(--sp-1); }
.footer__list { list-style: none; padding: 0; display: grid; gap: .4rem; }
.footer__legal { padding-block: var(--sp-4) var(--sp-3); color: var(--on-ink-muted); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  .wave--edited .ok { animation: none; }
  .faq summary::after { transition: none; }
}

/* squircle corners where supported (Chromium today); other browsers keep the plain rounded corners above.
   A squircle reads tighter than a circular arc, so the radii go up a little to look the same size. */
@supports (corner-shape: squircle) {
  :root { --r-s: .55rem; --r-m: .9rem; --r-l: 1.5rem; }
  .btn, .nav, .nav a, .tag, .wavecard, .tile, .photo img, .person--card, .tier, .cta, .form, .form input, .form textarea,
  .steps li::before, .ticks li::before, .skip:focus { corner-shape: squircle; }
}
