/*
 * Ranks and Ladders Pty Ltd company site (LDR-2141).
 * The product's Document design, as plain CSS: parchment ground, ink text,
 * thin rules and one green. Colours are the Document tokens in
 * apps/web/app/globals.css (--c-doc-*). No web fonts: a system stack.
 */

:root {
  color-scheme: light dark;
  --bg: #f7f4ec;          /* --c-doc-parchment */
  --sheet: #fbfaf7;       /* --c-doc-sheet */
  --ink: #161616;         /* --c-doc-ink */
  --ink-2: #454545;       /* --c-doc-ink-2 */
  --label: #616161;       /* --c-doc-label */
  --rule: #d8d5ce;        /* --c-doc-rule */
  --rule-strong: #86847b; /* --c-doc-rule-strong */
  --green: #2a6a44;       /* --c-doc-green */
  --sage: #cbcfca;        /* --c-doc-sage: link underlines */

  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
  --page: 72rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1d;          /* --c-doc-paper-dark */
    --sheet: #242426;       /* --c-doc-sheet-dark */
    --ink: #ededed;         /* --c-doc-ink-dark */
    --ink-2: #cfcfd2;       /* --c-doc-ink-2-dark */
    --label: #a2a2a6;       /* --c-doc-label-dark */
    --rule: #333336;        /* --c-doc-rule-dark */
    --rule-strong: #76767a; /* --c-doc-rule-strong-dark */
    --green: #46af72;       /* --c-doc-green-on-dark */
    --sage: #3b3f3c;        /* --c-doc-sage-dark */
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---- Links and focus ---- */

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.5rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  color: var(--bg);
}

/* ---- Layout ---- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

/* ---- Header ---- */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--ink);
}

.brand picture,
.brand img {
  width: 1.375rem;
  height: auto;
  flex: none;
}

.nav ul,
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.nav a,
.footer-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9375rem;
  border-bottom: 1px solid transparent;
}

.nav a:hover,
.footer-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--green);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--green);
}

/* ---- Type ---- */

h1,
h2,
h3 {
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
}

h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

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

.eyebrow {
  margin: 0 0 1rem;
  color: var(--label);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta {
  color: var(--label);
  font-size: 0.9375rem;
}

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

.hero {
  padding-top: clamp(3rem, 8vw, 6.5rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-mark,
.hero-mark img {
  width: clamp(3rem, 1.75rem + 5vw, 6.25rem);
  height: auto;
}

.tagline {
  margin: 0.75rem 0 0;
  color: var(--green);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-body {
  grid-column: 1 / -1;
  border-top: 1px solid var(--rule-strong);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 1rem 3rem;
}

.lead {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.hero-body .intro {
  color: var(--ink-2);
}

@media (min-width: 52rem) {
  .hero-body {
    grid-template-columns: 1fr 1fr;
  }
}

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

.section {
  border-top: 1px solid var(--rule);
  padding-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-bottom: clamp(2.25rem, 5vw, 3.5rem);
  display: grid;
  gap: 1.25rem 3rem;
}

.section > h2 {
  font-size: 1.25rem;
}

@media (min-width: 52rem) {
  .section {
    grid-template-columns: 14rem 1fr;
  }

  .section > h2 {
    padding-top: 0.15rem;
  }
}

/* How it works: six numbered items */
.how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: item;
}

.how-list li {
  counter-increment: item;
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0 1.5rem;
}

.how-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.how-list li::before {
  content: counter(item, decimal-leading-zero);
  display: block;
  margin-bottom: 0.5rem;
  color: var(--green);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.how-list h3 {
  margin-bottom: 0.4rem;
}

.how-list p {
  color: var(--ink-2);
  font-size: 1rem;
}

@media (min-width: 40rem) {
  .how-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }

  .how-list li:nth-child(2) {
    border-top: 0;
    padding-top: 0;
  }
}

@media (min-width: 72rem) {
  .how-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .how-list li:nth-child(3) {
    border-top: 0;
    padding-top: 0;
  }
}

.more {
  margin-top: 1rem;
}

.more a {
  font-weight: 600;
}

/* ---- Inner pages ---- */

.page-head {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.page-head .meta {
  margin-top: 0.75rem;
}

.page-head .lead {
  margin-top: 1.25rem;
  max-width: var(--measure);
}

.prose h2 {
  font-size: 1.25rem;
}

/* Company details */
.details {
  margin: 0;
  max-width: 44rem;
  border-top: 1px solid var(--rule-strong);
}

.details div {
  display: grid;
  gap: 0.125rem 2rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
}

.details dt {
  color: var(--label);
  font-size: 0.9375rem;
}

.details dd {
  margin: 0;
}

@media (min-width: 36rem) {
  .details div {
    grid-template-columns: 10rem 1fr;
  }
}

.product {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.product img {
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
  border-radius: 0.75rem;
}

.email-line a {
  font-weight: 600;
}

address {
  font-style: normal;
}

/* 404 */
.not-found {
  padding-top: clamp(4rem, 12vw, 9rem);
  padding-bottom: clamp(4rem, 12vw, 9rem);
}

.not-found .lead {
  margin-top: 1rem;
}

.not-found .more {
  margin-top: 2rem;
}

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

.site-footer {
  border-top: 1px solid var(--rule-strong);
  margin-top: clamp(2rem, 5vw, 4rem);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0;
  color: var(--label);
  font-size: 0.875rem;
  max-width: none;
}

.footer-nav a {
  font-size: 0.875rem;
}
