/* ==========================================================================
   1099 Consulting Services LLC
   Palette derived from the firm mark: steel blue wordmark, light steel
   numerals, blue-black ink. Documentary/ruled layout — hairlines, not cards.
   ========================================================================== */

/* --- Tokens -------------------------------------------------------------- */

:root {
  /* Color */
  --paper:        #FAFBFC;
  --paper-2:      #EDF2F6;
  --paper-3:      #FFFFFF;
  --ink:          #0F1D28;
  --ink-2:        #46606F;
  --ink-3:        #5D7080;
  --brand:        #2F6690;
  --brand-deep:   #1B4260;
  --steel:        #9FBBD0;
  --line:         #C6D5E0;
  --line-strong:  #7E97AB;
  --focus:        #2F6690;
  --logo-filter:  none;

  /* Type */
  --sans: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1.0625rem;
  --fs-lg:    1.1875rem;
  --fs-xl:    1.4375rem;
  --fs-2xl:   1.875rem;
  --fs-3xl:   2.5rem;
  --fs-4xl:   clamp(2.5rem, 1.6rem + 3.6vw, 4rem);

  /* Space */
  --sp-1: 0.375rem;
  --sp-2: 0.75rem;
  --sp-3: 1.125rem;
  --sp-4: 1.75rem;
  --sp-5: 2.5rem;
  --sp-6: 3.75rem;
  --sp-7: 5.5rem;

  --wrap: 1140px;
  --rail: 208px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #0C1821;
    --paper-2:      #12222E;
    --paper-3:      #101E29;
    --ink:          #E6EDF3;
    --ink-2:        #A0B8C8;
    --ink-3:        #7B94A5;
    --brand:        #7BAED4;
    --brand-deep:   #A8CBE4;
    --steel:        #9FBBD0;
    --line:         #1F3646;
    --line-strong:  #4A6E88;
    --focus:        #7BAED4;
    --logo-filter:  brightness(1.32) saturate(0.92);
  }
}

/* --- Base ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.021em;
  line-height: 1.13;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 140ms ease;
}
a:hover { color: var(--brand-deep); }

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.lede {
  font-size: var(--fs-lg);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 62ch;
}

.prose { max-width: 66ch; }
.prose > * + * { margin-top: var(--sp-3); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--sans);
  font-size: var(--fs-sm);
  z-index: 100;
}
.skip-link:focus { left: var(--sp-3); top: var(--sp-3); }

/* --- Masthead ------------------------------------------------------------ */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

/* Sticky only where there is vertical room to spare for it. */
@media (min-width: 700px) {
  .masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
  }
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  min-height: 4.75rem;
  flex-wrap: wrap;
  padding-block: var(--sp-2);
}

.brand { display: inline-flex; align-items: center; }
.brand img {
  width: clamp(146px, 34vw, 190px);
  filter: var(--logo-filter);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.875rem, 2.4vw, 2rem);
  flex-wrap: wrap;
}

.nav__link {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

.nav__cta {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--paper-3);
  background: var(--brand-deep);
  padding: 0.55rem 1.05rem;
  text-decoration: none;
  border: 1px solid var(--brand-deep);
  transition: background 140ms ease, color 140ms ease;
}
.nav__cta:hover { background: transparent; color: var(--brand-deep); }

@media (prefers-color-scheme: dark) {
  .nav__cta { color: #08131B; background: var(--brand-deep); border-color: var(--brand-deep); }
  .nav__cta:hover { background: transparent; color: var(--brand-deep); }
}

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

.hero {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.hero__eyebrow { margin-bottom: var(--sp-3); }

.hero h1 {
  font-size: var(--fs-4xl);
  max-width: 19ch;
  margin-bottom: var(--sp-4);
}

.hero__lede { max-width: 58ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.btn {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--brand-deep);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.btn--primary { background: var(--brand-deep); color: var(--paper-3); }
.btn--primary:hover { background: transparent; color: var(--brand-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

@media (prefers-color-scheme: dark) {
  .btn--primary { color: #08131B; }
  .btn--primary:hover { color: var(--brand-deep); }
}

/* Ruled fact strip — the firm's particulars, stated plainly. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  margin: var(--sp-6) 0 0;
  border-top: 1px solid var(--line);
}

.facts__item {
  padding: var(--sp-3) var(--sp-3) var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 700px) {
  .facts__item + .facts__item {
    padding-left: var(--sp-3);
    border-left: 1px solid var(--line);
  }
}

.facts__term {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--sp-1);
}

.facts__desc {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.45;
}

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

.section {
  padding-block: clamp(3rem, 6vw, var(--sp-7));
  border-bottom: 1px solid var(--line);
}
.section--tint { background: var(--paper-2); }
.section--last { border-bottom: 0; }

.section__grid {
  display: grid;
  gap: var(--sp-4);
}

@media (min-width: 900px) {
  .section__grid {
    grid-template-columns: var(--rail) 1fr;
    gap: var(--sp-5);
  }
  .section__rail { padding-top: 0.45rem; }
}

.section__body > * + * { margin-top: var(--sp-4); }

.section__title {
  font-size: var(--fs-2xl);
  max-width: 20ch;
}

/* --- Ruled list (capabilities) ------------------------------------------- */

.ruled {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.ruled__item {
  display: grid;
  gap: var(--sp-2);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .ruled__item {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    gap: var(--sp-4);
    align-items: start;
  }
}

.ruled__title {
  font-size: var(--fs-lg);
  letter-spacing: -0.015em;
}

.ruled__text {
  color: var(--ink-2);
  max-width: 62ch;
}

.ruled__meta {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: var(--sp-2);
}

/* --- Numbered sequence (engagement stages) ------------------------------- */

.stages {
  list-style: none;
  counter-reset: stage;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.stage {
  counter-increment: stage;
  display: grid;
  gap: var(--sp-2);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .stage {
    grid-template-columns: 3.5rem minmax(0, 13rem) minmax(0, 1fr);
    gap: var(--sp-3);
    align-items: start;
  }
}

.stage::before {
  content: counter(stage, decimal-leading-zero);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--brand);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.stage__title { font-size: var(--fs-lg); }
.stage__text { color: var(--ink-2); max-width: 60ch; }

/* --- Plain list ---------------------------------------------------------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}

.list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--ink-2);
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.6rem;
  height: 1px;
  background: var(--brand);
}

/* --- Definition table (business record) ---------------------------------- */

.record {
  margin: 0;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
}

.record__row {
  display: grid;
  gap: var(--sp-1);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 620px) {
  .record__row {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: var(--sp-3);
    align-items: baseline;
  }
}

.record__term {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.record__desc {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

/* Placeholder the owner still needs to fill in. Deliberately conspicuous. */
.tbd {
  background: var(--paper-2);
  background: color-mix(in srgb, var(--steel) 26%, transparent);
  border-bottom: 1px dashed var(--brand);
  padding: 0 0.2em;
  font-family: var(--mono);
  font-size: 0.92em;
}

/* --- Callout ------------------------------------------------------------- */

.callout {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  padding: var(--sp-4);
}
.callout > * + * { margin-top: var(--sp-2); }

/* --- Legal document pages ------------------------------------------------ */

.doc { padding-block: clamp(2.5rem, 5vw, var(--sp-6)); }
.doc h1 { font-size: var(--fs-3xl); margin-bottom: var(--sp-2); }
.doc h2 {
  font-size: var(--fs-xl);
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.doc h2 + p { margin-top: var(--sp-3); }
.doc p, .doc ul { max-width: 68ch; }
.doc p + p { margin-top: var(--sp-3); }
.doc ul { margin: var(--sp-3) 0 0; padding-left: 1.15rem; color: var(--ink-2); }
.doc li + li { margin-top: var(--sp-2); }
.doc__stamp {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--sp-4);
}

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

.footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding-block: var(--sp-5);
}

.footer__grid {
  display: grid;
  gap: var(--sp-4);
}

@media (min-width: 800px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--sp-5);
  }
}

.footer img { width: 168px; filter: var(--logo-filter); margin-bottom: var(--sp-3); }

.footer__text {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  max-width: 42ch;
}

.footer__heading {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--sp-2);
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-1);
  font-family: var(--sans);
  font-size: var(--fs-sm);
}

.footer__list a { color: var(--ink-2); text-decoration: none; }
.footer__list a:hover { color: var(--brand); text-decoration: underline; }

.footer__base {
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  justify-content: space-between;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

/* --- Motion -------------------------------------------------------------- */

.rise {
  animation: rise 620ms cubic-bezier(0.22, 0.68, 0.35, 1) both;
}
.rise:nth-child(2) { animation-delay: 70ms; }
.rise:nth-child(3) { animation-delay: 140ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

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

/* --- Print --------------------------------------------------------------- */

@media print {
  .masthead, .nav, .hero__actions { display: none; }
  body { background: #fff; color: #000; }
}
