/* karlmadis.ee — staatiline sait.
   Välimus on võetud üle senise Joomla/T4 lehe mõõdetud arvutatud stiilidest
   (Architects Daughter 20/30 px, kitarritaust, sinine #267ffd, hall päis).
   Ainus stiilifail: inline-stiile ei ole (CSP style-src 'self'). */

/* ---- fondid (ise hostitud, SIL OFL) ---- */
@font-face { font-family: "Architects Daughter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/AD-400-latin-ext.woff2") format("woff2");
  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: "Architects Daughter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/AD-400-latin.woff2") format("woff2");
  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: "Lora"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/Lora-400-latin-ext.woff2") format("woff2");
  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: "Lora"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/Lora-400-latin.woff2") format("woff2");
  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: "Lora"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/Lora-500-latin-ext.woff2") format("woff2");
  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: "Lora"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/Lora-500-latin.woff2") format("woff2");
  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: "Lora"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/Lora-600-latin-ext.woff2") format("woff2");
  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: "Lora"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/Lora-600-latin.woff2") format("woff2");
  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; }

/* ---- toonid (mõõdetud vanalt lehelt) ---- */
:root {
  --tekst: #212529;
  --pais: #323748;
  --link: #267ffd;
  --link-hover: #0056b3;
  --joon: rgba(68, 74, 94, .12);
  --riba: #f9f9fa;
  --riba-joon: #f0f1f4;
  --nupp: #6e7489;
  --yles: #b7bbc9;
  --kiri: "Architects Daughter", "Segoe Print", "Bradley Hand", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 20px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--tekst); font: 400 20px/30px var(--kiri); }
.site { min-height: 100vh; background: #fff url("../images/WPGuitar3.webp") repeat center top; }
img { max-width: 100%; }
img:not(.album-kaas) { height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; }
strong { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* ---- konteiner (Bootstrap 4 laiused, nagu T4) ---- */
.container { width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1152px; } }
.row { display: flex; flex-wrap: wrap; margin: 0 -20px; }

/* ---- päis: mobiil (< 992 px): riba hamburger vasakul, logo keskel, menüü rippub alla ---- */
.site-header { position: relative; border-bottom: 1px solid var(--joon); color: var(--pais); background: var(--riba); }
.site-header .row { display: flex; align-items: center; flex-wrap: nowrap; margin: 0; }
.header-block { order: 1; flex: 0 0 auto; padding: 0 4px 0 14px; }
.brand { order: 2; flex: 1 1 auto; text-align: center; padding: 11px 0; background: none; border: 0; }
.site-header .row::after { content: ""; order: 3; flex: 0 0 50px; }  /* tasakaalustab hamburgeri, hoiab logo keskel */
.brand a { display: inline-block; line-height: 0; }
.brand img { width: 132px; height: auto; }
.nav-toggle { display: block; width: 36px; height: 48px; margin: 0; padding: 0; border: 0; background: none; color: var(--nupp); cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; fill: currentColor; vertical-align: middle; }
.nav-toggle:hover, .nav-toggle:focus { color: var(--pais); }
.main-nav { position: absolute; top: 100%; left: 0; right: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--joon); box-shadow: 0 10px 22px rgba(0, 0, 0, .09); padding: 4px 20px 10px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.main-nav a { display: block; padding: 13px 2px; font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: .32px; text-transform: uppercase; color: var(--pais); border-bottom: 1px solid var(--riba-joon); }
.main-nav li:last-child a { border-bottom: 0; }
.main-nav a:hover, .main-nav a:focus { color: var(--link-hover); text-decoration: none; }
.main-nav a[aria-current="page"], .main-nav a.aktiivne { color: var(--link); }
.js .main-nav { display: none; }
.js .nav-open .main-nav { display: block; }

/* ---- päis: töölaud (>= 992 px): logo vasakul, menüü ühel real paremal ---- */
@media (min-width: 992px) {
  .site-header { padding: 20px 0; background: none; }
  .site-header .row::after { display: none; }
  .brand { order: 0; flex: 0 0 auto; max-width: 16.6667%; padding: 5px 20px; text-align: left; align-self: center; }
  .brand img { width: 140px; height: 60px; }
  .header-block { order: 0; flex: 1 1 auto; max-width: none; padding: 0 20px; align-self: center; }
  .nav-toggle { display: none; }
  .main-nav { position: static; z-index: auto; background: none; border: 0; box-shadow: none; padding: 0; }
  .js .main-nav { display: block; }
  .main-nav ul { flex-direction: row; flex-wrap: nowrap; justify-content: flex-end; gap: 2px; }
  .main-nav a { padding: 10px 9px; white-space: nowrap; border-bottom: 0; }
}

/* ---- sisu ---- */
.site-main { padding: 20px 0; }
@media (min-width: 768px) { .site-main { padding: 60px 0; } }
.page-title { font-size: 20px; line-height: 24px; font-weight: 600; text-transform: uppercase; margin: 20px 0; }
.article { margin: 20px 0; }
.article::after { content: ""; display: block; clear: both; }
.article p { margin: 0 0 20px; }
.article-h1 { font-size: 2.5rem; line-height: 1.2; font-weight: 500; margin: 1rem 0 .5rem; }
@media (max-width: 1200px) { .article-h1 { font-size: calc(1.375rem + 1.5vw); } }
.photo-right { float: right; }
.foot-line { border-top: 2px solid var(--joon); margin-top: 40px; padding-top: 40px; }
.contact { font-size: 22px; }

/* ---- üles-nupp ---- */
.to-top { position: fixed; right: 40px; bottom: 20px; width: 36px; height: 36px; border-radius: 50%; background: var(--yles); color: #fff; text-align: center; line-height: 34px; display: none; z-index: 50; }
.to-top:hover, .to-top:focus { background: var(--link); color: #fff; text-decoration: none; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.top-away .to-top { display: block; }

/* ---- albumid ---- */
.albums { display: grid; grid-template-columns: 228fr 234fr 247fr; max-width: 696px; margin: 0 auto; }
.albums figure { margin: 0; padding: 1px; text-align: center; }
.albums img { display: block; margin: 0 auto; }
.albums figcaption { min-height: 62px; display: flex; align-items: center; justify-content: center; padding: 1px; }
@media (max-width: 719px) { .albums { grid-template-columns: 1fr 1fr; max-width: 480px; } }
@media (max-width: 479px) { .albums { grid-template-columns: 1fr; max-width: 260px; } }

.album-dialog { width: min(95vw, 960px); max-height: 95vh; margin: auto; padding: 0; border: 1px solid rgba(0, 0, 0, .3); border-radius: 6px; box-shadow: 0 3px 7px rgba(0, 0, 0, .3); background: #fff; color: var(--tekst); font: 400 20px/30px var(--kiri); overflow: auto; }
.album-dialog::backdrop { background: rgba(0, 0, 0, .8); }
.album-dialog .dialog-inner { position: relative; padding: 20px 40px 10px 25px; }
.album-dialog .close { position: absolute; top: 4px; right: 6px; width: 30px; height: 30px; padding: 0; border: 0; background: none; color: #666; font: 400 26px/30px Arial, sans-serif; cursor: pointer; }
.album-dialog .close:hover, .album-dialog .close:focus { color: #000; }
.album-dialog p { margin: 0 0 20px; }
body.dialog-open { overflow: hidden; }

/* ---- videod ---- */
.video { display: block; width: 100%; height: 700px; border: 0; }
@media (max-width: 767px) { .video { height: auto; aspect-ratio: 16 / 9; } }

/* ---- elulooraamat (raamatulehe senine kujundus) ---- */
.raamat { background: #e6eef5; padding: 40px 20px; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: normal; color: #000; }
.raamat .page-wrap { max-width: 1250px; margin: 0 auto; }
.raamat .top-section { display: flex; gap: 40px; margin-bottom: 60px; align-items: stretch; }
.raamat .top-section img { width: 350px; height: auto; border-radius: 14px; box-shadow: 0 10px 26px rgba(45, 35, 10, .16); object-fit: cover; }
.raamat .book-text { flex: 1; background: rgba(255, 255, 255, .86); padding: 30px 32px; border-radius: 14px; box-shadow: 0 8px 24px rgba(45, 35, 10, .1); border: 1px solid rgba(233, 221, 196, .8); font-family: "Lora", Georgia, serif; font-size: 19px; line-height: 1.65; color: #2e2820; }
.raamat .book-text p { margin: 0 0 1em; }
.raamat .book-text p:last-child { margin-bottom: 0; }
.raamat .book-text strong { font-weight: 600; color: #1f1a12; }
.raamat .bottom-row { display: flex; gap: 60px; justify-content: center; align-items: flex-start; }
.raamat .form-container { flex: 0 0 460px; max-width: 100%; }
.raamat form { background: linear-gradient(180deg, #fffdf9, #fff); padding: 32px 30px 30px; border-radius: 16px; box-shadow: 0 12px 32px rgba(45, 35, 10, .14); border: 1px solid #efe6d2; width: 100%; }
.raamat h2 { position: relative; margin: 0 0 22px; padding-bottom: 12px; font-family: "Lora", Georgia, serif; font-size: 1.7rem; font-weight: 600; color: #3a2f18; }
.raamat h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #c6932f, #e6c375); }
.raamat label { display: block; margin: 18px 0 0; font-family: "Lora", Georgia, serif; font-weight: 600; font-size: .82rem; letter-spacing: .3px; color: #7c6c49; }
.raamat input, .raamat textarea { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1.5px solid #e4d8bf; border-radius: 10px; background: #fffdf9; font: 16px/1.45 "Lora", Georgia, serif; color: #2e2820; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.raamat input:hover, .raamat textarea:hover { border-color: #d6c49e; }
.raamat input:focus, .raamat textarea:focus { outline: none; border-color: #c6932f; background: #fff; box-shadow: 0 0 0 3px rgba(198, 147, 47, .18); }
.raamat textarea { resize: vertical; min-height: 84px; }
.raamat button { margin-top: 26px; width: 100%; padding: 15px 20px; border: 0; border-radius: 11px; cursor: pointer; background: linear-gradient(180deg, #cf9e37, #bd8420); color: #fff; font: 700 15px/1 "Lora", Georgia, serif; letter-spacing: 1.6px; text-transform: uppercase; box-shadow: 0 7px 18px rgba(189, 132, 32, .34); transition: transform .12s ease, box-shadow .15s ease, background .15s ease; }
.raamat button:hover, .raamat button:focus { background: linear-gradient(180deg, #d8a844, #c68f24); box-shadow: 0 10px 24px rgba(189, 132, 32, .44); transform: translateY(-1px); }
.raamat button:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(189, 132, 32, .34); }
.raamat button:focus-visible { outline: 2px solid #7c5a12; outline-offset: 2px; }
.raamat .side-image { width: 408px; flex-shrink: 0; }
.raamat .side-image img { width: 100%; border-radius: 14px; box-shadow: 0 10px 26px rgba(45, 35, 10, .16); }
.teade { padding: 15px; border-radius: 4px; margin-bottom: 20px; font-size: 18px; font-family: Arial, Helvetica, sans-serif; }
.teade-ok { background: #d6f5d6; border: 1px solid #68b868; }
.teade-viga { background: #f8d7da; border: 1px solid #d9534f; }
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 900px) {
  .raamat .top-section, .raamat .bottom-row { flex-direction: column; align-items: center; gap: 30px; }
  .raamat .top-section img { width: min(350px, 100%); }
  .raamat .form-container { flex: 1 1 auto; width: 100%; max-width: 460px; }
  .raamat .side-image { width: min(408px, 100%); }
}

/* ---- 404 ---- */
.viga-404 p { margin: 0 0 20px; }
