/* Vismarin × SABR — Client Document System
   Mobile-first · responsive · luxury editorial */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --ink: #0e1a14;
  --ink-soft: #2a3830;
  --muted: #5c6b5a;
  --line: rgba(14, 26, 20, 0.12);
  --line-strong: rgba(14, 26, 20, 0.22);
  --paper: #f9f7f2;
  --paper-deep: #f1eee6;
  --panel: #ffffff;
  --brass: #9a7b4f;
  --brass-deep: #7a623e;
  --brass-soft: rgba(154, 123, 79, 0.14);
  --sage: #6d7f6a;
  --radius: 2px;
  --max: 820px;
  --display: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Outfit', system-ui, sans-serif;
  --page-pad-x: 1.25rem;
  --page-pad-y: 2rem;
  --touch-min: 44px;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(154, 123, 79, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(109, 127, 106, 0.07), transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--brass-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

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

.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) 3.5rem;
}

/* —— Masthead (mobile: stacked) —— */
.masthead {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 2rem;
}

.masthead-top {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
}

.mark {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.meta {
  text-align: left;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.55;
}

.meta strong {
  display: block;
  color: var(--ink-soft);
  font-weight: 500;
}

.doc-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 9vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: none;
}

.doc-subtitle {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  color: var(--muted);
  max-width: none;
  font-weight: 300;
}

.gold-rule {
  width: 3rem;
  height: 1px;
  background: var(--brass);
  margin: 1rem 0 0;
  border: 0;
}

/* —— Sections —— */
section {
  margin: 2rem 0;
}

.section-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.85rem;
}

.section-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--brass);
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 4.5vw, 1.65rem);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.lead {
  font-family: var(--display);
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  line-height: 1.45;
  color: var(--ink);
  font-weight: 400;
  max-width: none;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

li {
  margin-bottom: 0.4rem;
}

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

/* —— Tables (horizontal scroll on small screens) —— */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  background: var(--panel);
  margin: 1rem 0 1.5rem;
  max-width: 100%;
}

table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

th,
td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
  background: var(--paper-deep);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

td strong {
  font-weight: 500;
  color: var(--ink);
}

/* —— Panels —— */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem;
  margin: 1rem 0 1.25rem;
}

.panel.accent {
  border-left: 2px solid var(--brass);
  background: linear-gradient(90deg, var(--brass-soft), transparent 55%), var(--panel);
}

.panel h3 {
  margin-top: 0;
}

/* Mobile-first: single column */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-deep);
  background: var(--brass-soft);
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.75rem;
}

.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.85rem;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid var(--brass);
  border-radius: 1px;
}

.quote {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  line-height: 1.35;
  color: var(--ink);
  margin: 1.25rem 0;
  padding-left: 1rem;
  border-left: 1px solid var(--brass);
}

/* —— Footer —— */
.footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
  display: grid;
  gap: 1.25rem;
}

.sign-block {
  font-size: 0.875rem;
  color: var(--muted);
}

.sign-block .name {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 600;
  margin-top: 0.35rem;
}

.fine {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* —— Sticky actions (mobile-friendly) —— */
.actions {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: stretch;
  padding: 0.65rem var(--page-pad-x);
  padding-top: max(0.65rem, env(safe-area-inset-top));
  background: rgba(249, 247, 242, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  min-height: var(--touch-min);
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.btn:hover,
.btn:focus-visible {
  background: var(--brass-deep);
  border-color: var(--brass-deep);
  color: var(--paper);
  outline: none;
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* —— Index cards (mobile: stacked) —— */
.doc-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.doc-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.35rem 1rem;
  align-items: start;
  padding: 1.15rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.doc-card:hover {
  border-color: var(--brass);
}

.doc-card .num {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--brass);
  grid-row: 1 / 3;
}

.doc-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
}

.doc-card p {
  margin: 0;
  font-size: 0.85rem;
  grid-column: 2;
}

.doc-card .go {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 500;
  grid-column: 2;
  margin-top: 0.35rem;
}

.hero-cover {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 0 1.75rem;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 1.5rem;
}

.hero-cover h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.25rem, 11vw, 5rem);
  line-height: 0.98;
  margin: 0.75rem 0 0.65rem;
  max-width: none;
}

/* —— Tablet (640px+) —— */
@media (min-width: 640px) {
  :root {
    --page-pad-x: 1.5rem;
    --page-pad-y: 2.5rem;
  }

  body {
    font-size: 0.96875rem;
  }

  .actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .btn {
    flex: 0 0 auto;
    min-height: auto;
    padding: 0.7rem 1.1rem;
  }

  .doc-card {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 1.25rem;
  }

  .doc-card .num {
    grid-row: auto;
  }

  .doc-card p,
  .doc-card .go {
    grid-column: auto;
  }

  .doc-card .go {
    margin-top: 0;
  }

  table {
    font-size: 0.875rem;
  }

  th,
  td {
    padding: 0.85rem 1rem;
  }
}

/* —— Desktop (768px+) —— */
@media (min-width: 768px) {
  :root {
    --page-pad-x: 1.25rem;
    --page-pad-y: 3.5rem;
  }

  .page {
    padding-bottom: 5rem;
  }

  .masthead {
    gap: 1.75rem;
    padding-bottom: 2rem;
    margin-bottom: 2.75rem;
  }

  .masthead-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .meta {
    text-align: right;
  }

  .mark {
    font-size: 1.35rem;
  }

  .doc-title {
    max-width: 14ch;
  }

  .doc-subtitle {
    font-size: 1.05rem;
    max-width: 42ch;
  }

  .lead {
    max-width: 38ch;
  }

  section {
    margin: 2.75rem 0;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-cover {
    min-height: 72vh;
    padding: 4rem 0 3rem;
    margin-bottom: 2rem;
  }

  .hero-cover h1 {
    max-width: 10ch;
  }

  .doc-card:hover {
    transform: translateY(-1px);
  }
}

/* —— Large (1024px+) —— */
@media (min-width: 1024px) {
  body {
    font-size: 15.5px;
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
  }
}

/* —— Print —— */
@media print {
  .actions {
    display: none !important;
  }

  body {
    background: white;
    font-size: 11pt;
  }

  .page {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .panel,
  .table-wrap,
  .doc-card {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  .masthead,
  section {
    break-inside: avoid;
  }
}

@page {
  margin: 18mm 16mm;
}
