/* =====================================================================
   laminaadid.ee shared base (tokens, header, footer, buttons). Homepage sections: r4-home.css; inner pages: inner.css.
   Round 4 design (v4 based, approved on the design canvas
   https://claude.ai/artifact/LVBUMiH8owhAfR7ZJnJ6od page "Round 4").
   Desktop first; sections stack below 960px.
   ===================================================================== */

:root {
  --navy: #032b6d;
  --deep: #021e4e;
  --night: #011634;
  --ink: #102a48;
  --gold: #c9a96e;
  --gold-ink: #86652f;
  --ivory: #faf8f4;
  --beige: #f3eee4;
  --muted: #4f5b6b;
  --rule: rgba(16, 42, 72, 0.12);
  --wrap: 1200px;
  --edge: max(var(--g), calc((100% - var(--wrap)) / 2)); /* left/right edge that lines up with .wrap (100% = full-width parent) */
  --g: 72px;
  --f-head: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --pill: linear-gradient(135deg, #c9a96e, #9a6f35);
  --z-header: 50;
}
@media (max-width: 1100px) { :root { --g: 48px; } }
@media (max-width: 760px) { :root { --g: 22px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; font-family: var(--f-body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--ivory); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, blockquote, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--g)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--deep); color: #fff; padding: 10px 14px; }
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--gold); }

.h2 { font-family: var(--f-head); font-weight: 600; font-size: clamp(2rem, 3.5vw, 3.1rem); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.h2 em, .h1 em { font-style: italic; font-weight: 500; color: var(--gold-ink); }
.dark .h2 em { color: var(--gold); }
.lead { font-size: 1.1rem; line-height: 1.6; color: var(--muted); }
.tlink { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(16, 42, 72, 0.3); padding-bottom: 5px; transition: border-color 0.2s; }
.tlink:hover { border-color: currentColor; }

/* Gold pill button (brand) */
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 34px; border-radius: 999px; background: var(--pill); color: var(--deep); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; box-shadow: 0 10px 24px rgba(154, 111, 53, 0.3); transition: transform 0.2s, box-shadow 0.2s; }
.pill:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(154, 111, 53, 0.38); color: var(--deep); }
.pill-sm { min-height: 44px; padding: 0 22px; font-size: 0.9rem; box-shadow: 0 6px 14px rgba(154, 111, 53, 0.28); }

/* Script L monogram */
.lm { display: inline-block; flex: none; background: currentColor; -webkit-mask: url(/assets/img/l-mark.png) center / contain no-repeat; mask: url(/assets/img/l-mark.png) center / contain no-repeat; }

/* ---------- Top line and header (option A: solid bar, nothing on the photo) ---------- */
.topline { background: var(--night); color: rgba(247, 243, 238, 0.78); font-size: 0.82rem; text-align: right; padding: 8px var(--edge); }
.topline a { color: #f7f3ee; font-weight: 600; text-decoration: none; }
.hdr { position: sticky; top: 0; z-index: var(--z-header); background: var(--ivory); border-bottom: 1px solid var(--rule); }
.hdr-in { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-inline: var(--edge); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--f-head); font-weight: 600; font-size: 1.12rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand .lm { width: 38px; height: 23px; color: var(--navy); }
.nav { display: flex; gap: 30px; font-size: 0.95rem; font-weight: 500; }
.nav a { text-decoration: none; padding: 8px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.25s; }
.nav a:hover, .nav a[aria-current="page"] { background-size: 100% 1px; }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(16, 42, 72, 0.2); border-radius: 999px; background: transparent; cursor: pointer; font-weight: 500; }
.menu-btn svg { width: 18px; height: 10px; }
.nav-panel { display: none; border-top: 1px solid var(--rule); padding: 8px var(--edge) 24px; }
.nav-panel a:not(.pill) { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); font-family: var(--f-head); font-size: 1.4rem; text-decoration: none; }
.nav-panel .pill { width: 100%; margin-top: 20px; }
@media (max-width: 1020px) {
  .nav, .hdr-in > .pill { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-open .nav-panel { display: block; }
}
@media (max-width: 410px) {
  .hdr-in { gap: 12px; padding-inline: 16px; }
  .brand { gap: 8px; font-size: 1rem; }
  .brand .lm { width: 30px; }
  .menu-btn { gap: 6px; padding-inline: 10px; }
}
@media (max-width: 320px) {
  .hdr-in { gap: 8px; padding-inline: 12px; }
  .brand { gap: 6px; font-size: 0.94rem; }
  .brand .lm { width: 26px; }
  .menu-btn { padding-inline: 8px; }
}

/* ---------- Footer ---------- */
.ftr { background: var(--night); color: #f7f3ee; padding: 80px 0 32px; }
.ftr-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 0.8fr; gap: 40px; }
.ftr-brand { display: flex; align-items: center; gap: 12px; font-family: var(--f-head); font-weight: 600; font-size: 1.2rem; margin-bottom: 14px; text-decoration: none; color: #f7f3ee; }
.ftr-brand .lm { width: 40px; height: 24px; color: var(--gold); }
.ftr h3 { margin-bottom: 16px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.ftr p, .ftr li { font-size: 0.95rem; line-height: 1.7; color: rgba(247, 243, 238, 0.78); }
.ftr a { color: #f7f3ee; text-decoration: none; }
.ftr a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ftr .k { display: block; font-size: 0.78rem; color: rgba(247, 243, 238, 0.55); }
.ftr-note { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(247, 243, 238, 0.14); font-size: 0.9rem; }
.ftr-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(247, 243, 238, 0.14); font-size: 0.78rem; color: rgba(247, 243, 238, 0.6); }
@media (max-width: 960px) { .ftr-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ftr-grid { grid-template-columns: 1fr; } }

/* ---------- Certificates: thumbnail grid + enlarge dialog (homepage and Dr Anneli page) ---------- */
.certs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 14px; margin: 32px 0; padding: 0; list-style: none; }
.certs button { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; text-align: left; color: inherit; cursor: zoom-in; }
.certs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 6px 16px rgba(2, 30, 78, 0.12); transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.certs button:hover img, .certs button:focus-visible img { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(2, 30, 78, 0.2); }
.certs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 8px; }
.certs span { display: block; margin-top: 10px; font-size: 0.74rem; line-height: 1.4; color: var(--muted); }
.certs strong { display: block; font-size: 0.8rem; font-weight: 600; color: var(--navy); }
@media (max-width: 560px) {
  .certs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 6px 2px 16px; scrollbar-width: thin; }
  .certs li { scroll-snap-align: start; }
}

.lightbox { max-width: min(1100px, 94vw); max-height: 94vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(1, 22, 52, 0.94); }
.lightbox[open] { animation: lb-in 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; margin: 0 auto; border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.lightbox p { margin-top: 14px; text-align: center; font-size: 0.95rem; color: rgba(247, 243, 238, 0.85); }
.lightbox p strong { color: #fff; font-weight: 600; margin-right: 8px; }
.lightbox-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 1px solid rgba(247, 243, 238, 0.35); border-radius: 50%; background: rgba(1, 22, 52, 0.72); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.lightbox-close:hover, .lightbox-close:focus-visible { background: rgba(1, 22, 52, 0.95); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
