/* Ontos Labs: one-page stealth site. Brand palette. */
:root {
  color-scheme: dark;
  --night: #000;            /* page base: black */
  --text: #f4f3ef;          /* brand paper, used as ink on dark */
  --text-soft: rgba(244, 243, 239, 0.78);
  --accent: #5371c4;        /* brand accent */
  --accent-lt: #aebff0;     /* brand accent on dark */
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad-x: clamp(1.25rem, 5vw, 3rem);
  --pad-y: clamp(1rem, 3.5vh, 2rem);
  /* Same insets as the body padding, reused by the layout. */
  --pt: max(var(--pad-y), env(safe-area-inset-top));
  --pb: max(var(--pad-y), env(safe-area-inset-bottom));
  --pl: max(var(--pad-x), env(safe-area-inset-left));
  --pr: max(var(--pad-x), env(safe-area-inset-right));
  --foot-h: 2.75rem;
  --stage-h: calc(100vh - var(--pt) - var(--pb) - var(--foot-h));
  --motto-size: clamp(2rem, min(1.2rem + 3.6vw, 7.5vh + 0.5rem), 5rem);
}
@supports (height: 100dvh) {
  :root { --stage-h: calc(100dvh - var(--pt) - var(--pb) - var(--foot-h)); }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  height: 100%;
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: var(--pad-y) var(--pad-x);
  padding:
    max(var(--pad-y), env(safe-area-inset-top))
    max(var(--pad-x), env(safe-area-inset-right))
    max(var(--pad-y), env(safe-area-inset-bottom))
    max(var(--pad-x), env(safe-area-inset-left));
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Content ---------- */
.stage, .foot { position: relative; z-index: 1; }

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  padding-block: clamp(1.5rem, 6vh, 4rem);
}

/* Text block. */
.core {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.logo {
  margin: 0;
  line-height: 0;
  color: #fff;
}
.logo-svg {
  display: block;
  width: 12rem;
  width: clamp(10.8rem, min(17.6vw + 7.2rem, 32vh), 20.8rem);   /* 80% of the original size */
  max-width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 1px 18px rgba(0, 0, 0, 0.28));
}

.motto {
  margin: clamp(1.75rem, 6vh, 3.75rem) 0 0;
  max-width: 18ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.5rem;
  font-size: var(--motto-size);
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--text);
  text-wrap: balance;
  text-shadow: 0 1px 22px rgba(0, 0, 0, 0.35);
}
.motto em {
  font-style: italic;
  color: var(--accent-lt);
}
@media (min-width: 900px) and (min-height: 560px) {
  .motto { max-width: none; }
}

.contact {
  margin: clamp(1.5rem, 5vh, 3rem) 0 0;
}
.contact a {
  display: inline-block;
  padding: 0.8em 0.6em;
  font-family: var(--mono);
  font-size: clamp(0.9375rem, 0.85rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(174, 191, 240, 0.75);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.42em;
  border-radius: 0.5rem;
  overflow-wrap: anywhere;
  transition: color 0.2s ease, text-decoration-color 0.2s ease, background-color 0.2s ease;
}
.contact a:hover {
  color: #fff;
  text-decoration-color: var(--accent-lt);
  text-decoration-thickness: 2px;
}
.contact a:focus-visible {
  outline: 2px solid var(--accent-lt);
  outline-offset: 2px;
  text-decoration-color: var(--accent-lt);
}

/* ---------- Footer ---------- */
.foot {
  min-height: var(--foot-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 0.75rem;
}
.copy {
  grid-column: 2;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  white-space: nowrap;
}
.copy small { font-size: inherit; }

/* Short landscape screens (phones on their side) */
@media (max-height: 480px) and (orientation: landscape) {
  .stage { padding-block: 0.75rem; }
  .logo-svg { width: clamp(8.8rem, 24vh + 3.2rem, 11.2rem); }
  :root { --motto-size: clamp(1.5rem, 8vh, 2.25rem); }
  .motto { margin-top: 1.1rem; max-width: none; }
  .contact { margin-top: 0.5rem; }
}

/* Windows High Contrast / forced colours: keep everything visible */
@media (forced-colors: active) {
  .logo, .motto, .motto em { color: CanvasText; }
  .logo-svg { filter: none; }
}

@media print {
  body { color: #262625; background: #fff; }
  .logo, .motto, .motto em, .contact a { color: #262625; text-shadow: none; }
}

/* New wordmark (raster, white on black): keep its proportions. */
.logo-svg { height: auto; display: block; margin-inline: auto; }
@media print { .logo-svg { filter: invert(1); } }
