/* Bootina Silicon: site styles (design decisions in PLAN.md) */

/* Fonts: self-hosted variable fonts, latin + latin-ext (Croatian letters in the footer) */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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: "Montserrat";
  src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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: "Inter";
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  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: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  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;
}

:root {
  --ink: #0b0b0b;          /* logo black: headings */
  --text: #2b3138;         /* body text */
  --muted: #5d6773;        /* secondary text, about 5.7:1 on white */
  --blue: #1f6fa3;         /* links and buttons, about 5.4:1 on white */
  --blue-dark: #185a85;    /* hover */
  --blue-logo: #6fb4de;    /* logo blue: decoration only */
  --line: #e3e8ec;         /* dividers between items */
  --tag-bg: #f2f7fb;
  --tag-border: #cfe2ef;
  --tag-text: #1e4f72;
  --bg: #fcfcfd;           /* centre colour of the hero art, so the hero fades into the page */

  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-body);
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 3rem var(--gutter) 4.5rem;   /* height comes from the content, not the screen */
  text-align: center;
}
/* Hero art on its own layer, faded out towards the bottom so it melts into the page background */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Fixed scale (about 2280 px wide), the same as the footer, so the traces match in both bands */
  background: #eef0f2 url("../img/header-background-blue-accents.svg") center / max(2280px, 100%) auto no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.hero__logo {
  width: clamp(240px, 36vw, 440px);
  margin: 0 auto;
}

.hero__summary {
  margin: 1.75rem 0 2rem;
  font: 500 clamp(1.05rem, 1.8vw, 1.3rem)/1.45 var(--font-body);
  color: var(--text);
}

.button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font: 600 1rem/1 var(--font-head);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.button:hover { background: var(--blue-dark); color: #fff; }

/* ---------- Chapters: title left, content right ---------- */

.chapters {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) var(--gutter) 0;
}

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: clamp(2rem, 5vw, 4.5rem);
  scroll-margin-top: 2rem;
}
/* Chapters are separated by white space only, no lines */
.chapter + .chapter { margin-top: clamp(3rem, 5vw, 4.5rem); }

.chapter__title {
  align-self: start;
  margin: 0;
  font: 700 clamp(1.5rem, 2.4vw, 2rem)/1.2 var(--font-head);
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* Small ring in logo blue, like the pads at the ends of the logo's traces */
.chapter__title::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.55em;
  border: 2px solid var(--blue-logo);
  border-radius: 50%;
  vertical-align: 0.1em;
}

.chapter__body { max-width: 44rem; }

.lead {
  margin: 0 0 1.5rem;
  font: 500 1.125rem/1.5 var(--font-body);
  color: var(--ink);
}

.note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Items inside a chapter are divided by thin lines */
.items {
  margin: 0;
  padding: 0;
  list-style: none;
}
.items > * { padding-block: 1.25rem; }
.items > :first-child { padding-top: 0.3rem; }
.items > * + * { border-top: 1px solid var(--line); }

.items h3 {
  margin: 0 0 0.3rem;
  font: 600 1.125rem/1.35 var(--font-head);
  color: var(--ink);
}
.items p { margin: 0; color: var(--muted); }

/* Expertise groups: label above monospace tags */
.groups dt {
  margin: 0 0 0.65rem;
  font: 600 0.78rem/1.4 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.groups dd { margin: 0; }
.groups .note { margin-top: 0.75rem; font-size: 0.9rem; }
.groups .group-lead { margin: 0 0 0.65rem; color: var(--text); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--tag-border);
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font: 500 0.85rem/1.2 var(--font-mono);
}

/* Contact: large black address, no underline; a thin logo-blue line slides in on hover */
.email {
  padding-bottom: 0.15em;
  color: var(--ink);
  font: 600 clamp(1.3rem, 4vw, 2.25rem)/1.2 var(--font-head);
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--blue-logo), var(--blue-logo)) left bottom / 0 2px no-repeat;
  transition: background-size 0.25s ease;
}
.email:hover,
.email:focus-visible {
  color: var(--ink);
  background-size: 100% 2px;
}
.email__arrow {
  display: inline-block;
  margin-left: 0.45em;
  color: var(--blue);
  transition: transform 0.25s ease;
}
.email:hover .email__arrow { transform: translateX(0.2em); }
@media (prefers-reduced-motion: reduce) {
  .email, .email__arrow { transition: none; }
}

/* ---------- Footer: its own band with the hero art, clear break ---------- */

.site-footer {
  margin-top: clamp(3.5rem, 6vw, 5rem);
  border-top: 1px solid #d3d8dd;   /* trace grey from the hero art */
  /* Same art as the hero, at the same scale (the hero shows it about 2280 px wide), not faded */
  background: #eef0f2 url("../img/header-background-blue-accents.svg") center top / max(2280px, 100%) auto no-repeat;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
  text-align: center;
}
.site-footer__inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 3.5rem var(--gutter);
}

/* Items side by side, separated by bullets */
.inline-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 0.35rem;
  padding: 0;
  list-style: none;
}
.inline-list li { white-space: nowrap; }
.inline-list li:not(:last-child)::after {
  content: "\2022";
  margin: 0 0.6em;
  color: var(--blue-logo);
}
.inline-list strong { color: var(--text); font-weight: 600; }
.inline-list--small {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
}

/* ---------- Privacy page ---------- */

.page-top {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 0;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font: 600 0.95rem/1 var(--font-head);
  text-decoration: none;
}
.back img { width: 40px; }

.prose {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 4rem;
}
.prose h1 {
  margin: 0 0 0.4rem;
  font: 700 clamp(1.75rem, 4vw, 2.4rem)/1.2 var(--font-head);
  color: var(--ink);
}
.prose h2 {
  margin: 2.25rem 0 0.6rem;
  font: 600 1.2rem/1.35 var(--font-head);
  color: var(--ink);
}
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.2rem; }
.prose .meta { margin: 0; color: var(--muted); font-size: 0.9rem; }


/* ---------- Phones: one column ---------- */

@media (max-width: 760px) {
  .hero { padding: 2.5rem var(--gutter) 3.5rem; }
  /* Phone version of the header art: the wide art's traces would be cropped away here */
  .hero::before,
  .site-footer {
    background-image: url("../img/header-background-blue-accents-phone.svg");
    background-size: cover;
    background-position: center;
  }
  .chapter { grid-template-columns: minmax(0, 1fr); }
  .chapter + .chapter { margin-top: 2.5rem; }
  .chapter__title { margin-bottom: 1rem; }
  .items > * { padding-block: 1rem; }
  .items > :first-child { padding-top: 0; }
  .inline-list li { white-space: normal; }
}

