:root {
  color-scheme: light dark;
  --page: #82afc0;
  --panel: #527f90;
  --panel-soft: #a8c9d3;
  --paper: #fbf8ef;
  --ink: #18343d;
  --ink-soft: #41606a;
  --line: rgba(24, 52, 61, 0.24);
  --light-line: rgba(251, 248, 239, 0.32);
  --focus: #122b33;
  --panel-radius: 1.75rem;
  --control-radius: 999px;
  --max-width: 92rem;
  --gutter: clamp(1rem, 2.8vw, 2.5rem);
  --font-display: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #173943;
    --panel: #2a5968;
    --panel-soft: #416f7d;
    --paper: #f5f0e6;
    --ink: #f5f0e6;
    --ink-soft: #bdd1d5;
    --line: rgba(245, 240, 230, 0.24);
    --light-line: rgba(245, 240, 230, 0.28);
    --focus: #f5f0e6;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--paper);
  color: #18343d;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.header-inner {
  min-height: 5rem;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
  text-decoration: none;
}

.site-nav,
.footer-links,
.product-nav {
  display: flex;
  align-items: center;
}

.site-nav {
  gap: clamp(1rem, 2.4vw, 2rem);
  font-size: 0.9rem;
  font-weight: 620;
}

.site-nav a,
.footer-links a {
  text-decoration: none;
}

.site-nav a:not(.nav-contact):hover,
.footer-links a:hover {
  text-decoration: underline;
}

.nav-contact {
  padding: 0.6rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--paper);
  color: #18343d;
}

.home-layout {
  width: min(calc(100% - (2 * var(--gutter))), calc(var(--max-width) - (2 * var(--gutter))));
  min-height: clamp(39rem, calc(100dvh - 10rem), 53rem);
  margin: 0 auto var(--gutter);
  display: grid;
  grid-template-columns: minmax(18rem, 0.78fr) minmax(32rem, 1.22fr);
  gap: 0.75rem;
}

.intro-panel,
.library-panel {
  border-radius: var(--panel-radius);
  overflow: hidden;
}

.intro-panel {
  padding: clamp(2rem, 4vw, 4.25rem);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 3rem;
  background: var(--panel);
  color: var(--paper);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin-top: 0;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 9ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3.1rem, 5.2vw, 5.8rem);
  font-weight: 540;
}

.intro-panel p {
  max-width: 30rem;
  margin: 0;
  color: rgba(251, 248, 239, 0.82);
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
}

.button {
  min-height: 3rem;
  width: fit-content;
  padding: 0.72rem 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 680;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button-light {
  background: var(--paper);
  color: #18343d;
}

.button-light:hover {
  background: #ffffff;
}

.button-quiet {
  border-color: var(--light-line);
  color: var(--paper);
}

.button-quiet:hover {
  border-color: var(--paper);
}

.library-panel {
  min-width: 0;
  padding: clamp(1.25rem, 2.6vw, 2.25rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  background: var(--panel-soft);
}

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.library-header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 620;
}

.product-nav {
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.product-tab {
  padding: 0.45rem 0.8rem;
  border-radius: var(--control-radius);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

.product-tab.is-active {
  background: var(--paper);
  color: #18343d;
}

.product-library {
  min-height: 0;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--ink) transparent;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}

.product-library::-webkit-scrollbar {
  height: 0.4rem;
}

.product-library::-webkit-scrollbar-thumb {
  border-radius: var(--control-radius);
  background: var(--ink);
}

.product-card {
  min-width: 100%;
  padding: clamp(1.1rem, 2vw, 1.7rem);
  border-radius: calc(var(--panel-radius) - 0.45rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  scroll-snap-align: start;
  scroll-margin-inline: 0;
  background: var(--panel);
  color: var(--paper);
}

.product-copy {
  min-width: 0;
  max-width: 54rem;
  padding: clamp(2rem, 5vw, 5rem);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

.product-brand {
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-logo-frame {
  width: clamp(4rem, 5vw, 4.75rem);
  height: clamp(4rem, 5vw, 4.75rem);
  border-radius: 1.15rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
}

.product-logo {
  width: 78%;
  height: 78%;
  display: block;
  object-fit: contain;
}

.product-logo-facet {
  width: 82%;
}

.product-label {
  margin: 0;
  color: rgba(251, 248, 239, 0.7);
  font-size: 0.86rem;
  font-weight: 700;
}

.product-copy h3 {
  max-width: 15ch;
  margin-bottom: 1.25rem;
  overflow-wrap: break-word;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  font-weight: 530;
}

.product-copy > p:not(.product-label) {
  max-width: 34rem;
  margin: 0 0 1.75rem;
  color: rgba(251, 248, 239, 0.78);
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
}

.site-footer {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 2rem;
}

.footer-topline {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-topline strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.footer-links {
  gap: 1.5rem;
  font-size: 0.82rem;
}

.footer-legal,
.copyright {
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.6;
}

.footer-legal {
  max-width: 62rem;
  margin: 1.25rem 0 0;
}

.copyright {
  margin: 0.5rem 0 0;
}

.legal-body .site-header,
.legal-page,
.legal-footer {
  width: min(calc(100% - (2 * var(--gutter))), 66rem);
}

.legal-body .site-header {
  margin: 0 auto;
}

.legal-body .header-inner {
  padding-inline: 0;
}

.legal-page {
  margin: 0 auto var(--gutter);
  padding: clamp(2.5rem, 6vw, 5rem);
  border-radius: var(--panel-radius);
  background: var(--paper);
  color: #18343d;
}

.legal-header {
  max-width: 46rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.legal-header .eyebrow {
  margin: 0 0 1.2rem;
  color: #58717a;
  font-size: 0.76rem;
  font-weight: 700;
}

.legal-header h1 {
  max-width: none;
  margin-bottom: 1.2rem;
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.legal-header > p:last-child {
  max-width: 42rem;
  margin: 0;
  color: #4d6871;
  font-size: 1.08rem;
}

.legal-content {
  max-width: 47rem;
}

.legal-content section {
  margin-bottom: 3rem;
}

.legal-content section:last-child {
  margin-bottom: 0;
}

.legal-content h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.legal-content p,
.legal-content ul {
  color: #4d6871;
}

.legal-content a {
  color: #18343d;
}

.legal-content li + li {
  margin-top: 0.45rem;
}

.legal-footer {
  padding-inline: 0;
}

@media (max-width: 980px) {
  .home-layout {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: 32rem;
  }

  .library-panel {
    min-height: 42rem;
  }
}

@media (max-width: 700px) {
  :root {
    --gutter: 0.85rem;
    --panel-radius: 1.4rem;
  }

  .header-inner {
    min-height: 4.25rem;
  }

  .site-nav a:not(.nav-contact) {
    display: none;
  }

  .nav-contact {
    padding: 0.5rem 0.8rem;
  }

  .intro-panel {
    min-height: 29rem;
    padding: 2rem 1.5rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.3rem);
  }

  .library-panel {
    min-height: 47rem;
    padding: 1rem;
  }

  .library-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-copy {
    padding: 1.75rem 0.75rem;
    justify-content: flex-start;
  }

  .product-copy h3 {
    max-width: 14ch;
    font-size: clamp(2.3rem, 10vw, 3.35rem);
  }

  .footer-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .legal-page {
    padding: 2.5rem 1.25rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
