/* -------------------------------------------------------
   Premium Business Contract Layout (Responsive + Print)
   Matches: /license-contract.html structure
-------------------------------------------------------- */

/* Corporate tokens */
:root {
  --bg: #f3f5f7;
  --paper: #ffffff;

  --text: #111827;     /* near-black */
  --muted: #4b5563;    /* slate */
  --rule: #e5e7eb;     /* light border */
  --rule-strong: #d1d5db;

  --accent: #0f2a43;   /* deep corporate navy */
  --accent-2: #1f4b73; /* secondary navy */
  --chip-bg: #f2f4f7;
  --chip-border: #d8dee6;

  --shadow: 0 18px 50px rgba(17, 24, 39, 0.10);
  --radius: 14px;

  --maxw: 820px;
  --maxw-lg: 1200px;

  --pad: clamp(18px, 3.5vw, 52px);
  --leading: 1.75;
}

/* Reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: var(--leading);
  background:
    linear-gradient(180deg, #eef2f6 0%, #f7f8fa 55%, var(--bg) 100%);
}

/* Centered document */
.page {
  width: min(100% - 2rem, var(--maxw));
  margin: clamp(18px, 4vw, 56px) auto;
  padding: var(--pad);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

/* Premium header band (very subtle) */
.page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Title */
h1 {
  margin: 0;
  padding-top: 14px; /* space beneath top band */
  text-align: center;
  font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  letter-spacing: -0.02em;
  color: var(--accent);
}

h1 br { line-height: 1.2; }

/* Formal divider under title */
h1::after {
  content: "";
  display: block;
  width: min(420px, 70%);
  height: 1px;
  margin: 1.35rem auto 1.8rem;
  background: linear-gradient(90deg, transparent, var(--rule-strong), transparent);
}

/* Section headings */
h2 {
  margin: 2.2rem 0 0.9rem;
  font-weight: 750;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  letter-spacing: -0.01em;
  color: var(--accent);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

/* Section rule */
h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  transform: translateY(-0.25em);
  border-radius: 999px;
}

/* Paragraphs */
p {
  margin: 0.85rem 0;
  color: var(--text);
  font-size: 1rem;
}

/* Improve long-form reading */
.page p {
  max-width: 78ch;
}

/* Number chip (1.1, 1.2, ...) */
p > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* min-width: 3.35rem;
  height: 2.05rem;
  padding: 0 0.65rem;
  margin-right: 0.75rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border); */
}

/* Your HTML has <strong>1.1</strong><br> — remove that visual break for a tighter, professional flow */
p > strong + br { display: none; }

/* Subtle rhythm between consecutive clauses */
p + p {
  padding-top: 0.95rem;
  margin-top: 0.95rem;
  border-top: 1px solid var(--rule);
}

/* Slightly muted legal boilerplate paragraphs (optional: apply to all paragraphs after some sections) */
p em,
small { color: var(--muted); }

/* Large screens: allow wider paper (up to 1200px) */
@media (min-width: 1100px) {
  .page {
    width: min(100% - 4rem, var(--maxw-lg));
    padding: clamp(34px, 3vw, 70px);
  }

  p { font-size: 1.02rem; }
}

/* Mobile: tighter margins, no visual clutter */
@media (max-width: 600px) {
  .page {
    width: calc(100% - 1.25rem);
    margin: 14px auto;
    padding: clamp(16px, 4.5vw, 26px);
    border-radius: 12px;
  }

  p > strong {
    min-width: 3.15rem;
    height: 2.0rem;
    margin-right: 0.6rem;
    font-size: 0.93rem;
  }

  h2 { margin-top: 1.85rem; }
}

/* Accessibility: focus styles if you add links later */
a {
  color: var(--accent-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:focus-visible {
  outline: 3px solid rgba(31, 75, 115, 0.25);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Print: perfect contract output */
@media print {
  body { background: #fff; }
  .page {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .page::before { display: none; }
  h1::after { background: #ddd; }
  p + p { border-top: 1px solid #ddd; }
}
