/* ==========================================================================
   ORCINUS s.r.o. — orcinus.cz
   Single stylesheet. Sections follow the order of the markup.
   ========================================================================== */

/* --------------------------------------------------------------- fonts --- */
/* Self-hosted and subset to Latin + Czech, so there are no third-party
   requests and the whole family costs ~55 kB. See tools/subset-fonts.mjs. */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif';
  src: url('/assets/fonts/source-serif-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens -- */
:root {
  /* The logo is pure black and white; the palette stays near-monochrome and
     borrows one supporting hue — deep sea — from what the mark depicts. */
  --ink: #0b1418;
  --ink-soft: #17272d;
  --sea: #0e3b47;
  --sea-deep: #071c23;
  --paper: #fbfaf8;
  --paper-alt: #f3f1ec;
  --line: #e3e0d8;
  --line-strong: #cfcbc0;
  --muted: #5c6a70;
  --on-dark: #eef3f3;
  --on-dark-muted: #9cb5b9;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif: 'Source Serif', ui-serif, Georgia, 'Times New Roman', serif;

  --shell: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --section-y: clamp(5rem, 11vw, 9.5rem);
  --radius: 2px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 100;
  transform: translate(-50%, -110%);
  padding: 0.75rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

/* -------------------------------------------------------------- layout --- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  scroll-margin-top: 4.5rem;
}

.section--alt {
  background: var(--paper-alt);
}

.section__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
}

@media (min-width: 62rem) {
  .section__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
  }
  .section__aside {
    position: sticky;
    top: 7rem;
  }
}

.section__head {
  max-width: 46rem;
  margin-bottom: clamp(2.75rem, 6vw, 4.5rem);
}

.section__title {
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3rem);
  margin-top: 1.25rem;
}

.section__title--wide {
  max-width: 20ch;
}

.section__intro {
  margin-top: 1.5rem;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--light {
  color: var(--on-dark-muted);
}

.prose p + p {
  margin-top: 1.35em;
}

.prose p {
  max-width: 58ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.7;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------- header --- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--on-dark);
  transition:
    background-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    color 0.35s var(--ease);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.site-header.is-stuck {
  background: rgba(251, 250, 248, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}

/* ---------------------------------------------------------------- brand -- */
/* The lockup is the company's own logo, traced from the original artwork
   (tools/build-logo.mjs). It is a single currentColor path, so the same asset
   works on the dark hero and on the light footer. */
.brand {
  display: inline-flex;
  align-items: center;
  color: currentColor;
}

.brand__logo {
  height: clamp(1.75rem, 1.6rem + 0.55vw, 2.125rem);
  width: auto;
  aspect-ratio: 794 / 245;
  flex: none;
}

.brand--footer .brand__logo {
  height: 1.875rem;
}

/* ------------------------------------------------------------------ nav -- */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.site-nav__list a {
  position: relative;
  display: inline-block;
  padding-block: 0.35rem;
  font-size: 0.9375rem;
  letter-spacing: 0.005em;
  color: inherit;
  opacity: 0.82;
  transition: opacity 0.25s var(--ease);
}

.site-nav__list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.1rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible,
.site-nav__list a.is-active {
  opacity: 1;
}

.site-nav__list a:hover::after,
.site-nav__list a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle__bars {
  position: relative;
  width: 22px;
  height: 9px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}
.nav-toggle__bars::before {
  top: 0;
}
.nav-toggle__bars::after {
  bottom: 0;
}

@media (max-width: 61.99rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 4.5rem 0 auto;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.28s var(--ease),
      transform 0.28s var(--ease),
      visibility 0.28s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.75rem;
  }

  .site-nav__list li + li {
    border-top: 1px solid var(--line);
  }

  .site-nav__list a {
    display: block;
    padding-block: 1rem;
    font-size: 1.0625rem;
    opacity: 1;
  }

  .site-nav__list a::after {
    display: none;
  }

  .nav-toggle[aria-expanded='true'] .nav-toggle__bars::before {
    transform: translateY(4px) rotate(45deg);
  }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bars::after {
    transform: translateY(-3.5px) rotate(-45deg);
  }
}

/* ----------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 40rem;
  min-height: min(100svh, 54rem);
  padding-block: 9rem clamp(6rem, 14vh, 9rem);
  background:
    radial-gradient(120% 90% at 15% 8%, #10404d 0%, transparent 58%),
    radial-gradient(90% 70% at 95% 100%, #123f4a 0%, transparent 55%),
    linear-gradient(168deg, var(--sea-deep) 0%, #0a2831 55%, #071b22 100%);
  color: var(--on-dark);
  overflow: hidden;
}

.hero__backdrop {
  position: absolute;
  inset: -8% -4%;
  z-index: -1;
  background: url('/assets/img/hero-contours.svg') center / cover no-repeat;
  opacity: 0.34;
  -webkit-mask-image: radial-gradient(105% 85% at 50% 45%, #000 30%, transparent 82%);
  mask-image: radial-gradient(105% 85% at 50% 45%, #000 30%, transparent 82%);
  animation: drift 46s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(-1.2%, 0.6%, 0) scale(1.02);
  }
  to {
    transform: translate3d(1.4%, -1%, 0) scale(1.06);
  }
}

.hero__inner {
  position: relative;
}

.hero__title {
  max-width: 17ch;
  margin-top: 1.75rem;
  font-size: clamp(2.375rem, 1.2rem + 5vw, 4.5rem);
  letter-spacing: -0.025em;
  line-height: 1.06;
}

.hero__lead {
  max-width: 44ch;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.6;
  color: var(--on-dark-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: clamp(2.25rem, 4vw, 3rem);
}

/* The hero animates position only — never opacity — so the H1 paints on the
   first frame and does not push out Largest Contentful Paint. */
.hero .rise {
  animation: rise 0.85s var(--ease) both;
}
.hero .rise:nth-child(2) {
  animation-delay: 0.06s;
}
.hero .rise:nth-child(3) {
  animation-delay: 0.12s;
}
.hero .rise:nth-child(4) {
  animation-delay: 0.18s;
}

@keyframes rise {
  from {
    transform: translate3d(0, 18px, 0);
  }
  to {
    transform: none;
  }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(1.75rem, 4vh, 3rem);
  translate: -50% 0;
  width: 1px;
  height: 3.5rem;
  background: linear-gradient(to bottom, transparent, var(--on-dark-muted));
  opacity: 0.7;
}

.hero__scroll span {
  position: absolute;
  inset-inline: -3px;
  bottom: 0;
  height: 1.25rem;
  background: var(--on-dark);
  animation: trickle 2.6s var(--ease) infinite;
}

@keyframes trickle {
  0% {
    transform: translateY(-2.25rem) scaleY(0.35);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: translateY(0) scaleY(1);
    opacity: 0;
  }
}

/* -------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.btn--primary {
  background: var(--paper);
  color: var(--ink);
}

.btn--primary:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: rgba(238, 243, 243, 0.3);
  color: var(--on-dark);
}

.btn--ghost:hover {
  border-color: var(--on-dark);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------- facts -- */
.facts {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.facts__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 48rem) {
  .facts__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 2vw, 2rem) clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .fact {
    border-top: 0;
  }
  .fact + .fact {
    padding-left: clamp(1.25rem, 3vw, 2.5rem);
    border-left: 1px solid var(--line);
  }
}

.fact__value {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.fact__label {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: balance;
}

/* ----------------------------------------------------------- principles -- */
.principles {
  display: grid;
  gap: 1px;
  background: var(--line-strong);
  border-block: 1px solid var(--line-strong);
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.principle {
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.5rem, 3vw, 3rem);
  background: var(--paper-alt);
}

.principle__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  color: var(--sea);
  opacity: 0.75;
}

.principle__title {
  margin-top: 1.5rem;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

.principle__text {
  margin-top: 0.875rem;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1rem;
}

/* ------------------------------------------------------------ portfolio -- */
.portfolio {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 48rem) {
  .portfolio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition:
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -30px rgba(11, 20, 24, 0.45);
}

.card__sector {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sea);
}

.card__title {
  margin-top: 1.125rem;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
}

.card__text {
  margin-top: 1rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1rem;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: auto;
  align-self: flex-start;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: border-color 0.25s var(--ease);
}

.card__link:hover {
  border-color: var(--ink);
}

.card__arrow {
  width: 0.7rem;
  height: 0.7rem;
  border-top: 1.4px solid currentColor;
  border-right: 1.4px solid currentColor;
  rotate: 45deg;
  transition: translate 0.25s var(--ease);
}

.card__link:hover .card__arrow {
  translate: 0.2rem -0.2rem;
}

/* -------------------------------------------------------------- contact -- */
.section--contact {
  background: linear-gradient(168deg, var(--sea-deep) 0%, #0a2831 100%);
  color: var(--on-dark);
}

.section--contact .section__title {
  color: var(--on-dark);
}

.contact__lead {
  max-width: 42ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--on-dark-muted);
}

.contact__mail {
  display: inline-block;
  margin-top: 1.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(238, 243, 243, 0.35);
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  letter-spacing: -0.015em;
  transition: border-color 0.25s var(--ease);
}

.contact__mail:hover {
  border-color: var(--on-dark);
}

.company-details {
  margin: clamp(2.75rem, 6vw, 4rem) 0 0;
  border-top: 1px solid rgba(238, 243, 243, 0.18);
}

.company-details__row {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid rgba(238, 243, 243, 0.12);
}

@media (min-width: 30rem) {
  .company-details__row {
    grid-template-columns: minmax(9rem, 1fr) minmax(0, 2fr);
  }
}

.company-details dt {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.company-details dd {
  margin: 0;
  font-size: 1rem;
}

/* --------------------------------------------------------------- footer -- */
.site-footer {
  padding-block: clamp(3.5rem, 7vw, 5rem) 2.5rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 48rem) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr);
  }
}

.site-footer__note {
  margin-top: 1.25rem;
  max-width: 34ch;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

.site-footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__nav a {
  font-size: 0.9375rem;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.site-footer__nav a:hover {
  color: var(--ink);
}

.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

.site-footer__copy {
  margin-top: 0.85rem;
  color: var(--ink);
}

/* ------------------------------------------------------------ reveal ----- */
/* Only applied when JavaScript is running, so the page is fully readable
   without it. Everything above the fold uses the CSS-only .rise instead. */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .hero__backdrop,
  .hero__scroll span {
    animation: none;
  }
}
