/* ==========================================================================
   DEVNOVA SOLUTIONS LTD — THE NOVA SYSTEM
   main.css — design tokens, reset, typography, layout, header, footer
   ========================================================================== */

:root {
  /* Core palette */
  --ink: #08110f;
  --graphite: #14201d;
  --paper: #f4f1e8;
  --white: #ffffff;
  --mint: #42e8b4;
  --amber: #ffb15a;
  --blue: #5e7bff;
  --grey: #82908b;

  /* Derived surfaces */
  --ink-soft: #0d1917;
  --ink-line: rgba(244, 241, 232, 0.12);
  --ink-line-strong: rgba(244, 241, 232, 0.24);
  --paper-line: rgba(8, 17, 15, 0.14);
  --paper-line-strong: rgba(8, 17, 15, 0.28);
  --paper-tint: #eae6d9;
  --paper-deep: #e2ddcd;

  /* Semantic text */
  --text-on-dark: #f4f1e8;
  --text-on-dark-muted: #9daaa4;
  --text-on-light: #08110f;
  --text-on-light-muted: #55625d;

  /* Typography */
  --font-display: "Segoe UI Variable Display", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Consolas",
    "Liberation Mono", Menlo, monospace;

  /* Type scale */
  --step--2: clamp(0.68rem, 0.66rem + 0.1vw, 0.74rem);
  --step--1: clamp(0.8rem, 0.77rem + 0.15vw, 0.88rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.18vw, 1.05rem);
  --step-1: clamp(1.1rem, 1.03rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.32rem, 1.19rem + 0.62vw, 1.7rem);
  --step-3: clamp(1.6rem, 1.35rem + 1.2vw, 2.35rem);
  --step-4: clamp(1.95rem, 1.5rem + 2.1vw, 3.3rem);
  --step-5: clamp(2.3rem, 1.55rem + 3.4vw, 4.6rem);
  --step-6: clamp(2.7rem, 1.5rem + 5.4vw, 6.2rem);

  /* Spacing */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.25rem;
  --space-xl: 3.25rem;
  --space-2xl: 4.5rem;
  --space-3xl: 6.5rem;
  --section-y: clamp(3.75rem, 2.5rem + 5vw, 7.5rem);

  /* Layout */
  --shell: 1320px;
  --shell-narrow: 940px;
  --gutter: clamp(1.15rem, 0.6rem + 2.4vw, 3.25rem);
  --radius-s: 4px;
  --radius-m: 10px;
  --radius-l: 20px;
  --header-h: 76px;

  /* Effects */
  --shadow-s: 0 1px 2px rgba(8, 17, 15, 0.06), 0 6px 16px rgba(8, 17, 15, 0.05);
  --shadow-m: 0 2px 4px rgba(8, 17, 15, 0.05), 0 18px 42px rgba(8, 17, 15, 0.09);
  --shadow-l: 0 30px 80px rgba(8, 17, 15, 0.16);
  --ease-out: cubic-bezier(0.22, 0.68, 0.24, 1);
  --ease-in-out: cubic-bezier(0.62, 0.04, 0.24, 1);
  --dur-fast: 160ms;
  --dur-base: 320ms;
  --dur-slow: 620ms;

  --z-skip: 120;
  --z-header: 90;
  --z-menu: 95;
  --z-overlay: 110;
  --z-banner: 100;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text-on-light);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-4);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 var(--space-s);
  text-wrap: pretty;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

ul,
ol {
  margin: 0 0 var(--space-s);
  padding-left: 1.15rem;
}

li {
  margin-bottom: 0.35rem;
}

li::marker {
  color: var(--grey);
}

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

strong,
b {
  font-weight: 650;
}

hr {
  border: 0;
  border-top: 1px solid var(--paper-line);
  margin: var(--space-l) 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.on-dark :focus-visible,
.section--ink :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--mint);
}

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

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

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

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

.shell--narrow {
  max-width: var(--shell-narrow);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-s);
  z-index: var(--z-skip);
  background: var(--ink);
  color: var(--mint);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-s);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-s);
}

/* Section shells ---------------------------------------------------------- */

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

.section--tight {
  padding-block: calc(var(--section-y) * 0.62);
}

.section--ink {
  background: var(--ink);
  color: var(--text-on-dark);
}

.section--graphite {
  background: var(--graphite);
  color: var(--text-on-dark);
}

.section--paper {
  background: var(--paper);
  color: var(--text-on-light);
}

.section--tint {
  background: var(--paper-tint);
  color: var(--text-on-light);
}

.section--white {
  background: var(--white);
  color: var(--text-on-light);
}

.section--ink p,
.section--graphite p {
  color: var(--text-on-dark-muted);
}

.section--ink h1,
.section--ink h2,
.section--ink h3,
.section--ink h4,
.section--graphite h1,
.section--graphite h2,
.section--graphite h3,
.section--graphite h4 {
  color: var(--text-on-dark);
}

/* Section headers --------------------------------------------------------- */

.section-head {
  display: grid;
  gap: var(--space-m);
  margin-bottom: var(--space-xl);
  grid-template-columns: minmax(0, 1fr);
}

.section-head--split {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  gap: var(--space-xl);
}

.section-head p {
  max-width: 62ch;
  font-size: var(--step-1);
  line-height: 1.6;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-on-light-muted);
  margin: 0 0 var(--space-s);
}

.section--ink .eyebrow,
.section--graphite .eyebrow,
.site-footer .eyebrow {
  color: var(--mint);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  flex: none;
  opacity: 0.65;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: 68ch;
}

.text-mint {
  color: var(--mint);
}
.text-amber {
  color: var(--amber);
}
.text-blue {
  color: var(--blue);
}

/* --------------------------------------------------------------------------
   Header / primary navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(8, 17, 15, 0.9);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--ink-line);
  color: var(--text-on-dark);
  transition: background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(8, 17, 15, 0.97);
  border-bottom-color: var(--ink-line-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-on-dark);
  flex: none;
  padding: 0.35rem 0;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.29em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 0.32rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 0.9vw, 1.1rem);
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.15rem, 0.55vw, 0.55rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0.6rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-on-dark-muted);
  border-radius: var(--radius-s);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.28rem;
  height: 1.5px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-out);
}

.primary-nav__link:hover,
.primary-nav__link:focus-visible {
  color: var(--text-on-dark);
}

.primary-nav__link:hover::after,
.primary-nav__link:focus-visible::after {
  transform: scaleX(1);
}

.primary-nav__link[aria-current] {
  color: var(--text-on-dark);
}

.primary-nav__link[aria-current]::after {
  transform: scaleX(1);
  background: var(--amber);
}

.header-cta {
  flex: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--radius-s);
  color: var(--text-on-dark);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  min-height: 44px;
}

.nav-toggle__bars {
  position: relative;
  width: 18px;
  height: 12px;
  flex: none;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.nav-toggle__bars span:nth-child(1) {
  top: 0;
}
.nav-toggle__bars span:nth-child(2) {
  top: 5.25px;
}
.nav-toggle__bars span:nth-child(3) {
  top: 10.5px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5.25px) rotate(-45deg);
}

/* Mobile navigation panel */

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: var(--z-menu);
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
  color: var(--text-on-dark);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  padding: var(--space-l) 0 var(--space-2xl);
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__list {
  list-style: none;
  margin: 0 0 var(--space-l);
  padding: 0;
  border-top: 1px solid var(--ink-line);
}

.mobile-nav__item {
  margin: 0;
  border-bottom: 1px solid var(--ink-line);
}

.mobile-nav__link {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  padding: 1.05rem 0.25rem;
  text-decoration: none;
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.018em;
  min-height: 48px;
}

.mobile-nav__link[aria-current] {
  color: var(--mint);
}

.mobile-nav__index {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--grey);
  flex: none;
}

.mobile-nav__foot {
  display: grid;
  gap: var(--space-s);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-on-dark-muted);
}

.mobile-nav__foot a {
  color: var(--mint);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Scroll progress bar */

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--mint), var(--blue) 60%, var(--amber));
  pointer-events: none;
}

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

.site-footer {
  background: var(--ink);
  color: var(--text-on-dark-muted);
  border-top: 1px solid var(--ink-line);
  padding-block: var(--space-2xl) var(--space-l);
  font-size: var(--step--1);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
  gap: var(--space-xl) var(--space-l);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--ink-line);
}

.footer-brand .brand {
  margin-bottom: var(--space-m);
}

.footer-brand p {
  max-width: 38ch;
  color: var(--text-on-dark-muted);
}

.footer-title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0 0 var(--space-s);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.footer-list a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--text-on-dark-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--text-on-dark);
  transform: translateX(3px);
}

.footer-address {
  font-style: normal;
  display: grid;
  gap: 0.35rem;
}

.footer-address a {
  color: var(--mint);
  text-decoration: none;
}

.footer-address a:hover {
  text-decoration: underline;
}

.footer-meta {
  display: grid;
  gap: 0.4rem;
  margin-top: var(--space-m);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.03em;
  color: var(--grey);
}

.footer-activities {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-activities li {
  display: flex;
  gap: 0.6rem;
  margin: 0;
  line-height: 1.45;
}

.footer-activities .sic {
  font-family: var(--font-mono);
  color: var(--amber);
  flex: none;
}

.footer-notice {
  padding-block: var(--space-l);
  border-bottom: 1px solid var(--ink-line);
  color: var(--grey);
  font-size: var(--step--2);
  line-height: 1.7;
  max-width: 105ch;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-l);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  color: var(--grey);
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

.footer-bottom a {
  color: var(--grey);
  text-decoration: none;
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
  color: var(--mint);
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .page-transition,
  .hero-canvas {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
