/* ==========================================================================
   mayday.hr: single stylesheet
   1. Fonts  2. Tokens  3. Base  4. Layout  5. Header/footer
   6. Components  7. Sections  8. Radar  9. Utilities
   ========================================================================== */

/* 1. Fonts (self-hosted IBM Plex, latin + latin-ext for Croatian) -------- */
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-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: "Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-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: "Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-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: "Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext-600-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: "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: "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; }

/* 2. Tokens ---------------------------------------------------------------- */
:root {
  /* Brand palette */
  --navy-950: #07111f;
  --navy-900: #0b1a2e;
  --navy-800: #11243d;
  --navy-700: #1b3352;
  --steel-400: #8fa3bb;
  --steel-200: #d3dce7;
  --amber: #ffb020;
  --amber-bright: #ffc54f;
  --radar: #5fe3c4;

  /* Light-surface roles */
  --bg: #f7f6f2;
  --surface: #ffffff;
  --tint: #edf0f3;
  --line: #d9e0e8;
  --text: #0b1a2e;
  --text-muted: #4a5a6f;
  --accent-ink: #8a5300;   /* amber that passes AA on light backgrounds */

  /* Dark-surface roles (hero, header, footer, bands) */
  --on-dark: #f2f5f8;
  --on-dark-muted: #a9b8c9;

  --font-sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --space-section: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 4px;
  --header-h: 4.25rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1524;
    --surface: #0f1f35;
    --tint: #0c1a2d;
    --line: #20365a;
    --text: #e8edf3;
    --text-muted: #a3b2c4;
    --accent-ink: var(--amber);
  }
}

/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
ul, ol { padding: 0; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 4. Layout ---------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-section); }
.section--tint { background: var(--tint); }
.section__head { margin-bottom: 2.5rem; }
.section__head h2 { margin: 0; }

.split { display: grid; gap: 1.5rem 4rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1.35fr; } }

.prose { max-width: 42rem; }
.prose--narrow { max-width: 44rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }

/* Dark "scope" backdrop: navy with a faint grid, used by hero bands. */
.hero, .page-hero {
  background-color: var(--navy-900);
  background-image:
    linear-gradient(rgb(95 227 196 / .045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(95 227 196 / .045) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  color: var(--on-dark);
}

/* 5. Header and footer ----------------------------------------------------- */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--amber); color: var(--navy-950); font-weight: 600; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy-900);
  border-bottom: 1px solid rgb(255 255 255 / .08);
  color: var(--on-dark);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--on-dark); text-decoration: none; }
.brand__name { font-weight: 600; font-size: 1.45rem; letter-spacing: -0.04em; line-height: 1; }
.logo-mark { width: 2.1rem; height: 2.1rem; }
.logo-mark__wing { fill: var(--steel-200); }
.logo-mark__keel { fill: var(--amber); }
.logo-mark__tail { fill: var(--steel-400); }

.site-nav { order: 3; width: 100%; border-top: 1px solid rgb(255 255 255 / .08); }
.site-nav__list { display: flex; gap: 1.5rem; list-style: none; }
.site-nav a {
  display: block; padding: .7rem 0;
  color: var(--on-dark-muted); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--on-dark); }
.site-nav a[aria-current="page"] { color: var(--on-dark); border-bottom-color: var(--amber); }

.lang-switch {
  margin-left: auto;
  padding: .3rem .6rem; border: 1px solid rgb(255 255 255 / .22); border-radius: var(--radius);
  color: var(--on-dark); font: 500 .8rem/1 var(--font-mono); letter-spacing: .08em; text-decoration: none;
}
.lang-switch:hover { border-color: var(--amber); color: var(--amber); }

@media (min-width: 640px) {
  .site-nav { order: 0; width: auto; margin-left: auto; border-top: 0; }
  .site-nav a { padding: 1.35rem 0 1.2rem; }
  .lang-switch { margin-left: 0; }
}

.site-footer { background: var(--navy-950); color: var(--on-dark-muted); font-size: .95rem; padding-top: 3.5rem; }
.site-footer a { color: var(--on-dark); }
.site-footer__grid { display: grid; gap: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__brand p { margin-top: 1rem; max-width: 22rem; }
.site-footer__heading {
  margin-bottom: .9rem; color: var(--on-dark);
  font: 500 .75rem/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
}
.site-footer__list { list-style: none; display: grid; gap: .4rem; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding-block: 1.25rem 1.5rem; border-top: 1px solid rgb(255 255 255 / .08); font-size: .85rem;
}
.site-footer__bottom p { margin: 0; }

.legal { margin: 0; display: grid; gap: .3rem; }
.legal div { display: flex; flex-wrap: wrap; gap: 0 .5rem; }
.legal dt { color: var(--steel-400); }
.legal dt::after { content: ":"; }
.legal dt.visually-hidden::after { content: none; }
.legal dd { margin: 0; color: var(--on-dark); }

/* 6. Components ------------------------------------------------------------ */
.eyebrow {
  margin-bottom: 1rem;
  color: var(--amber);
  font: 500 .78rem/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow--dark { color: var(--accent-ink); }
.eyebrow::before { content: ""; display: inline-block; width: 1.5rem; height: 1px; margin-right: .6rem; vertical-align: middle; background: currentColor; }

.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.6; color: var(--on-dark-muted); max-width: 40rem; }
.muted { color: var(--text-muted); font-size: .95rem; }

.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.35rem; border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.button--primary { background: var(--amber); color: var(--navy-950); }
.button--primary:hover { background: var(--amber-bright); }
.button--ghost { border-color: rgb(255 255 255 / .3); color: var(--on-dark); }
.button--ghost:hover { border-color: var(--on-dark); }

.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: .25rem; }

/* Five service cards plus a sixth "all services" tile: 3+3, 2+2+2 or a single column. */
.cards { list-style: none; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.5rem 1.5rem 1.25rem; background: var(--surface);
  border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.card:hover { border-top-color: var(--amber); transform: translateY(-2px); }
.card__code, .service__code { color: var(--accent-ink); font: 500 .75rem/1.4 var(--font-mono); letter-spacing: .1em; }
.card__title { margin: .9rem 0 .5rem; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }   /* whole card is clickable */
.card p { margin: 0; color: var(--text-muted); font-size: .98rem; }
.card--more { justify-content: flex-end; background: var(--navy-900); border-color: var(--navy-900); }
.card--more:hover { border-top-color: var(--amber); }
.card--more .card__title { margin: 0; }
.card--more .card__title a { color: var(--on-dark); }
.card--more .card__title a::before { content: "→"; display: block; margin-bottom: .75rem; color: var(--amber); font-size: 1.6rem; line-height: 1; }
.card--more p { color: var(--on-dark-muted); }
@media (prefers-color-scheme: dark) { .card--more { background: var(--navy-700); border-color: var(--navy-700); } }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.5rem 0; }
.tags li {
  padding: .25rem .55rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font: 500 .78rem/1.4 var(--font-mono); color: var(--text-muted);
}

/* 7. Sections -------------------------------------------------------------- */
/* Home hero */
.hero { position: relative; overflow: hidden; }
.hero__inner { display: grid; gap: 2rem; align-items: center; padding-block: clamp(3.5rem, 9vw, 7rem); }
.hero h1 { max-width: 16ch; }
.hero__visual { max-width: 26rem; justify-self: center; width: 100%; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.25fr 1fr; gap: 4rem; }
  .hero__visual { max-width: none; }
}

/* Inner-page title band */
.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem); border-bottom: 1px solid rgb(255 255 255 / .06); }
.page-hero h1 { max-width: 22ch; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.3rem); }
.page-hero .lead { margin-bottom: 0; }
.page-hero--tall { padding-block: clamp(4rem, 10vw, 8rem); }
.page-hero__rule { margin: 3rem 0 2.5rem; border: 0; border-top: 1px solid rgb(255 255 255 / .12); max-width: 40rem; }
.page-hero__alt { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }

/* Facts band */
.facts { background: var(--navy-800); color: var(--on-dark); padding-block: 3rem; }
.facts__grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .facts__grid { grid-template-columns: repeat(3, 1fr); } }
.fact { display: grid; gap: .35rem; padding-left: 1.25rem; border-left: 2px solid var(--amber); }
.fact__value { font: 500 clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem)/1.1 var(--font-mono); color: var(--amber); letter-spacing: -0.02em; }
.fact__label { color: var(--on-dark-muted); }

/* Partner logos */
.logos { list-style: none; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.logos a {
  display: grid; place-items: center; height: 100%; min-height: 7rem; padding: 1.25rem 1.5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.logos img { max-height: 3.5rem; width: auto; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.logos a:hover img, .logos a:focus-visible img { filter: none; opacity: 1; }

/* Call to action band */
.cta { background: var(--navy-900); color: var(--on-dark); padding-block: clamp(3rem, 7vw, 4.5rem); }
.cta__inner { display: grid; gap: 1.5rem 3rem; align-items: center; }
@media (min-width: 860px) { .cta__inner { grid-template-columns: 1fr auto; } }
.cta h2 { margin-bottom: .35rem; }
.cta p { margin: 0; color: var(--on-dark-muted); }
.cta__email { font: 500 .85rem/1 var(--font-mono); opacity: .75; }
@media (max-width: 420px) { .cta__email { display: none; } }

/* Services page */
.service-list { list-style: none; }
.service { display: grid; gap: .5rem 2rem; padding-block: 2.25rem; border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .service { grid-template-columns: 12rem 1fr; } }
.service__code { padding-top: .45rem; }
.service__title { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); }
.service p { margin: 0; max-width: 44rem; color: var(--text-muted); }
.closing { margin: 3rem 0 0; max-width: 44rem; font-size: 1.15rem; }

/* About page */
.profile { display: grid; gap: 1.5rem 2.5rem; align-items: start; }
@media (min-width: 640px) { .profile { grid-template-columns: auto 1fr; } }
.profile__photo { width: 120px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }

/* Contact page */
.contact { display: grid; gap: 3rem; }
@media (min-width: 860px) { .contact { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.contact__email { margin-bottom: 1.25rem; font-size: clamp(1.7rem, 1.1rem + 3vw, 3rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.contact__email a { text-decoration-thickness: 2px; }
.contact__details { margin: 0; display: grid; gap: 1.5rem; padding: 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact__details dt { margin-bottom: .2rem; color: var(--accent-ink); font: 500 .75rem/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.contact__details dd { margin: 0; }

/* 8. Radar (home hero) ----------------------------------------------------- */
.radar { width: 100%; }
.radar__face { fill: rgb(7 17 31 / .65); stroke: rgb(95 227 196 / .35); stroke-width: 1; }
.radar__grid { fill: none; stroke: rgb(95 227 196 / .18); stroke-width: 1; }
.radar__ticks { stroke: rgb(95 227 196 / .4); stroke-width: 1; }
.radar__bearings text, .radar__target text { font: 500 10px var(--font-mono); letter-spacing: .04em; }
.radar__bearings { fill: rgb(95 227 196 / .55); }
.radar__sweep-stop { stop-color: var(--radar); stop-opacity: .32; }
.radar__sweep-stop--clear { stop-opacity: 0; }
.radar__sweep { transform-box: view-box; transform-origin: 200px 200px; animation: sweep 7s linear infinite; }
.radar__target { fill: var(--radar); stroke: var(--radar); }
.radar__target circle { stroke: none; opacity: .55; }
.radar__target rect { fill: none; stroke-width: 1.5; }
.radar__target line { stroke-width: 1; opacity: .7; }
.radar__target text { stroke: none; }
.radar__target--alt { fill: var(--amber); stroke: var(--amber); }
.radar__centre { fill: var(--amber); }
@keyframes sweep { to { transform: rotate(360deg); } }

/* 9. Utilities ------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
