/* ─────────────────────────────────────────────────────────────
   BlackSea Software — corporate site
   Aesthetic: Baltic engineering. Cold paper, deep sea ink,
   editorial serif headings against a mono/sans working set.
   Restraint is the point: this page is read by compliance
   reviewers, not converted by marketers.
   ───────────────────────────────────────────────────────────── */

:root {
  --ink:        #0d1418;
  --ink-soft:   #38474f;
  --ink-faint:  #7b8b94;
  --rule:       #dfe4e4;
  --paper:      #f4f3ef;
  --paper-warm: #eeece6;
  --sea:        #10454f;
  --sea-bright: #1c6b78;
  --amber:      #b4602a;

  --measure: 66ch;
  --gutter: clamp(1.5rem, 5vw, 5rem);
  --band-y: clamp(3.5rem, 7vh, 5.5rem);
  --shell: 1120px;

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #eef2f2;
    --ink-soft:   #a8b6bb;
    --ink-faint:  #6d7f86;
    --rule:       #212c31;
    --paper:      #0b1114;
    --paper-warm: #0f1619;
    --sea:        #7fc9d3;
    --sea-bright: #a5dbe2;
    --amber:      #d98b52;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .18vw, 1.075rem);
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain — barely there, kills the flat-CSS look */
.grain {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { .grain { opacity: .05; } }

::selection { background: var(--sea); color: var(--paper); }

a { color: inherit; }

/* ── Header ─────────────────────────────────────────────── */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  z-index: 50;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
}

.wordmark .mark { width: 22px; height: 22px; color: var(--sea); flex: none; }

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .02em;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.site-nav a:hover { color: var(--ink); border-bottom-color: var(--sea); }

@media (max-width: 720px) { .site-nav { display: none; } }

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter) clamp(3rem, 7vh, 4.5rem);
  border-bottom: 1px solid var(--rule);
  max-width: var(--shell);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 2rem;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sea);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sea) 18%, transparent);
}

h1 {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.4vw, 4.9rem);
  line-height: 1.03;
  letter-spacing: -.022em;
}

h1 em {
  font-style: italic;
  color: var(--sea);
}

.lede {
  margin: 0 0 2.5rem;
  max-width: 44ch;
  font-size: clamp(1.05rem, 1rem + .34vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: balance;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 3.5rem;
  margin: 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.facts div { margin: 0; }

.facts dt {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .45rem;
}

.facts dd { margin: 0; font-size: .95rem; font-weight: 450; }

/* ── Bands: two-column editorial grid ──────────────────── */

.band {
  padding: var(--band-y) var(--gutter);
  border-bottom: 1px solid var(--rule);
  max-width: var(--shell);
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.section-label {
  margin: 0;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  position: sticky;
  top: 5.5rem;
  padding-top: .3rem;
}

@media (max-width: 780px) {
  .band { grid-template-columns: 1fr; }
  .section-label { position: static; margin-bottom: 1.75rem; }
}

.band-body { min-width: 0; }

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 2.5rem 3rem;
}

.cols h2,
.product h2 {
  margin: 0 0 .75rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -.012em;
  line-height: 1.15;
}

.cols p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.6;
}

/* ── Products ───────────────────────────────────────────── */

.product {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}

.product:first-of-type { border-top: none; padding-top: 0; }

.product-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: .9rem;
}

.product-head h2 { margin: 0; }

.tag {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--sea);
  border: 1px solid color-mix(in srgb, var(--sea) 35%, transparent);
  border-radius: 2px;
  padding: .18rem .5rem;
}

.tag.muted { color: var(--ink-faint); border-color: var(--rule); }

.product p { margin: 0 0 1.1rem; color: var(--ink-soft); }

.product.placeholder h2 { color: var(--ink-faint); }

.ext {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--sea);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--sea) 30%, transparent);
  padding-bottom: 1px;
  transition: border-color .18s ease;
}

.ext:hover { border-bottom-color: var(--sea); }
.ext svg { width: 13px; height: 13px; }

/* ── Engineering ────────────────────────────────────────── */

.prose { max-width: var(--measure); }

.prose p {
  margin: 0 0 1.3rem;
  color: var(--ink-soft);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.stack li {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .3rem .6rem;
}

/* ── Company ────────────────────────────────────────────── */

.company .legal { max-width: var(--measure); }

.legal dl {
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: 0;
}

.legal dl > div {
  display: contents;
}

.legal dt,
.legal dd {
  padding: .85rem 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.legal dt {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .03em;
  color: var(--ink-faint);
}

.legal dd { font-size: .95rem; }

.legal dd a { color: var(--sea); text-underline-offset: 3px; }

.pending {
  color: var(--ink-faint);
  font-style: italic;
}

.note {
  margin: 0;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: 56ch;
}

@media (max-width: 620px) {
  .legal dl { grid-template-columns: 1fr; }
  .legal dt { padding-bottom: 0; border-top: 1px solid var(--rule); }
  .legal dd { padding-top: .2rem; border-top: none; }
}

/* ── Footer ─────────────────────────────────────────────── */

.site-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2.25rem var(--gutter) 3rem;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--ink-faint);
  letter-spacing: .02em;
}
