/* PRETIOSUS — shared stylesheet
   Palette: deep teal primary, warm neutrals, terracotta accent.
   Deliberately avoids messaging-app green as a brand colour. */

:root {
  --ink:          #14181f;
  --ink-soft:     #4a5361;
  --ink-faint:    #6b7583;

  --primary:      #0b3b44;
  --primary-600:  #0f5661;
  --primary-050:  #eef4f4;

  --accent:       #b45f2b;
  --accent-050:   #fbf2ec;

  --paper:        #ffffff;
  --paper-warm:   #faf8f5;
  --paper-sunk:   #f3f0eb;
  --line:         #e3ded6;
  --line-strong:  #cfc8bd;

  --focus:        #b45f2b;

  --w-page: 1120px;
  --w-prose: 68ch;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20, 24, 31, .06), 0 1px 3px rgba(20, 24, 31, .04);
  --shadow-md: 0 4px 6px rgba(20, 24, 31, .04), 0 12px 28px rgba(20, 24, 31, .07);

  --step--1: clamp(.875rem, .84rem + .16vw, .95rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.06rem + .3vw, 1.25rem);
  --step-2:  clamp(1.375rem, 1.25rem + .55vw, 1.6rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --step-4:  clamp(2.125rem, 1.7rem + 1.9vw, 3.25rem);
}

/* ---------- reset / base ---------- */

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 650;
  color: var(--primary);
  text-wrap: balance;
}

h1 { font-size: var(--step-4); letter-spacing: -.033em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -.012em; }
h4 { font-size: var(--step-0); letter-spacing: 0; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary-600); text-underline-offset: .18em; }
a:hover { color: var(--accent); }

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3rem 0;
}

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

::selection { background: var(--primary-050); color: var(--primary); }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--warm { background: var(--paper-warm); border-block: 1px solid var(--line); }
.section--sunk { background: var(--paper-sunk); border-block: 1px solid var(--line); }

.prose { max-width: var(--w-prose); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.25rem);
  min-height: 72px;
  padding-block: .5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 680;
  font-size: 1.0625rem;
  letter-spacing: .11em;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--primary); }
.brand__mark { display: block; width: 26px; height: 26px; flex-shrink: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--primary);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  padding: .5rem .75rem;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--primary-050); }
.nav-toggle__bars { display: block; width: 16px; height: 10px; position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 4px; }
.nav-toggle__bars::after { top: 8px; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.2vw, 1.85rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li { display: flex; align-items: center; }

/* Text links only. `:not(.btn)` keeps these rules from out-ranking the
   button's own colour — `.site-nav a` (0,1,1) would otherwise beat
   `.btn--primary` (0,1,0) and paint the label dark-on-dark. */
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 550;
  line-height: 1.2;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:not(.btn):hover { color: var(--primary); }

/* Active page: teal label + accent underline, distinct from the button. */
.site-nav a:not(.btn)[aria-current="page"] {
  color: var(--primary);
  font-weight: 620;
  border-bottom-color: var(--accent);
}

/* Button sits in the same optical centre as the text links. */
.site-nav .btn {
  margin-left: .4rem;
  padding-block: .62rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

/* White on #0b3b44 = 12.2:1 (AAA). Hover swaps to the accent at 4.6:1 (AA).
   `currentColor` on the border keeps the box aligned with the other variants. */
.btn--primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.btn--primary:visited { color: #ffffff; }
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.btn--primary:active { background: #97501f; border-color: #97501f; color: #ffffff; }

/* Keyboard ring: teal outline with a white gap so it stays visible
   against both the light header and the dark CTA band. */
.btn--primary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #ffffff;
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--primary-050); color: var(--primary); border-color: var(--primary-600); }

.btn--onDark { background: #fff; color: var(--primary); }
.btn--onDark:hover { background: var(--primary-050); color: var(--primary); }

.btn--outlineDark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
}
.btn--outlineDark:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem);
  background:
    radial-gradient(60rem 30rem at 12% -10%, var(--primary-050) 0%, transparent 62%),
    radial-gradient(45rem 26rem at 96% 8%, var(--accent-050) 0%, transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero__inner { max-width: 46rem; }
.hero h1 { margin-bottom: .45em; }

.hero__lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 40rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1.35rem;
  padding: .4rem .8rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { color: var(--ink-soft); font-size: var(--step-1); margin-bottom: 0; }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- grids & cards ---------- */

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.card p + p { margin-top: .9em; }

.card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1.15rem;
  border-radius: var(--r-md);
  background: var(--primary-050);
  color: var(--primary);
}
.card__icon svg { width: 21px; height: 21px; display: block; }

/* numbered steps */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-top: 3.6rem;
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .02em;
}

.steps h3 { margin-bottom: .35em; }
.steps p { color: var(--ink-soft); margin-bottom: 0; }

/* checklist */

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--ink-soft); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: .75rem;
  height: .42rem;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.ticks strong { color: var(--ink); font-weight: 620; }

/* split feature rows */

.split {
  display: grid;
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.panel {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.panel--plain { background: var(--paper); }

/* ---------- callout / CTA band ---------- */

.cta-band {
  background: var(--primary);
  color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .82); font-size: var(--step-1); margin-bottom: 0; }
.cta-band a:not(.btn) { color: #fff; }
.cta-band__inner { max-width: 44rem; }

/* ---------- definition-style legal content ---------- */

.legal { max-width: var(--w-prose); }
.legal h2 {
  font-size: var(--step-2);
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--line);
}
.legal h2:first-of-type { margin-top: 2rem; }
.legal h3 { margin-top: 1.9rem; font-size: var(--step-0); }
.legal ul, .legal ol { padding-left: 1.25rem; color: var(--ink-soft); }
.legal li { margin-bottom: .55rem; }
.legal li::marker { color: var(--line-strong); }
.legal p { color: var(--ink-soft); }
.legal .meta {
  font-size: var(--step--1);
  color: var(--ink-faint);
}

/* ---------- forms ---------- */

.form { max-width: 34rem; }
.field { margin-bottom: 1.4rem; }

.field label {
  display: block;
  margin-bottom: .4rem;
  font-size: var(--step--1);
  font-weight: 620;
  color: var(--ink);
}

.field .hint {
  display: block;
  margin-top: .35rem;
  font-size: .8125rem;
  color: var(--ink-faint);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--step-0);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--primary-600); }

.req { color: var(--accent); font-weight: 700; }

/* ---------- contact details ---------- */

.detail-list { margin: 0; }
.detail-list dt {
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .3rem;
}
.detail-list dd { margin: 0 0 1.6rem; }
.detail-list dd:last-child { margin-bottom: 0; }
.detail-list address { font-style: normal; color: var(--ink-soft); }
.detail-list a { font-weight: 560; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, .76);
  padding-block: clamp(3rem, 6vw, 4.25rem) 2rem;
  font-size: var(--step--1);
}

.site-footer__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.site-footer h2 {
  font-size: .8125rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
  margin-bottom: 1rem;
  font-weight: 650;
}

.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer address {
  font-style: normal;
  line-height: 1.75;
  margin: 0;
}

.footer-brand {
  font-size: var(--step-0);
  font-weight: 650;
  letter-spacing: .04em;
  color: #fff;
  margin-bottom: .9rem;
}

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

.site-footer__base {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  color: rgba(255, 255, 255, .6);
}
.site-footer__base p { margin: 0; }

/* ---------- responsive nav ---------- */

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: .5rem clamp(1.15rem, 4vw, 2.5rem) 1.5rem;
  }
  .site-nav[data-open="true"] { display: block; }

  .site-header__inner { position: relative; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { display: block; border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: 0; padding-top: 1rem; }

  .site-nav a:not(.btn) {
    display: block;
    padding: .85rem 0 .85rem .85rem;
    font-size: var(--step-0);
    border-bottom: 0;
    border-left: 3px solid transparent;
  }
  /* Underline has no room in a stacked list — mark the active page
     with an accent bar on the leading edge instead. */
  .site-nav a:not(.btn)[aria-current="page"] {
    border-bottom: 0;
    border-left-color: var(--accent);
  }

  .site-nav .btn {
    width: 100%;
    margin-left: 0;
    padding-block: .8rem;
  }
}

/* no-JS: nav is always visible so links stay reachable */
.no-js .nav-toggle { display: none; }
@media (max-width: 800px) {
  .no-js .site-nav {
    display: block;
    position: static;
    box-shadow: none;
    border-bottom: 0;
    padding: 0 0 1rem;
  }
}

@media print {
  .site-header, .cta-band, .skip-link { display: none; }
  body { color: #000; }
}
