/* AUV project site — base styles: reset, typography, page container,
   top navigation, hero, section rhythm, footer.
   Components (cards, figures, the AUV inspection sheet, …) are in
   components.css; the interactive demo is styled in demo.css. */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }

a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--deep); }

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

button { font: inherit; color: inherit; }

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

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -60px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--deep);
  color: var(--on-deep);
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }

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

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.3;
}

.prose {
  font-family: var(--font-prose);
  font-size: var(--text-body);
  line-height: 1.7;
  max-width: var(--measure);
}
.prose p + p { margin-top: var(--space-4); }

.lead {
  font-family: var(--font-prose);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.55;
  max-width: 54ch;
}

/* ---------- Top navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--sheet) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  color: var(--ink);
  text-decoration: none;
}
.brand__mark {
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}
.brand__name { font-size: var(--text-small); color: var(--ink-soft); }
@media (max-width: 640px) { .brand__name { display: none; } }

.site-nav ul { display: flex; gap: 2px; }
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); background: var(--sea-soft); }
.site-nav a[aria-current="true"] { color: var(--ink); background: var(--sea-soft); }

.menu-btn {
  display: none;
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  cursor: pointer;
}

@media (max-width: 939.98px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: var(--space-3) var(--gutter) var(--space-5);
    background: var(--sheet);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 12px 24px rgb(10 37 54 / 0.12);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 8px; font-size: 1rem; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-8);
  background:
    repeating-radial-gradient(circle at 76% 46%, rgb(14 90 114 / 0.075) 0 1px, transparent 1px 46px),
    linear-gradient(180deg, var(--sheet), var(--paper));
}

.hero__grid {
  position: relative;
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.hero h1 {
  font-size: clamp(5rem, 3rem + 11vw, 10rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.hero__sub {
  margin-top: var(--space-4);
  font-size: clamp(1.3rem, 1rem + 1.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--sea);
}
.hero .lead { margin-top: var(--space-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

.hero__figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--sheet);
  box-shadow: var(--shadow);
}

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

.section { padding-block: var(--space-9); scroll-margin-top: var(--header-h); }
.section--white { background: var(--sheet); }
.section__head { max-width: 62ch; margin-bottom: var(--space-7); }
.section__head h2 + p {
  margin-top: var(--space-4);
  font-family: var(--font-prose);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.subhead { margin-top: var(--space-8); margin-bottom: var(--space-5); }

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

.site-footer {
  background: var(--deep);
  color: var(--on-deep);
  padding-block: var(--space-7);
}
.site-footer a { color: var(--on-deep); }
.site-footer__brand { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-4); }
.site-footer__brand .brand__mark { font-size: 1.6rem; }
.site-footer__brand span:last-child { color: color-mix(in srgb, var(--on-deep) 70%, transparent); }
.site-footer p { max-width: 74ch; }
.site-footer__small { margin-top: var(--space-4); font-size: var(--text-small); color: color-mix(in srgb, var(--on-deep) 70%, transparent); }
