/* ==========================================================================
   BHURAN BUILDING — Design System
   Hand-authored CSS. No framework, no build step for styles.
   All design decisions live in the token block below (§1).
   ========================================================================== */

/* ---------- §1  TOKENS ---------------------------------------------------- */
:root {
  /* Brand — sampled directly from logo.jpeg */
  --navy-900: #02182f;
  --navy-800: #04244a;   /* primary brand navy */
  --navy-700: #0a3160;
  --navy-600: #124079;
  --navy-050: #eef2f8;

  --gold-600: #a87d1d;
  --gold-500: #c6972b;   /* primary brand gold */
  --gold-400: #ddb256;
  --gold-300: #ecd08c;
  --gold-050: #fbf4e2;

  /* Neutrals — warm, paper-like (deliberately not pure white) */
  --paper:    #f7f5f0;
  --paper-2:  #efece4;
  --stone-100:#e4e0d6;
  --stone-300:#bab5a8;
  --stone-500:#7c776c;
  --stone-700:#4a4740;
  --ink:      #14161a;
  --white:    #ffffff;

  /* Semantic */
  --bg:            var(--paper);
  --fg:            var(--ink);
  --muted:         var(--stone-500);
  --accent:        var(--gold-500);
  --line:          rgb(4 36 74 / 0.12);
  --line-strong:   rgb(4 36 74 / 0.22);
  --line-on-dark:  rgb(255 255 255 / 0.14);

  /* Type */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --fs-display: clamp(2.75rem, 1.2rem + 6.4vw, 6.5rem);
  --fs-h1:      clamp(2.1rem, 1.15rem + 3.6vw, 4rem);
  --fs-h2:      clamp(1.75rem, 1.15rem + 2.3vw, 2.9rem);
  --fs-h3:      clamp(1.25rem, 1.05rem + 0.75vw, 1.6rem);
  --fs-lead:    clamp(1.03rem, 0.96rem + 0.42vw, 1.25rem);
  --fs-body:    1rem;
  --fs-sm:      0.875rem;
  --fs-xs:      0.78rem;

  /* Space & rhythm */
  --container: 78rem;
  --gutter: clamp(1.25rem, 0.7rem + 2.2vw, 3rem);
  --section-y: clamp(4.5rem, 2.5rem + 7vw, 9rem);

  /* Shape — Bhuran is a *sharp* brand: near-square corners throughout */
  --radius: 3px;
  --radius-lg: 5px;

  --shadow-sm: 0 1px 2px rgb(4 36 74 / 0.06), 0 2px 6px rgb(4 36 74 / 0.05);
  --shadow-md: 0 4px 10px rgb(4 36 74 / 0.07), 0 14px 34px rgb(4 36 74 / 0.09);
  --shadow-lg: 0 10px 24px rgb(4 36 74 / 0.10), 0 34px 70px rgb(4 36 74 / 0.16);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.55s;

  --header-h: 78px;
}

/* ---------- §2  RESET ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Contains the off-screen starting position of horizontal scroll reveals so
     they cannot widen the document. `clip` (not `hidden`) because it does not
     create a scroll container, which would break the sticky header and
     smooth scrolling. */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; background: var(--paper-2); }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:target { scroll-margin-top: calc(var(--header-h) + 1.5rem); }

::selection { background: var(--gold-500); color: var(--navy-900); }

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: 0; left: 0; z-index: 200;
  transform: translateY(-120%);
  background: var(--gold-500); color: var(--navy-900);
  padding: 0.75rem 1.25rem; font-weight: 700;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- §3  TYPOGRAPHY ------------------------------------------------ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.028em;
  text-wrap: balance;
  color: var(--navy-800);
}
.display { font-size: var(--fs-display); font-weight: 800; letter-spacing: -0.042em; line-height: 0.94; }
h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.018em; }
h4 { font-size: 1.05rem; letter-spacing: -0.012em; }
p { text-wrap: pretty; }

.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--stone-700); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.mono { font-family: var(--font-mono); }

/* Eyebrow: mono index label — the signature Bhuran section marker */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.eyebrow::before {
  content: ""; width: clamp(1.5rem, 3vw, 2.75rem); height: 1px;
  background: currentColor; opacity: 0.6; flex: none;
}

/* Gold rule under a heading */
.rule { width: 3.5rem; height: 3px; background: var(--gold-500); border: 0; margin-block: 1.5rem 0; }
.rule--center { margin-inline: auto; }

/* Emphasised word inside display headings */
.hl { color: var(--gold-500); }
.outline-word { color: transparent; -webkit-text-stroke: 1.5px var(--gold-500); }

/* ---------- §4  LAYOUT ---------------------------------------------------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.container--wide { width: min(100% - var(--gutter) * 2, 92rem); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 1.8rem + 4.5vw, 5.5rem); }

.section--navy { background: var(--navy-800); color: rgb(255 255 255 / 0.78); }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4 { color: var(--white); }
.section--navy .lead { color: rgb(255 255 255 / 0.72); }
.section--navy .eyebrow { color: var(--gold-400); }
.section--ink { background: var(--navy-900); color: rgb(255 255 255 / 0.78); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--white); }
.section--ink .lead { color: rgb(255 255 255 / 0.72); }
.section--ink .eyebrow { color: var(--gold-400); }
.section--alt { background: var(--paper-2); }

.stack > * + * { margin-top: 1.25rem; }
.grid { display: grid; gap: clamp(1.25rem, 0.8rem + 1.6vw, 2rem); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 62rem) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }

/* Section head: heading left, supporting copy right — Bhuran's editorial split */
.sec-head {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.25rem, 0.5rem + 3vw, 4rem);
  align-items: end;
  padding-bottom: 2.25rem;
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.section--navy .sec-head, .section--ink .sec-head { border-bottom-color: var(--line-on-dark); }
.sec-head__title { margin-top: 1.35rem; }
.sec-head__aside { padding-bottom: 0.4rem; }
@media (max-width: 56rem) { .sec-head { grid-template-columns: 1fr; align-items: start; } }

.sec-head--center { grid-template-columns: 1fr; justify-items: center; text-align: center; border-bottom: 0; }
.sec-head--center .lead { margin-inline: auto; }

/* Blueprint grid backdrop — recurring brand texture */
.blueprint { position: relative; isolation: isolate; }
.blueprint::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.055) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, #000 35%, transparent 100%);
}
.blueprint--light::before {
  background-image:
    linear-gradient(to right, rgb(4 36 74 / 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(4 36 74 / 0.05) 1px, transparent 1px);
}

/* ---------- §5  BUTTONS & LINKS ------------------------------------------- */
.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: var(--white);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem;
  padding: 0.95rem 1.6rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.92rem; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
              transform 0.25s var(--ease), box-shadow 0.35s var(--ease);
}
/* Gold wipe fill on hover */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--gold-500);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.45s var(--ease);
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { color: var(--navy-900); border-color: var(--gold-500); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:hover::after { transform: scaleX(1); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

.btn--gold { --btn-bg: var(--gold-500); --btn-fg: var(--navy-900); }
.btn--gold::after { background: var(--navy-800); }
.btn--gold:hover { color: var(--white); border-color: var(--navy-800); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy-800); border-color: var(--line-strong); }
.btn--ghost:hover { color: var(--navy-900); }

.btn--light { --btn-bg: transparent; --btn-fg: var(--white); border-color: rgb(255 255 255 / 0.35); }
.btn--light::after { background: var(--white); }
.btn--light:hover { color: var(--navy-900); border-color: var(--white); }

.btn--lg { padding: 1.1rem 2rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn .icon { width: 1.05em; height: 1.05em; transition: transform 0.35s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(4px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Text link with animated gold underline */
.link {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  color: var(--navy-800); padding-bottom: 2px;
}
.link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--gold-500); transform: scaleX(0); transform-origin: right center;
  transition: transform 0.4s var(--ease);
}
.link:hover::after { transform: scaleX(1); transform-origin: left center; }
.link:hover .icon--arrow { transform: translateX(4px); }
.link .icon { width: 1rem; height: 1rem; transition: transform 0.35s var(--ease); }
.section--navy .link, .section--ink .link { color: var(--white); }

/* Inline SVG icon default.
   `inline-block` is required: width/height do not apply to a non-replaced
   inline element, so inside a plain block container the span would collapse
   and the injected SVG would size itself to the full available width. */
.icon { display: inline-block; width: 1.25rem; height: 1.25rem; flex: none; vertical-align: middle; }
.icon > svg { display: block; width: 100%; height: 100%; }
