/* =================================================================
   NOEM site: tokens, reset, layout, type, nav, buttons, footer.
   Tokens 1:1 from the Figma file "noem" (node 4285-40011); see
   docs/DESIGN_STYLE_GUIDE.md. Page sections live in home.css / pages.css,
   the live map in map.css.
   ================================================================= */

/* The Inter @font-face lives inline in templates/public_base.html so its URL carries
   the same asset hash as the <link rel="preload"> (otherwise the font loads twice). */

/* ---------- Tokens ---------- */
:root {
  --midnight-500: #02222a;
  --midnight-400: #133f49;
  --midnight-300: #054f61;
  --midnight-200: #9ee8fa;
  --midnight-100: #c5f1fc;

  --grey-500: #1f1f1f;
  --grey-400: #666666;
  --grey-300: #999999;
  --grey-200: #d3d3d3;
  --grey-100: #eaeaea;
  --white:     #ffffff;

  /* Status colours (static/design/colors.txt; not in the hand-off) */
  --status-green: #168a41;  --status-green-bg: #cff2dc;
  --status-yellow: #c2950e; --status-yellow-bg: #fff6dd;
  --status-red: #ca3535;    --status-red-bg: #fde6e3;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 200px;

  --gutter: 24px;          /* page frame inset */
  --pad-x: 96px;           /* section inner padding */
  --pad-y: 80px;
  --nav-h: 48px;
  --nav-pad: 16px;
  --nav-band: 80px;        /* 16 + 48 + 16 */

  --ease: cubic-bezier(.22, .61, .36, 1);
  --fast: 160ms;
  --mid: 260ms;
  --slow: 480ms;

  /* One definition, used by body::before and .nav::before so both match exactly. */
  --page-gradient: linear-gradient(180deg, #c5f1fc 0%, #d6eef6 26%, #ecf3f5 62%, #fbfcfc 100%);

  --shadow-1: 0 2px 8px rgba(2, 34, 42, .06);
  --shadow-2: 0 10px 28px -8px rgba(2, 34, 42, .18);
  --shadow-3: 0 18px 44px -12px rgba(2, 34, 42, .28);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure, address { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
sub { font-size: .72em; vertical-align: -.18em; line-height: 0; }

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

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-optical-sizing: auto;
  color: var(--grey-500);
  background-color: #fdfdfd;
  padding-bottom: var(--gutter);
  overflow-x: hidden;
}

/* Viewport-fixed page gradient (a fixed pseudo-element is more reliable than
   background-attachment: fixed in iOS Safari). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  background: var(--page-gradient);
  pointer-events: none;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--midnight-500); color: #fff;
  padding: 12px 20px; border-radius: 0 0 var(--r-sm) 0;
  font-size: 14px; font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---------- Layout ---------- */
.shell {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding: var(--pad-y) var(--pad-x); }
.section--center { text-align: center; }
.section--tight { padding-top: 40px; }

.section__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 48px;
}
.section__head--center { align-items: center; text-align: center; gap: 24px; }

/* ---------- Type scale ---------- */
.h1 {
  font-size: 62px; font-weight: 650;
  line-height: 1.16; letter-spacing: -.02em;
  max-width: 15ch;
  color: var(--white);
}
.h2 {
  font-size: 58px; font-weight: 550;
  line-height: 1.17; letter-spacing: -.04em;
  max-width: 20ch;
}
.h2--onDark { color: var(--white); }
.h2--wide { max-width: 707px; }
.h3 { font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.h3--display { font-size: 48px; font-weight: 550; line-height: 1.18; letter-spacing: -.04em; }
.h4 { font-size: 20px; font-weight: 600; line-height: 1.48; letter-spacing: -.02em; }
.h4--onDark { color: var(--white); }

.eyebrow {
  font-size: 14px; font-weight: 500; line-height: 1.2;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--grey-500);
}
.eyebrow--onDark { color: var(--grey-200); }

.lead {
  font-size: 16px; font-weight: 450; line-height: 1.45;
  letter-spacing: -.03em; color: var(--grey-400);
  max-width: 64ch;
}
.lead--onDark { color: var(--grey-200); }
.lead--center { max-width: 55ch; font-size: 20px; letter-spacing: -.01em; }

.text-link { color: var(--midnight-300); text-decoration: underline; text-underline-offset: 2px; }
.text-link:hover { color: var(--midnight-500); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: var(--nav-pad);
}
/* Opaque band showing the same slice of the page gradient that sits behind it. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--page-gradient) no-repeat top center;
  background-size: 100% 100vh;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
  padding-inline: calc(var(--gutter) + 8px);
}

.nav__logo { flex: 1 0 0; min-width: 0; }
.nav__logo img { height: 34px; width: 139px; }

.nav__links { display: flex; align-items: center; gap: 4px; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--nav-h);
  padding-inline: 24px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1.2;
  color: var(--grey-500);
  white-space: nowrap;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease),
              color var(--fast) var(--ease);
}
.nav__link:hover {
  background: rgba(255, 255, 255, .55);
  color: var(--midnight-500);
}
/* scroll-spy / current page: the "Product" pill from the Figma file */
.nav__link.is-active {
  border-color: var(--grey-300);
  background: rgba(255, 255, 255, .55);
}
/* the Contact and Login entries live in the burger menu on small screens only */
.nav__link--cta, .nav__link--login { display: none; }

.nav__actions { flex: 1 0 0; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }

.lang {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; margin: -6px -10px;
  background: none; border: 0; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; line-height: 1.2;
  color: var(--grey-500); cursor: pointer;
  transition: background var(--fast) var(--ease);
}
.lang img { width: 24px; height: 24px; }
.lang:hover { background: rgba(255, 255, 255, .65); }
.lang--onDark { color: var(--grey-200); }
.lang--onDark:hover { background: rgba(255, 255, 255, .1); }

/* burger: mobile only */
.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 0; background: none; cursor: pointer;
  border: 1px solid var(--grey-300); border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.burger span {
  width: 18px; height: 2px; border-radius: 2px;
  background: var(--grey-500);
  transition: transform var(--mid) var(--ease), opacity var(--fast) var(--ease);
}
.burger:hover { background: rgba(255, 255, 255, .6); border-color: var(--midnight-300); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-bd: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding-inline: 40px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 16px; font-weight: 550; line-height: 1.3;
  white-space: nowrap; cursor: pointer;
  overflow: hidden;
  transition: background var(--mid) var(--ease), border-color var(--mid) var(--ease),
              color var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}
/* soft sheen that sweeps across on hover */
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .22) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform var(--slow) var(--ease);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { box-shadow: var(--shadow-2); }
.btn:active { box-shadow: var(--shadow-1); }

.btn--sm { height: 48px; font-size: 14px; font-weight: 600; }
.btn--lg { height: 56px; padding-inline: 32px; font-size: 16px; font-weight: 600; }

.btn--midnight { --btn-bg: var(--midnight-500); --btn-fg: var(--white); }
.btn--midnight:hover { --btn-bg: #043c49; }

.btn--teal { --btn-bg: var(--midnight-300); --btn-fg: var(--white); }
.btn--teal:hover { --btn-bg: #076f88; }

.btn--ice { --btn-bg: var(--midnight-200); --btn-fg: var(--grey-500); }
.btn--ice:hover { --btn-bg: var(--midnight-100); }
.btn--ice::after { background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 66%); }

.btn--outline-light { --btn-bd: var(--grey-200); --btn-fg: var(--white); }
.btn--outline-light:hover { --btn-bg: rgba(255, 255, 255, .14); --btn-bd: var(--white); }

.btn--outline { --btn-bd: var(--grey-300); --btn-fg: var(--grey-500); }
.btn--outline:hover { --btn-bg: rgba(255, 255, 255, .6); --btn-bd: var(--midnight-300); }

/* ---------- Flash notice (contact form result, rendered by public_base.html) ---------- */
.notice {
  margin: 8px auto 0;
  padding: 14px 20px;
  border: 1px solid var(--grey-200);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .8);
  font-size: 14px; font-weight: 600; line-height: 1.4;
  color: #0d5f2d;
}
.notice--error { color: var(--status-red); border-color: rgba(202, 53, 53, .35); }
.notice--warning { color: #7a5a00; }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-direction: column; gap: 24px;
  margin-top: var(--gutter);
  padding: 42px;
  border-radius: var(--r-md);
  background: linear-gradient(174deg, var(--midnight-500) 6%, var(--midnight-400) 56%, var(--midnight-400) 100%);
}
.footer__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; padding-bottom: 8px;
}
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.footer__brand img { height: 34px; width: 139px; flex: none; }
.footer__claim { display: flex; flex-direction: column; gap: 8px; max-width: 357px; }
.footer__claimTitle {
  font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: -.03em;
  color: var(--grey-200);
}
/* grey-200, not grey-300: the file's value fails WCAG AA (4.02:1). */
.footer__claimText {
  font-size: 16px; font-weight: 400; line-height: 1.2; letter-spacing: -.03em;
  color: var(--grey-200);
}
.footer__rule { width: 100%; height: 0; margin: 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .2); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-inline: 4px;
}
.footer__links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer__links a {
  font-size: 14px; font-weight: 600; line-height: 1.2;
  color: var(--grey-200);
  transition: color var(--fast) var(--ease);
}
.footer__links a:hover { color: var(--white); }
/* secondary pages (not in the hand-off, decision D1): a quieter second row */
.footer__pages { padding-inline: 4px; padding-bottom: 8px; }
.footer__pages a { font-weight: 500; color: var(--grey-300); }

/* ---------- Anchor offset + scroll reveal ---------- */
[id] { scroll-margin-top: calc(var(--nav-band) + 16px); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive (breakpoints added by the designer, not in Figma) ---------- */
@media (max-width: 1280px) {
  :root { --pad-x: 48px; --pad-y: 64px; }
  .h1 { font-size: 52px; }
  .h2 { font-size: 46px; }
}

@media (max-width: 1024px) {
  .nav__links {
    position: absolute;
    top: calc(100% + 8px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px;
    border: 1px solid var(--grey-200);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-3);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease),
                visibility var(--mid);
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link { justify-content: flex-start; }
  .burger { display: flex; }
  .nav__cta { display: none; }
  .nav__link--cta {
    display: inline-flex;
    margin-top: 4px;
    justify-content: center;
    background: var(--midnight-500);
    color: var(--white);
  }
  .nav__link--cta:hover { background: #043c49; color: var(--white); }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --pad-x: 20px; --pad-y: 48px; }
  .h1 { font-size: 36px; }
  .h2 { font-size: 32px; letter-spacing: -.03em; }
  .h3--display { font-size: 34px; }
  .lead--center { font-size: 17px; }
  .nav__login { display: none; }
  .nav__link--login { display: inline-flex; }
  .footer { padding: 24px; }
  .footer__top { flex-direction: column; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer__links { gap: 20px; }
}

/* Screen-reader-only text */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
