/* akustilisedplaadid.ee – rabast seinale */

@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(../fonts/familjen-grotesk-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: "Familjen Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(../fonts/familjen-grotesk-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+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(../fonts/source-serif-4-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: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(../fonts/source-serif-4-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+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url(../fonts/source-serif-4-latin-wght-italic.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+2000-206F;
}

:root {
  --sammal: #eef1ea;      /* page background, pale lichen */
  --paber: #f8f9f5;       /* raised surfaces */
  --turvas: #2b211b;      /* text, peat brown */
  --turvas-2: #5b5049;    /* secondary text */
  --raba: #34453a;        /* deep bog green */
  --raba-2: #4d6152;
  --johvikas: #9e2f3c;    /* cranberry accent */
  --johvikas-tume: #7f2330;
  --joon: #c9d0c2;        /* rules and borders */
  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mõõt: 66ch;
  --laius: 76rem;
  --serv: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light;
}

*, *::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(--sammal);
  color: var(--turvas);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  /* servast servani plokid (100vw) ei tohi tekitada horisontaalset kerimisriba */
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--johvikas); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--johvikas-tume); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--johvikas); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.25rem); font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin-top: 2.2em; }
h3 { font-size: 1.3rem; margin-top: 1.8em; }
p, ul, ol, dl { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
li::marker { color: var(--raba-2); }
strong { font-weight: 650; }

.skip { position: absolute; left: -999px; top: 0; background: var(--turvas); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--laius); margin: 0 auto; padding: 0 var(--serv); }

/* Header */
.site-head { border-bottom: 1px solid var(--joon); background: var(--sammal); }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.wordmark {
  font-family: var(--sans); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--turvas); text-decoration: none; line-height: 1.05; display: flex; align-items: center; gap: 0.6rem;
}
.wordmark:hover { color: var(--turvas); }
.wordmark svg { flex: none; }
.wordmark small { display: block; font-weight: 450; color: var(--turvas-2); font-size: 0.78rem; letter-spacing: 0; }
.nav { margin-left: auto; font-family: var(--sans); font-size: 0.98rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; align-items: center; }
.nav li { margin: 0; }
.nav a { color: var(--turvas); text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--joon); }
.nav a[aria-current="page"] { border-bottom-color: var(--johvikas); }
.menu-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 0.95rem 1.35rem; border-radius: 3px; text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn-main { background: var(--johvikas); color: #fff; }
.btn-main:hover { background: var(--johvikas-tume); color: #fff; }
.btn-line { border-color: var(--turvas); color: var(--turvas); background: transparent; }
.btn-line:hover { background: var(--turvas); color: var(--sammal); }
.nav .btn { padding: 0.7rem 1rem; color: #fff; border-bottom: 0; }
.nav .btn:hover { color: #fff; }

@media (max-width: 62rem) {
  .nav { position: relative; }
  .js .menu-toggle {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font: 600 1rem var(--sans); color: var(--turvas);
    padding: 0.6rem 0.9rem; border: 1px solid var(--joon); border-radius: 3px; background: var(--paber);
  }
  html:not(.js) .site-head .wrap { flex-wrap: wrap; padding-bottom: 0.8rem; }
  html:not(.js) .nav { margin-left: 0; width: 100%; }
  html:not(.js) .nav ul { flex-wrap: wrap; gap: 0.4rem 1.2rem; }
  .js .nav ul {
    position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 5; flex-direction: column; align-items: stretch;
    gap: 0; min-width: 16rem; background: var(--paber); border: 1px solid var(--joon); border-radius: 3px; padding: 0.4rem;
    box-shadow: 0 12px 30px rgba(43, 33, 27, 0.14);
  }
  .js .nav ul a { display: block; padding: 0.7rem 0.8rem; border-bottom: 0; }
  .js .nav ul a[aria-current="page"] { background: var(--sammal); }
  .js .nav li:last-child { padding: 0.4rem; }
  .js .nav .btn { display: flex; }
  .js .nav:not(.open) ul { display: none; }
}

/* Home hero */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero .lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); max-width: 34ch; color: var(--turvas-2); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.hero figure { margin: 0; }
.hero figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.hero figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--turvas-2); margin-top: 0.6rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 2rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--joon); font-family: var(--sans); font-size: 0.95rem; list-style: none; }
.facts li { margin: 0; }
.facts b { font-weight: 700; }
@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero figure img { aspect-ratio: 4 / 3; }
}

/* Page header (subpages) */
.page-head { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2rem); }
.crumbs { font-family: var(--sans); font-size: 0.92rem; color: var(--turvas-2); margin-bottom: 1.2rem; }
.crumbs a { color: var(--turvas-2); }
.crumbs span[aria-hidden] { margin: 0 0.4rem; }
.page-head h1 { font-size: clamp(2.3rem, 6vw, 4.25rem); max-width: 18ch; }
.page-head .lead { font-size: clamp(1.15rem, 1.8vw, 1.3rem); color: var(--turvas-2); max-width: 46ch; margin: 0; }
.page-hero { margin: 0 0 clamp(2rem, 5vw, 3.5rem); }
.page-hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 4px; }
@media (max-width: 40rem) { .page-hero img { aspect-ratio: 4 / 3; } }

/* Article body */
.prose { max-width: var(--mõõt); }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.content { padding-bottom: clamp(3rem, 7vw, 5rem); }
.content > .wrap > .prose:first-child > :first-child { margin-top: 0; }

/* Galleries: break out of the reading column */
.gallery { margin: 2.2rem 0 2.6rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; max-width: var(--laius); }
.gallery figure, .figure { margin: 0; }
.gallery a { display: block; border-radius: 4px; overflow: hidden; background: var(--joon); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.4s ease; }
.gallery a:hover img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } .gallery a:hover img { transform: none; } }
.gallery figcaption, .figure figcaption { font-family: var(--sans); font-size: 0.88rem; color: var(--turvas-2); margin-top: 0.45rem; line-height: 1.35; }
@media (max-width: 40rem) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.figure { margin: 2.2rem 0; max-width: 52rem; }
.figure img { width: 100%; border-radius: 4px; }

/* Raba feature band */
.raba {
  background: var(--raba); color: #e8ece4; margin: 3.5rem calc(50% - 50vw); padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.raba .inner { max-width: var(--laius); margin: 0 auto; padding: 0 var(--serv); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; }
.raba h2 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4.25rem); letter-spacing: -0.035em; line-height: 0.98; margin: 0 0 0.45em; }
.raba p { max-width: 44ch; }
.raba a { color: #fff; }
.raba .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; align-items: start; }
.raba .pair figure { margin: 0; min-width: 0; }
.raba .pair img { width: 100%; border-radius: 4px; object-fit: cover; aspect-ratio: 4 / 5; }
.raba figcaption { font-family: var(--sans); font-size: 0.85rem; color: #b9c4b5; margin-top: 0.45rem; }
.raba .props { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.5rem; font-family: var(--sans); font-size: 0.98rem; }
.raba .props li { margin: 0; padding-top: 0.7rem; border-top: 1px solid var(--raba-2); }
.raba .props b { display: block; color: #fff; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
@media (max-width: 52rem) { .raba .inner { grid-template-columns: 1fr; } }

/* Specs */
.specs { margin: 3rem 0; max-width: 52rem; background: var(--paber); border: 1px solid var(--joon); border-radius: 4px; padding: clamp(1.3rem, 3vw, 2rem); }
.specs h2 { margin: 0 0 1rem; font-size: 1.5rem; }
.specs dl { display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; margin: 0; font-size: 1.02rem; }
.specs dt, .specs dd { margin: 0; padding: 0.6rem 0; border-top: 1px solid var(--joon); }
.specs dt { font-family: var(--sans); font-weight: 600; padding-right: 1rem; }
.specs .more { margin: 1.2rem 0 0; font-family: var(--sans); }
@media (max-width: 34rem) { .specs dl { grid-template-columns: 1fr; } .specs dd { border-top: 0; padding-top: 0; } }

/* Photobank strip */
.photobank { margin: 3.5rem 0; }
.photobank .strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(12rem, 16rem); gap: 0.8rem; overflow-x: auto; padding-bottom: 0.8rem; scroll-snap-type: x mandatory; }
.photobank figure { margin: 0; scroll-snap-align: start; }
.photobank img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.photobank figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--turvas-2); margin-top: 0.35rem; }

/* FAQ */
.faq { max-width: var(--mõõt); }
.faq details { border-top: 1px solid var(--joon); }
.faq details:last-of-type { border-bottom: 1px solid var(--joon); }
.faq summary {
  font-family: var(--sans); font-weight: 600; font-size: 1.2rem; line-height: 1.3; cursor: pointer; list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h2 { font: inherit; letter-spacing: -0.01em; margin: 0; display: inline; }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 1.45rem; width: 0.7rem; height: 0.7rem;
  border-right: 2px solid var(--johvikas); border-bottom: 2px solid var(--johvikas); transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(225deg); top: 1.75rem; }
.faq .answer { padding: 0 0 1.2rem; }
.faq .answer > :last-child { margin-bottom: 0; }

/* Related pages */
.related { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--joon); max-width: var(--mõõt); }
.related h2 { font-size: 1.25rem; margin: 0 0 0.8rem; }
.related ul { list-style: none; padding: 0; margin: 0; font-family: var(--sans); }
.related li { margin: 0; }
.related a { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--joon); text-decoration: none; color: var(--turvas); }
.related a:hover { color: var(--johvikas); }

/* Inquiry form */
.inquiry { background: var(--paber); border-top: 1px solid var(--joon); padding: clamp(3rem, 7vw, 5rem) 0; scroll-margin-top: 1rem; }
.inquiry .wrap { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 4.5rem); }
.inquiry h2 { margin-top: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }
.inquiry .side p { max-width: 38ch; color: var(--turvas-2); }
.inquiry .side ul { padding-left: 1.1em; color: var(--turvas-2); }
form.ask { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; font-family: var(--sans); }
form.ask .full { grid-column: 1 / -1; }
form.ask label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
form.ask label span { font-weight: 400; color: var(--turvas-2); }
form.ask input, form.ask textarea, form.ask select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--turvas); background: #fff;
  border: 1px solid #aab3a3; border-radius: 3px; padding: 0.75rem 0.85rem;
}
form.ask textarea { min-height: 8.5rem; resize: vertical; }
form.ask input:focus, form.ask textarea:focus, form.ask select:focus { outline: 3px solid var(--johvikas); outline-offset: 0; border-color: var(--johvikas); }
form.ask .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.ask .note { font-size: 0.88rem; color: var(--turvas-2); margin: 0; }
form.ask .send { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.notice { font-family: var(--sans); padding: 1rem 1.2rem; border-radius: 3px; margin-bottom: 1rem; grid-column: 1 / -1; }
.notice.error { background: #f6e3e5; border: 1px solid #d9a4ab; color: var(--johvikas-tume); }
@media (max-width: 52rem) { .inquiry .wrap { grid-template-columns: 1fr; } }
@media (max-width: 34rem) { form.ask { grid-template-columns: 1fr; } }

/* Footer */
.site-foot { background: var(--turvas); color: #d9d2cb; padding: 3rem 0 2rem; font-family: var(--sans); font-size: 0.98rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.site-foot a { color: #fff; }
.site-foot h2 { font-size: 1rem; color: #fff; margin: 0 0 0.8rem; letter-spacing: 0; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 0.45rem; }
.site-foot p { max-width: 36ch; }
.site-foot .base { grid-column: 1 / -1; max-width: none; border-top: 1px solid #4a3d34; padding-top: 1.2rem; margin-top: 1rem; font-size: 0.88rem; color: #a99d93; }
@media (max-width: 52rem) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* Consent banner */
.consent {
  position: fixed; z-index: 20; left: max(1rem, env(safe-area-inset-left, 0px)); bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  max-width: 30rem; margin-right: 1rem; background: var(--paber); color: var(--turvas);
  border: 1px solid var(--joon); border-radius: 4px; padding: 1.1rem 1.2rem;
  box-shadow: 0 14px 40px rgba(43, 33, 27, 0.18); font-family: var(--sans); font-size: 0.95rem; line-height: 1.45;
}
.consent p { margin: 0 0 0.9rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.consent .btn { padding: 0.7rem 1.1rem; font-size: 0.95rem; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1600px); max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(23, 18, 14, 0.88); }
dialog.lightbox img { max-height: 86vh; width: auto; margin: 0 auto; border-radius: 3px; }
dialog.lightbox p { color: #eee; font-family: var(--sans); text-align: center; margin: 0.6rem 0 0; }
dialog.lightbox button {
  position: fixed; font: 600 1rem var(--sans); background: #fff; color: var(--turvas);
  border: 0; border-radius: 3px; cursor: pointer;
}
dialog.lightbox .lb-close { top: 1rem; right: 1rem; padding: 0.6rem 0.9rem; }
dialog.lightbox .lb-nav {
  top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%;
  font-size: 2rem; line-height: 1; padding: 0 0 0.2rem; background: rgba(255, 255, 255, 0.92);
}
dialog.lightbox .lb-prev { left: max(1rem, env(safe-area-inset-left, 0px)); }
dialog.lightbox .lb-next { right: max(1rem, env(safe-area-inset-right, 0px)); }
dialog.lightbox .lb-nav:hover { background: #fff; }
dialog.lightbox button[hidden] { display: none; }
@media (max-width: 40rem) {
  dialog.lightbox .lb-nav { top: auto; bottom: 1rem; transform: none; }
}

/* Thank-you / 404 */
.plain { padding: clamp(3rem, 8vw, 6rem) 0; min-height: 50vh; }
.plain .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
