/* Pilousek - ELM information web. Fonts are Barlow and Barlow Semi Condensed (SIL OFL), served from this WAR. */

@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-400i-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-400i-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: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-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: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-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: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-700-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-700-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: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-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;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-700-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-700-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: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-800-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-800-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;
}

/* ---- tokens ------------------------------------------------------------------------------------------------ */
:root {
    --red: #D3222A;         /* the warning-sign red of the ELM logo */
    --red-text: #B3171F;    /* the same red, dark enough for small text on white */
    --ink: #1E2329;
    --muted: #545D67;
    --line: #D5DBE0;
    --hero-bg: #EEF1F3;     /* drawing-paper grey behind the panorama and page heads */
    --hills: #B9C2CA;
    --paper: #FFFFFF;
    --yellow: #F5B800;      /* reserved for the 24-hour emergency line */
    --wrap: 1180px;
    --gutter: 24px;
    --display: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
    --body: 'Barlow', 'Segoe UI', Arial, sans-serif;
}

/* ---- base -------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 18px/1.6 var(--body);
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.55rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--red-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.lead { font-size: 1.2rem; max-width: 60ch; color: var(--ink); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--paper); padding: 8px 14px; }

.text-link {
    display: inline-block;
    color: var(--red-text);
    font-weight: 600;
    text-decoration-thickness: 2px;
}

/* list items marked with a small red warning triangle, the logo's shape */
.ticks { list-style: none; margin: 0 0 1.4em; padding: 0; }
.ticks li { position: relative; padding: 5px 0 5px 26px; }
.ticks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.72em;
    width: 12px;
    height: 10px;
    background: var(--red);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.ticks ul { list-style: disc; margin: 4px 0 0; padding-left: 20px; color: var(--muted); }
.ticks ul li { padding: 2px 0; }
.ticks ul li::before { content: none; }

/* ---- header ------------------------------------------------------------------------------------------------ */
.site-header { background: var(--paper); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand img { flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font: 700 1.65rem/1 var(--display); }
.brand-tag { font-size: 0.95rem; color: var(--muted); margin-top: 3px; }
.emergency-tag {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: var(--yellow);
    color: var(--ink);
    text-decoration: none;
    padding: 6px 14px 7px;
    border-radius: 3px;
}
.emergency-tag:hover { color: var(--ink); background: #FFC81F; }
.emergency-label { font-size: 0.8rem; font-weight: 600; line-height: 1.2; }
.emergency-number { font: 800 1.45rem/1.05 var(--display); }

.site-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.site-nav ul { display: flex; flex-wrap: wrap; list-style: none; margin-top: 0; margin-bottom: 0; }
.site-nav ul.wrap { padding-left: calc(var(--gutter) - 14px); }  /* first label lines up with the content edge */
.site-nav a {
    display: block;
    padding: 13px 14px 11px;
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 4px solid transparent;
}
.site-nav a:hover { color: var(--red-text); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }

/* ---- home: hero with the Pribram panorama ------------------------------------------------------------------ */
.hero { background: var(--hero-bg); padding-top: clamp(40px, 7vw, 80px); }
.hero-text { display: grid; grid-template-columns: 7fr 5fr; gap: 24px 56px; align-items: end; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin: 0 0 8px; }
.panorama { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 8px auto 0; padding: 0 var(--gutter); }
.panorama svg { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
    /* the one orchestrated moment: the town draws itself in once on load */
    .panorama [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s ease-out 0.2s forwards; }
    @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---- contact board: one column per business, styled after a labelled distribution board -------------------- */
.board { background: var(--ink); color: #fff; }
.board-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
/* subgrid lines up label, description, phone and the rest across the three columns */
.board-cell {
    display: grid;
    grid-row: span 5;
    grid-template-rows: subgrid;
    align-content: start;
    row-gap: 0;
    padding: 36px 32px 40px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}
.board-cell:first-child { border-left: 0; padding-left: 0; }
.board-cell p { color: rgba(255, 255, 255, 0.78); margin: 12px 0 0; }
.board-label {
    justify-self: start;
    align-self: start;
    background: var(--paper);
    color: var(--ink);
    font: 700 1.15rem/1 var(--display);
    padding: 7px 12px 6px;
    border-left: 5px solid var(--red);
}
.board-phone {
    display: block;
    margin-top: 16px;
    color: #fff;
    font: 700 2.4rem/1 var(--display);
    text-decoration: none;
    letter-spacing: 0.01em;
}
.board-phone:hover { color: var(--yellow); }
.board a { color: #fff; }
.board a:hover { color: var(--yellow); }
.board :focus-visible, .site-footer :focus-visible { outline-color: var(--yellow); }
.board .board-more { font-size: 1rem; margin-top: 10px; }
.board-link { justify-self: start; align-self: end; margin-top: 18px; font-weight: 600; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.board-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0 0; }
.board-dl dt { color: rgba(255, 255, 255, 0.62); }
.board-dl dd { margin: 0; }

/* ---- home: the two business sections, deliberately identical in structure and weight ------------------------ */
.division { padding: clamp(56px, 8vw, 96px) 0; }
.division-elektro { background: var(--hero-bg); }
.division-intro { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.division-intro p { font-size: 1.15rem; margin: 6px 0 0; max-width: 60ch; }
.division-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; }
.offer { display: flex; flex-direction: column; border-top: 3px solid var(--ink); padding-top: 20px; }
.offer .text-link { margin-top: auto; align-self: flex-start; }
.offer > p { color: var(--muted); margin-top: 10px; }
.division-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 48px;
    padding: 22px 26px;
    background: var(--hero-bg);
    border-left: 5px solid var(--red);
}
.division-elektro .division-note { background: var(--paper); }
.division-note p { margin: 0; max-width: 70ch; }
.division-note .text-link { flex: none; }

/* ---- emergency line ---------------------------------------------------------------------------------------- */
.emergency { background: var(--yellow); position: relative; }
.emergency::before {
    content: "";
    display: block;
    height: 8px;
    background: repeating-linear-gradient(-45deg, var(--ink) 0 10px, var(--yellow) 10px 20px);
}
.emergency-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; padding-top: 24px; padding-bottom: 26px; }
.emergency-title { font: 700 1.6rem/1.1 var(--display); margin: 0; }
.emergency-call { font: 800 2.4rem/1 var(--display); color: var(--ink); text-decoration: none; }
.emergency-call:hover { color: var(--ink); text-decoration: underline; }
.emergency-note { margin: 0; font-size: 1rem; }
.emergency :focus-visible { outline-color: var(--ink); }

/* ---- about / facts ----------------------------------------------------------------------------------------- */
.about { padding: clamp(56px, 8vw, 88px) 0; }
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.about-grid h2 { margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: minmax(9rem, auto) 1fr; margin: 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--muted); padding-right: 24px; }
.facts-compact { margin-top: 28px; font-size: 1rem; }
.address { font-size: 1.2rem; line-height: 1.5; }
.mail-list { list-style: none; padding: 0; margin: 0 0 1em; }
.mail-list li { padding: 4px 0; }

/* ---- subpages ---------------------------------------------------------------------------------------------- */
.page-head { background: var(--hero-bg); padding: clamp(36px, 6vw, 64px) 0 clamp(32px, 5vw, 52px); }
.page-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.page-head .lead { margin: 16px 0 0; }
.page-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; padding-top: 48px; padding-bottom: 80px; }
.page-body-wide { grid-template-columns: minmax(0, 1fr) 340px; }
.content { max-width: 72ch; }
.content > h2 { margin: 44px 0 16px; }
.content > h2:first-child { margin-top: 0; }

.contact-card {
    align-self: start;
    position: sticky;
    top: 24px;
    background: var(--ink);
    color: #fff;
    padding: 26px 26px 28px;
}
.contact-card a { color: #fff; }
.contact-card a:hover { color: var(--yellow); }
.contact-card :focus-visible { outline-color: var(--yellow); }
.card-phone { display: block; margin: 16px 0 14px; font: 700 2.2rem/1 var(--display); text-decoration: none; }
.contact-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.contact-card dt { color: rgba(255, 255, 255, 0.62); }
.contact-card dd { margin: 0; }

.callout { background: var(--hero-bg); padding: 24px 28px; margin: 40px 0 28px; border-left: 5px solid var(--red); }
.callout h2 { font-size: 1.6rem; margin-bottom: 8px; }
.callout p { margin-bottom: 8px; }

.products { margin: 0 0 28px; }
.product-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.product-row img {
    width: 100%;
    height: 124px;
    object-fit: contain;
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 8px;
}
.products figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }

.licences { display: grid; gap: 16px; }
.licence { border: 1px solid var(--line); border-top: 3px solid var(--ink); padding: 20px 24px 8px; }
.licence h3 { font-size: 1.35rem; }
.licence-no { font: 600 1.15rem/1.3 var(--display); color: var(--red-text); margin: 6px 0 10px; }
.licence p:last-child { font-size: 0.95rem; color: var(--muted); }

.ref-list { list-style: none; padding: 0; margin: 0 0 1em; border-top: 1px solid var(--line); }
.ref-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.clients { align-self: start; background: var(--hero-bg); padding: 26px 28px 18px; }
.clients h2 { font-size: 1.6rem; margin-bottom: 12px; }
.clients ul { list-style: none; padding: 0; margin: 0; }
.clients li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.clients li:last-child { border-bottom: 0; color: var(--muted); }

/* ---- footer ------------------------------------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.85); font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 52px; padding-bottom: 28px; }
.footer-name { font: 700 1.45rem/1.2 var(--display); color: #fff; }
.footer-head { color: rgba(255, 255, 255, 0.6); margin-bottom: 2px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 18px; padding-bottom: 22px; }
.footer-base p { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }

/* ---- smaller screens --------------------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .hero-text, .board-grid, .division-grid, .division-intro, .about-grid, .footer-grid { grid-template-columns: 1fr; }
    .division-intro { gap: 16px; }
    .about-grid { gap: 40px; }
    .board-cell { grid-row: auto; grid-template-rows: none; padding: 28px 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
    .board-cell:first-child { border-top: 0; }
    .page-body, .page-body-wide { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; }
    .contact-card { position: static; order: -1; }
    .division-note { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 640px) {
    :root { --gutter: 16px; }
    body { font-size: 17px; }
    .brand img { width: 48px; height: 40px; }
    .brand-name { font-size: 1.35rem; }
    .brand-tag, .emergency-label { display: none; }
    .emergency-number { font-size: 1.2rem; }
    .site-nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .site-nav a { white-space: nowrap; }
    /* keep the panorama tall enough to read; the slice keeps Svata Hora, the right-hand end, in view */
    .panorama svg { height: 140px; }
    .board-phone, .emergency-call { font-size: 2.1rem; }
}
