/* ==========================================================================
   INOVATTEC LTD — corporate website
   Single stylesheet. No external dependencies.
   ========================================================================== */

:root {
  /* Palette — built around the wordmark grey (#575757) */
  --paper: #f6f5f2;
  --paper-2: #efeeea;
  --ink: #1b1c1e;
  --ink-2: #3a3b3e;
  --grey: #575757;      /* INOVATTEC wordmark grey */
  --grey-2: #77787a;
  --rule: #d9d7d1;
  --rule-2: #c8c6bf;
  --accent: #4f6273;    /* single muted steel accent, used sparingly */
  --dark: #1e1f22;
  --dark-2: #26272b;
  --on-dark: #ecebe6;
  --on-dark-2: #aeada8;
  --rule-dark: #3a3b40;

  /* Type */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --col-gap: 24px;
  --section-y: clamp(56px, 7vw, 100px);
  --header-h: 64px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, p, dl, dd, dt, ul { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 1px;
}

::selection { background: #d5dbe0; color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

.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;
}

.skip-link {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline-color: var(--paper); }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  line-height: 1.4;
}

.label .num {
  color: var(--ink);
  margin-right: 0.9em;
  font-variant-numeric: tabular-nums;
}

h1 {
  font-size: clamp(2.5rem, 1.2rem + 4.4vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.024em;
  text-wrap: balance;
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.75rem, 1.15rem + 1.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.008em;
}

.lead {
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.prose p { max-width: 58ch; text-wrap: pretty; }
.prose p + p { margin-top: 1.1em; }
.prose .emphasis { color: var(--ink); font-weight: 500; }

.muted { color: var(--grey); }

.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rule-2);
  transition: text-decoration-color 160ms ease;
}
.link:hover { text-decoration-color: var(--ink); }

.link-ext::after {
  content: "\2197";            /* ↗ */
  display: inline-block;
  margin-left: 0.35em;
  font-size: 0.85em;
  color: var(--grey);
  transition: transform 160ms ease;
}
.link-ext:hover::after { transform: translate(1px, -1px); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 44px;
}
.brand img {
  height: 16px;
  width: auto;
}

.site-nav ul {
  display: flex;
  gap: clamp(20px, 2.6vw, 40px);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  transition: color 160ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }

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

.hero {
  padding-top: clamp(56px, 8vw, 112px);
}

.hero-grid { align-items: end; row-gap: 40px; }

.hero-heading { grid-column: 1 / span 7; }
.hero-heading .label { margin-bottom: 28px; }

.hero-lead {
  grid-column: 8 / span 5;
  max-width: 30em;
  padding-bottom: 0.35em;   /* optical alignment with the heading baseline */
}

/* Hero drawing — full-bleed band */
.hero-figure {
  position: relative;
  margin-top: clamp(48px, 6vw, 88px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.hero-figure svg {
  width: 100%;
  height: 300px;
}

.hero-figure .drawing-mobile { display: none; }

.hero-figure .rail { stroke: var(--rule); stroke-width: 1; }
.hero-figure .zone { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 2 6; }
.hero-figure .route {
  fill: none;
  stroke: var(--grey);
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.hero-figure .node { fill: var(--paper); stroke: var(--grey); stroke-width: 1.5; }
.hero-figure .node { transition: fill 500ms ease, stroke 500ms ease; }
.hero-figure .node.is-active { fill: var(--accent); stroke: var(--accent); }
.hero-figure .node.is-lit { fill: var(--accent); stroke: var(--accent); }
.hero-figure .pulse { fill: var(--accent); opacity: 0; }

.routes-layer { will-change: transform; }

/* Draw-in on first paint (CSS only; page is complete without it) */
@media (prefers-reduced-motion: no-preference) {
  .hero-figure .route {
    stroke-dasharray: var(--len, 2600);
    stroke-dashoffset: var(--len, 2600);
    animation: draw 2400ms cubic-bezier(0.3, 0.5, 0.3, 1) forwards;
  }
  .hero-figure .route.r2 { animation-delay: 400ms; animation-duration: 1800ms; }
  .hero-figure .route.r3,
  .hero-figure .route.r4 { animation-delay: 900ms; animation-duration: 1400ms; }
  .hero-figure .node {
    opacity: 0;
    animation: appear 700ms ease forwards;
    animation-delay: 1500ms;
  }
  .hero-figure .node.is-active { animation-delay: 2100ms; }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes appear {
  to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--section-y);
}

/* The first section follows the hero drawing directly: slightly shorter approach */
.hero + .section { padding-top: clamp(48px, 6vw, 88px); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
}

.section-head .label { margin: 0; }

/* About */
.about-heading { grid-column: 1 / span 5; }
.about-body { grid-column: 7 / span 6; }

/* Capabilities */
.cap-intro { grid-column: 1 / span 7; margin-bottom: clamp(40px, 5vw, 64px); }

.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}

.cap {
  padding: 36px 48px 44px 0;
  border-top: 1px solid var(--rule);
}

.cap:nth-child(even) {
  padding-left: 48px;
  border-left: 1px solid var(--rule);
}

.cap-mark {
  width: 36px;
  height: 18px;
  margin-bottom: 28px;
  color: var(--grey);
}

.cap h3 { margin-bottom: 12px; }
.cap p { max-width: 44ch; color: var(--ink-2); text-wrap: pretty; }

/* Approach — dark block */
.section-dark {
  background: var(--dark);
  color: var(--on-dark);
}

.section-dark .section-head { border-bottom-color: var(--rule-dark); }
.section-dark .label { color: var(--on-dark-2); }
.section-dark .label .num { color: var(--on-dark); }
.section-dark h2 { color: #f4f3ee; }

.principles-heading { grid-column: 1 / span 6; margin-bottom: clamp(40px, 5vw, 64px); }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule-dark);
}

.principle {
  padding: 36px 40px 8px 0;
}

.principle + .principle {
  padding-left: 40px;
  border-left: 1px solid var(--rule-dark);
}

.principle .index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--on-dark-2);
  margin-bottom: 40px;
}

.principle h3 { color: #f4f3ee; margin-bottom: 12px; }
.principle p { color: var(--on-dark-2); max-width: 36ch; text-wrap: pretty; }

/* Contact */
.contact-heading { grid-column: 1 / span 5; }
.contact-body { grid-column: 6 / span 7; }

.email {
  display: inline-block;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 6px;
  transition: border-color 160ms ease, color 160ms ease;
  overflow-wrap: anywhere;
}
.email:hover { border-color: var(--ink); }

.contact-body p { margin-top: 24px; max-width: 48ch; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 36px 0 40px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--grey);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.footer-top img { height: 13px; width: auto; }

.footer-top ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-top a {
  display: inline-block;
  padding: 6px 0;
  color: var(--ink-2);
  font-size: 0.875rem;
}
.footer-top a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px 40px;
  padding-top: 22px;
  font-size: 0.75rem;
  color: var(--grey-2);
}

.footer-legal { max-width: 78ch; text-wrap: balance; }
.footer-legal a { color: inherit; }
.footer-legal a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-copy { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .hero-heading { grid-column: 1 / span 12; }
  .hero-lead { grid-column: 1 / span 8; padding-bottom: 0; }

  .about-heading { grid-column: 1 / span 10; margin-bottom: 32px; }
  .about-body { grid-column: 1 / span 10; }

  .cap-intro { grid-column: 1 / span 10; }
  .cap { padding-right: 32px; }
  .cap:nth-child(even) { padding-left: 32px; }

  .principles-heading { grid-column: 1 / span 10; }

  .contact-heading { grid-column: 1 / span 10; margin-bottom: 24px; }
  .contact-body { grid-column: 1 / span 12; }

  .footer-bottom { flex-direction: column; }
}

@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr; border-top: 0; }
  .principle {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    padding: 28px 0 32px;
    border-top: 1px solid var(--rule-dark);
  }
  .principle + .principle { padding-left: 0; border-left: 0; }
  .principle .index { grid-column: 1; grid-row: 1 / span 2; margin-bottom: 0; padding-top: 7px; }
  .principle h3, .principle p { grid-column: 2; }
  .principle p { max-width: 52ch; }
}

@media (max-width: 767px) {
  :root { --header-h: 0px; }

  body { font-size: 1rem; }

  /* Compact header: logo row + a single row of four links. Not sticky on small screens. */
  .site-header { position: static; }
  .site-header .container {
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }
  .brand { height: 52px; }
  .brand img { height: 14px; }

  .site-nav { border-top: 1px solid var(--rule); }
  .site-nav ul { justify-content: space-between; gap: 8px; }
  .site-nav a { height: 44px; font-size: 0.8125rem; }
  .site-nav a::after { bottom: 9px; }

  .hero { padding-top: 40px; }
  .hero-grid { row-gap: 26px; }
  .hero-heading .label { margin-bottom: 18px; }
  .hero-lead { grid-column: 1 / span 12; }

  .hero-figure { margin-top: 40px; }
  .hero-figure svg { height: 240px; }
  .hero-figure .drawing-desktop { display: none; }
  .hero-figure .drawing-mobile { display: block; }

  .hero + .section { padding-top: 48px; }
  .section-head { margin-bottom: 36px; }
  h2 { text-wrap: pretty; }

  .cap-grid { grid-template-columns: 1fr; }
  .cap { padding: 28px 0 32px; }
  .cap:nth-child(even) { padding-left: 0; border-left: 0; }
  .cap-mark { margin-bottom: 20px; }

  .principle { grid-template-columns: 2.75rem minmax(0, 1fr); }

  .contact-body p { margin-top: 20px; }

  .footer-top { flex-direction: column; align-items: flex-start; gap: 18px; padding-bottom: 22px; }
  .footer-top ul { gap: 4px 20px; }
  .footer-bottom { gap: 12px; padding-top: 18px; }
}

@media (max-width: 400px) {
  .site-nav a { font-size: 0.75rem; letter-spacing: 0.01em; }
}

/* Large screens: keep the page composed rather than stretched */
@media (min-width: 1600px) {
  .hero-figure svg { height: 320px; }
}

/* Print */
@media print {
  .site-header { position: static; }
  .hero-figure { display: none; }
  .section-dark { background: none; color: var(--ink); }
  .section-dark h2, .section-dark .label .num, .principle h3 { color: var(--ink); }
  .section-dark .label, .principle p { color: var(--grey); }
  .principles, .principle, .section-dark .section-head { border-color: var(--rule); }
  a { color: inherit; }
}
