/* ==========================================================================
   Scafell Tech Private Limited — site styles
   Single stylesheet. No external fonts, no frameworks, no trackers.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  --paper:        #FCFBF9;
  --surface:      #FFFFFF;
  --surface-alt:  #F4F1EC;
  --ink:          #13171B;
  --text:         #2C3238;
  --muted:        #57616C;
  --rule:         #E2DED7;
  --rule-strong:  #C8C1B6;
  --accent:       #16405C;
  --accent-hover: #0E2C41;
  --accent-soft:  #EAF0F4;
  --focus:        #B4460F;

  --ph-bg:   #FBF0DC;
  --ph-line: #A8792A;
  --ph-text: #6E4A08;

  --font-head: Georgia, "Times New Roman", Times, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;

  --maxw: 72rem;
  --gutter: 1.5rem;
  --radius: 3px;
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Typography --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.7vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

h4 {
  font-size: 1.0625rem;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.15rem; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.35rem; }
li { margin-bottom: 0.45rem; }
li:last-child { margin-bottom: 0; }

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

small { font-size: 0.875rem; }

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

abbr[title] { text-decoration: underline dotted; cursor: help; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}

/* --- Links -------------------------------------------------------------- */
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

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

/* --- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100%;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus { top: 0; color: #fff; }

/* --- Layout primitives -------------------------------------------------- */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--maxw));
  margin-inline: auto;
}

/* Reading column. `.prose` sits on the same element as `.wrap`, so the column
   is applied to the children — otherwise `margin-inline: auto` would centre it
   and it would no longer line up with the h1 above. Tables break out wider. */
.prose > *:not(section),
.prose > section > * { max-width: 44rem; }
.prose .table-scroll { max-width: 58rem; }

.section { padding: clamp(2.75rem, 2rem + 3vw, 4.5rem) 0; }
.section--tight { padding: clamp(2rem, 1.5rem + 2vw, 3rem) 0; }
.section--alt { background: var(--surface-alt); border-block: 1px solid var(--rule); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.6;
  color: var(--text);
}

.note {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head > :last-child { margin-bottom: 0; }

/* --- Header ------------------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.1875rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand:hover { color: var(--accent); }
.brand-mark { flex: none; width: 30px; height: 30px; color: var(--accent); }
.brand-name { font-weight: 700; }
.brand-suffix { font-weight: 400; color: var(--muted); white-space: nowrap; }
.brand:hover .brand-suffix { color: var(--accent); }

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

.site-nav li { margin: 0; }

.site-nav a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 550;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--accent); border-bottom-color: var(--rule-strong); }

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

/* --- Hero --------------------------------------------------------------- */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: clamp(2.75rem, 2rem + 4vw, 5.25rem) 0;
}

.hero h1 { max-width: 20ch; }
.hero .lede { max-width: 62ch; }
.hero .lede + .lede { margin-top: 1.15rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}

.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: clamp(2.25rem, 1.75rem + 2.5vw, 3.75rem) 0;
}

.page-head .lede { max-width: 60ch; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent-hover); }

/* --- Grids and cards ---------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.9688rem; margin-bottom: 0.75rem; }
.card p:last-child { margin-bottom: 0; }
.card ul { font-size: 0.9375rem; color: var(--muted); }

.card-icon {
  display: block;
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* --- Numbered capability blocks ----------------------------------------- */
.block-list { counter-reset: block; }

.block {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0 1.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}

.block:first-child { border-top: 0; padding-top: 0.5rem; }

.block-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding-top: 0.4rem;
}

.block-body { max-width: 48rem; }
.block-body > :last-child { margin-bottom: 0; }
.block-body h3 { margin-bottom: 0.6rem; }

@media (max-width: 34rem) {
  .block { grid-template-columns: 1fr; gap: 0.5rem; }
  .block-num { padding-top: 0; }
}

/* --- Data tables -------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  background: var(--surface);
}

.table-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 0;
}

caption {
  text-align: left;
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-alt);
}

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

thead th {
  background: var(--surface-alt);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody th {
  font-weight: 600;
  color: var(--ink);
}

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

.table-scroll table { min-width: 34rem; }

/* The company-facts table must never scroll sideways: its values are the
   details a reviewer is looking for. It wraps instead, down to 320px. */
.table-facts table { min-width: 0; }
.table-facts tbody th { width: 42%; }

@media (max-width: 30rem) {
  th, td { padding: 0.65rem 0.75rem; }
  caption { padding: 0.65rem 0.75rem; }
}

/* --- Placeholder token -------------------------------------------------- */
.ph {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--ph-bg);
  color: var(--ph-text);
  border-bottom: 1px dashed var(--ph-line);
  padding: 0.05em 0.3em;
  border-radius: 2px;
  word-break: break-word;
}

a .ph { color: var(--ph-text); }

/* --- Callout ------------------------------------------------------------ */
.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.5rem;
}

.callout > :last-child { margin-bottom: 0; }
.callout h2, .callout h3 { margin-bottom: 0.5rem; }

/* --- Contact detail list ------------------------------------------------ */
.detail-list {
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1.5rem;
}

.detail-list > div {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.detail-list dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.detail-list dd {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--ink);
}

.detail-list dd .note { margin-top: 0.35rem; }

address { font-style: normal; }

/* --- Table of contents (legal pages) ------------------------------------ */
.toc {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.toc h2 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 2rem;
  font-size: 0.9375rem;
}

.toc li { margin-bottom: 0.3rem; break-inside: avoid; }

@media (max-width: 38rem) { .toc ol { columns: 1; } }

/* --- Legal document sections -------------------------------------------- */
.legal section { padding-top: 1.75rem; margin-top: 1.75rem; border-top: 1px solid var(--rule); }
.legal section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.legal h2 { font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem); }
.legal h3 { margin-top: 1.5rem; }
.legal .doc-meta {
  font-size: 0.9375rem;
  color: var(--muted);
  padding-bottom: 1.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--rule);
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #D7D2CA;
  padding: 3rem 0 2rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-bottom: 2.25rem;
  border-bottom: 1px solid #2C3238;
}

.footer-entity { grid-column: span 1; }

@media (min-width: 60rem) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
}

.footer-legal-name {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #A7A199;
  margin-bottom: 0.9rem;
}

.site-footer p { color: #A7A199; }
.site-footer .footer-entity p { max-width: 34ch; }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }

.site-footer a { color: #E9E5DE; text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.site-footer a:focus-visible { outline-color: var(--focus); }

.site-footer .ph { background: #2A2620; color: #E4C489; border-bottom-color: #7A6435; }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #A7A199;
}

.footer-bottom p { margin: 0; }

/* --- Utilities ---------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.stack > * + * { margin-top: 1.15rem; }
.mt-0 { margin-top: 0; }
.mb-lg { margin-bottom: 2rem; }

/* --- Print -------------------------------------------------------------- */
@media print {
  :root { --paper: #fff; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .site-header, .site-nav, .skip-link, .hero-actions, .toc { display: none !important; }
  .site-footer { background: none; color: #000; border-top: 1px solid #999; padding-top: 1rem; }
  .site-footer a, .site-footer p, .site-footer h2, .footer-legal-name,
  .footer-bottom { color: #000; }
  .card, .callout, .table-scroll, .toc { border-color: #999; }
  a { color: #000; text-decoration: underline; }
  .legal a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  .section, .page-head, .hero { padding: 1rem 0; }
  h1, h2, h3 { page-break-after: avoid; }
  .block, tr, .card { page-break-inside: avoid; }
}
