/* =====================================================================
   OMC Engineering — stiilileht
   Teksti muutmiseks ei pea seda faili puutuma: tekstid on keelekaustade
   index.html failides (en/, et/, fi/, sv/, no/, lt/, lv/).
   Värvid, fondid ja vahed on koondatud allpool :root plokki.
   ===================================================================== */

/* ---- Fondid: asuvad kaustas fonts/, väliseid päringuid (Google) ei tehta ---- */
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-sans-3-latin-wght-normal.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: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-wght-normal.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: "Schibsted Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-400-normal.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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-500-normal.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;
}

/* ---- Värvid, fondid, vahed ---- */
:root {
  --ink: #16191C;          /* põhitekst */
  --ink-2: #3A4046;        /* sisutekst */
  --muted: #5A6167;        /* abitekst, numbrid */
  --line: #ECEAE5;         /* peenjooned */
  --line-2: #DAD7D0;       /* siltide raam */
  --band: #F6F5F2;         /* teenuste ploki taust */
  --bg: #FFFFFF;
  --accent: #E2231A;       /* signaalpunane */
  --accent-dark: #B3170F;  /* lingi hover */
  --foot-bg: #16191C;
  --foot-fg: #F3F1EC;
  --foot-muted: #A7ADB2;
  --foot-line: #3A4046;

  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --logo: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --pad: clamp(20px, 5.6vw, 80px);
  --header-h: 88px;
  --section-y: clamp(44px, 5.5vw, 75px);   /* sektsioonide vahe; oli clamp(88px, 11vw, 150px), -50% */
}

/* ---- Alus ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 18px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }

.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 12px 16px; background: var(--ink); color: #fff; }
.skip:focus { left: 16px; top: 16px; color: #fff; }

/* ---- Päis ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px);
}
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo-mark { font-family: var(--logo); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.logo-rule { width: 2px; height: 20px; background: currentColor; }
.logo-word { font-family: var(--logo); font-size: 16px; font-weight: 500; line-height: 1; }

.site-nav { display: flex; align-items: center; gap: 48px; }
.main-nav { display: flex; gap: 32px; font-size: 17px; }
.main-nav a { padding-block: 10px; color: var(--ink); text-decoration: none; }
.main-nav a:hover { color: var(--accent-dark); }

.lang { display: flex; gap: 2px; }
.lang a {
  min-width: 36px; height: 44px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 2px solid transparent;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
  color: var(--muted); text-decoration: none;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.menu-toggle { display: none; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 1099px) {
  :root { --header-h: 64px; }
  .logo { gap: 9px; }
  .logo-mark { font-size: 22px; }
  .logo-rule { width: 1.5px; height: 16px; }
  .logo-word { font-size: 14px; }

  .site-header .wrap { height: auto; min-height: var(--header-h); flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 20px; padding: 4px 0 24px; }
  .main-nav { flex-direction: column; gap: 0; }
  .main-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 28px; font-weight: 300; }
  .lang { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .lang a { min-width: 0; font-size: 13px; }

  .js .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -10px; padding: 0;
    background: none; border: 0; color: var(--ink); cursor: pointer;
  }
  .js .menu-toggle svg { width: 24px; height: 24px; }
  .js .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    padding: 8px var(--pad) 28px; background: #fff; border-bottom: 1px solid var(--ink);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .js .site-nav.is-open { display: flex; }
}

/* ---- Avaplokk ---- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; min-height: calc(min(720px, 52vw) * 1.111 + 36px); }
.hero-text {
  position: relative; z-index: 1; max-width: min(720px, 56%);
  padding-top: clamp(28px, 4.45vw, 64px); padding-bottom: 64px;   /* päise ja ülarea vahe; oli clamp(56px, 8.9vw, 128px), -50% */
  display: flex; flex-direction: column; gap: 32px;
}
.eyebrow { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; line-height: 1.6; text-transform: uppercase; color: var(--muted); }
.hero h1 {
  font-size: clamp(38px, 5.6vw, 80px); font-weight: 200; line-height: 1.02; letter-spacing: -0.02em;
  color: var(--accent); -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word;
}
.hero-lead { max-width: 540px; font-size: clamp(18px, 1.5vw, 21px); font-weight: 300; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 8px; }
.hero-figure { position: absolute; top: 36px; right: -40px; width: min(720px, 52vw); pointer-events: none; }
.hero-figure img { width: 100%; height: auto; }

.btn {
  height: 52px; padding: 0 24px 0 26px; display: inline-flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; text-decoration: none; font-size: 17px; font-weight: 600;
}
.btn:hover { background: #000; color: #fff; }
.btn svg { width: 18px; height: 18px; }
.text-link { font-size: 17px; color: var(--ink); text-underline-offset: 6px; }

@media (max-width: 1099px) {
  .hero .wrap { min-height: 0; }
  .hero-text { max-width: 720px; padding-bottom: 0; gap: 24px; }
  .eyebrow { font-size: 11px; }
  .hero-figure {
    position: relative; top: auto; right: auto; width: auto;
    margin: 28px calc(var(--pad) * -1) 0; max-height: min(104vw, 620px); overflow: hidden;
  }
  .hero-figure img { width: min(100% + 20px, 640px); max-width: none; margin-left: auto; margin-right: -4px; }
}
@media (max-width: 639px) {
  .hero-actions .btn { flex: 1 1 100%; justify-content: space-between; padding: 0 20px; }
  .hero-actions .text-link { display: none; }
}

/* ---- Sektsioonid ---- */
.section { padding-block: var(--section-y); }
.rule-top { border-top: 1px solid var(--line); }
.band { background: var(--band); }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.h2 {
  font-size: clamp(40px, 3.9vw, 56px); font-weight: 200; line-height: 1.05; letter-spacing: -0.01em;
  color: var(--accent); -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word;
}
.num { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Meist */
.about { padding-top: clamp(62px, 7.7vw, 105px); }   /* joonise ja "Ettevõttest" vahe: -30% algsest (88–150px) */
.about .h2 { grid-column: 1 / span 4; }
.about-body { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 28px; }
.lead { font-size: clamp(22px, 2.1vw, 30px); font-weight: 300; line-height: 1.4; }
.body-text { font-size: clamp(17px, 1.25vw, 18px); line-height: 1.65; color: var(--ink-2); }
@media (max-width: 899px) {
  .about .h2, .about-body { grid-column: 1 / -1; }
  .about-body { margin-top: 24px; gap: 20px; }
}

/* Loendur ja teenused */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
.stat { border-top: 1px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.stat-num { font-size: clamp(36px, 4.4vw, 64px); font-weight: 200; line-height: 1; color: var(--accent); }
.stat-label { font-size: 15px; line-height: 1.35; color: var(--muted); -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 639px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { flex-direction: row; align-items: baseline; gap: 16px; padding: 14px 0 16px; }
  .stat-num { flex-shrink: 0; min-width: 88px; font-size: 40px; }
  .stat-label { font-size: 15px; }
}

.services-grid { margin-top: clamp(38px, 4.5vw, 64px);  /* loenduri ja teenuste vahe; oli clamp(56px, 6.7vw, 96px), -33% */ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; row-gap: 64px; }
.services-intro { display: flex; flex-direction: column; gap: 24px; padding-right: 24px; }
.services-intro p { max-width: 20em; font-size: clamp(19px, 1.6vw, 22px); font-weight: 300; line-height: 1.45; }
.service { border-top: 1px solid var(--ink); padding-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.service-head { display: flex; flex-direction: column; gap: 8px; }
.service h3 { font-size: clamp(22px, 1.75vw, 25px); font-weight: 400; line-height: 1.25; }
.dash-list { display: flex; flex-direction: column; gap: 10px; font-size: 16.5px; line-height: 24px; }
.dash-list li { position: relative; padding-left: 26px; }
.dash-list li::before { content: ""; position: absolute; left: 0; top: 12px; width: 12px; height: 1px; background: var(--accent); }
@media (max-width: 1023px) { .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; } }
@media (max-width: 639px) {
  .services-grid { grid-template-columns: minmax(0, 1fr); row-gap: 44px; }
  .service { padding-top: 20px; gap: 16px; }
  .service-head { flex-direction: row; align-items: baseline; gap: 14px; }
  .dash-list { gap: 8px; font-size: 16px; line-height: 23px; }
  .dash-list li { padding-left: 22px; }
  .dash-list li::before { top: 11px; width: 10px; }
}

/* Rakendusvaldkonnad */
.areas-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }
.area { border-top: 1px solid var(--line); padding-top: 28px; padding-right: 24px; display: flex; flex-direction: column; gap: 20px; font-size: 18px; line-height: 1.4; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.area svg { flex-shrink: 0; width: 36px; height: 36px; fill: none; stroke: var(--accent); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 899px) { .areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; } }
@media (max-width: 639px) {
  .areas-grid { margin-top: 36px; grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .area { flex-direction: row; align-items: flex-start; gap: 16px; padding: 16px 0; font-size: 16.5px; }
  .area svg { width: 30px; height: 30px; }
}

/* Referentsid */
.refs { margin-top: 64px; border-bottom: 1px solid var(--line); }
.ref {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px;
  padding: 32px 0; border-top: 1px solid var(--line); align-items: start;
}
.ref-meta { padding-top: 7px; display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ref-main { display: flex; flex-direction: column; gap: 12px; padding-right: 32px; }
.ref-title { font-size: 24px; font-weight: 300; line-height: 1.25; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.ref-tags { display: flex; flex-direction: column; gap: 18px; padding-top: 5px; }
.tag-label { display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 4px 8px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; line-height: 1.4; color: var(--ink-2); }

/* "Veel / Vähem": tavaline <details>, töötab ka ilma skriptita */
.ref-more summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px;
  list-style: none; cursor: pointer; font-size: 15px; color: var(--ink);
}
.ref-more summary::-webkit-details-marker { display: none; }
.ref-more summary::before { content: "+"; display: inline-block; width: 12px; font-family: var(--mono); font-size: 15px; color: var(--accent); }
.ref-more[open] summary::before { content: "\2212"; }
.ref-more summary span { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px; }
.ref-more summary:hover span { color: var(--accent-dark); text-decoration-color: currentColor; }
.ref-more .s-less, .ref-more[open] .s-more { display: none; }
.ref-more[open] .s-less { display: inline; }
.ref-desc { margin-top: 10px; max-width: 36em; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 1099px) {
  .ref { grid-template-columns: minmax(0, 1fr); row-gap: 12px; padding: 24px 0; }
  .ref-meta { flex-direction: row; gap: 0; padding-top: 0; font-size: 12px; }
  .ref-place::before { content: "\00a0\00b7\00a0"; }
  .ref-main { padding-right: 0; gap: 8px; }
  .ref-tags { padding-top: 4px; gap: 14px; }
  .ref-title { font-size: 21px; }
}
@media (max-width: 639px) { .refs { margin-top: 36px; } }

/* Kontakt */
.contact-intro { grid-column: 1 / span 4; }
.reach, .company { border-top: 1px solid var(--ink); padding-top: 24px; display: flex; flex-direction: column; }
.reach { grid-column: 6 / span 3; gap: 6px; }
.company { grid-column: 10 / span 3; gap: 8px; font-size: 16px; line-height: 1.5; }
.reach a { min-height: 44px; display: inline-flex; align-items: center; font-size: 20px; color: var(--ink); text-decoration: none; }
.reach a[href^="mailto"] { text-decoration: underline; text-underline-offset: 5px; }
.reach a:hover { color: var(--accent-dark); }
.phone-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; }
.speaks { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); }
.company-name { font-size: 18px; font-weight: 600; }
.company .label { color: var(--muted); }
@media (max-width: 1099px) {
  .contact-intro { grid-column: 1 / -1; }
  .reach { grid-column: 1 / span 6; margin-top: 40px; }
  .company { grid-column: 7 / span 6; margin-top: 40px; }
}
@media (max-width: 639px) {
  .reach, .company { grid-column: 1 / -1; padding-top: 20px; }
  .company { margin-top: 32px; }
}

/* Alamleht (kvaliteedipoliitika) */
.subpage .lead { color: var(--ink-2); }

/* ---- Jalus ---- */
.site-footer { padding-block: 72px 48px; background: var(--foot-bg); color: var(--foot-fg); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 64px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; }
.site-footer .logo, .site-footer .logo:hover { color: var(--foot-fg); }
.site-footer .logo-mark { font-size: 30px; }
.site-footer .logo-rule { width: 2px; height: 22px; }
.site-footer .logo-word { font-size: 18px; }
.footer-nav { display: flex; gap: 40px; font-size: 16px; }
.footer-nav a { min-height: 44px; display: flex; align-items: center; color: var(--foot-fg); text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  padding-top: 24px; border-top: 1px solid var(--foot-line);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--foot-muted);
}
.footer-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.footer-meta a { color: var(--foot-muted); text-underline-offset: 4px; }
.footer-meta a:hover { color: var(--foot-fg); }
.footer-langs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-langs a { color: var(--foot-muted); text-decoration: none; }
.footer-langs a:hover, .footer-langs a[aria-current="page"] { color: var(--foot-fg); }
@media (max-width: 639px) {
  .site-footer { padding-block: 56px 40px; }
  .site-footer .wrap { gap: 40px; }
  .site-footer .logo-mark { font-size: 26px; }
  .site-footer .logo-rule { height: 18px; width: 1.5px; }
  .site-footer .logo-word { font-size: 16px; }
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-nav { flex-direction: column; gap: 0; font-size: 17px; }
  .footer-bottom { flex-direction: column; }
}

/* ---- Printimine ---- */
@media print {
  .site-header { position: static; }
  .site-nav, .menu-toggle, .hero-figure { display: none !important; }
  .band { background: none; }
}
