/* bhumikdarji.com: design system from CLAUDE.md
   Four colors only. Accent (oxblood) is used for buttons, section-number rules and hover states only.
   Text never uses the accent color (it fails contrast on the dark background). */

:root {
  --bg: #0E0E0E;
  --text: #F2EDE4;
  --accent: #5C1A24;
  --muted: #8A8580;

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 20px;
  --max: 1080px;
  --header-h: 56px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- focus + skip link ---------- */

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--accent);
  color: var(--text);
  padding: 10px 16px;
  z-index: 20;
}
.skip:focus { top: 10px; }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--muted);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  min-height: calc(var(--header-h) - 1px); /* the 1px border brings the bar to exactly 56px */
}

.wordmark {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}

.wordmark:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.menu-toggle {
  display: none;
  height: 40px;
  padding: 0 16px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--muted);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.menu-toggle:hover { border-color: var(--accent); }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}

.nav-list a {
  display: inline-block;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* phones with JS: one compact row, links live in a dropdown under the bar */
@media (max-width: 719px) {
  .js .header-inner { height: calc(var(--header-h) - 1px); flex-wrap: nowrap; }
  .js .menu-toggle { display: block; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--muted);
  }
  .js .site-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list li { border-top: 1px solid var(--muted); }
  .js .nav-list a {
    display: block;
    padding: 14px var(--gutter);
    font-size: 1rem;
    color: var(--text);
  }
}

/* ---------- sections ---------- */

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--muted);
}

/* anchor targets clear the sticky header */
section[id] { scroll-margin-top: var(--header-h); }

/* section number: warm gray text (5.4:1) under a short oxblood rule */
.num {
  display: inline-block;
  width: 48px;
  margin: 0 0 24px;
  padding-top: 12px;
  border-top: 2px solid var(--accent);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--muted);
}

h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 20px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.lead {
  max-width: 65ch;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.prose p { max-width: 65ch; }

/* ---------- buttons / links ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--text);
}

.text-link {
  display: inline-block;
  margin-left: 20px;
  padding: 14px 0;
  color: var(--text);
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

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

/* ---------- 01 hero ---------- */

.hero {
  padding-top: 56px;
  padding-bottom: 64px;
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero-eyebrow {
  margin: 0 0 20px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.hero-eyebrow span { color: var(--text); font-weight: 500; }

.hero h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-bottom: 20px;
}

.hero-scope {
  max-width: 40ch;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.5;
  margin-bottom: 32px;
}

.hero-text p:last-child { margin-bottom: 0; }

.hero-photo {
  margin: 0;
  width: 100%;
  max-width: 320px;
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--muted);
}

.hero-photo figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

/* ---------- 02 plate ---------- */

.plate-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--muted);
}

.plate-list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--muted);
}

.plate-list p {
  max-width: 65ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* ---------- 03 arsenal ---------- */

.lead--tight { margin-bottom: 12px; }

.proof-position {
  max-width: 65ch;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.proof-note {
  max-width: 65ch;
  margin: 0 0 48px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.proof-group + .proof-group { margin-top: 56px; }

.group-title {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--muted);
  font-size: 1.25rem;
}

/* equal-height cards, so the bottom borders of a pair line up */
.proof-grid {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.proof-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--muted);
}

.proof-card:hover { border-color: var(--accent); }

.proof-card figure {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin: 0;
}

/* screenshots keep their own proportions: no cropping, no stretching */
.proof-thumb {
  display: block;
  border: 1px solid var(--muted);
  background: var(--bg);
  line-height: 0;
  cursor: zoom-in;
}

.proof-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

/* pairs: every screenshot gets the same frame, and the whole image is fitted inside it */
.proof-grid--pair .proof-thumb {
  position: relative;
  aspect-ratio: 1280 / 652;
}

.proof-grid--pair .proof-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.proof-card figcaption {
  flex: 1;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.proof-figure {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.375rem, 4vw, 1.625rem);
  line-height: 1.2;
}

.proof-text { display: block; }

/* ---------- enlarged screenshot ---------- */

html.lb-open { overflow: hidden; }

.lightbox {
  width: min(1312px, calc(100vw - 24px));
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--muted);
  border-radius: 0;
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
}

.lightbox::backdrop { background: rgb(14 14 14 / 0.94); }

.lightbox-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: start;
  flex: none;
  padding: 12px 16px;
  border-bottom: 1px solid var(--muted);
}

.lightbox-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.lightbox-caption .proof-figure {
  margin-bottom: 2px;
  font-size: 1.125rem;
}

.lightbox-actions {
  display: flex;
  gap: 8px;
}

.lightbox-close,
.lightbox-zoom {
  min-width: 44px;
  min-height: 44px;
  padding: 0 18px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--muted);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-zoom:hover { border-color: var(--accent); }

.lightbox-hint {
  flex: none;
  margin: 0;
  padding: 8px 16px 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.lightbox-hint[hidden],
.lightbox-zoom[hidden] { display: none; }

/* Fit is the default: the whole screenshot sits inside the viewer, nothing cropped */
.lightbox-body {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.lightbox-body:not(.is-ready)::before {
  content: "Loading screenshot";
  margin: auto;
  color: var(--muted);
  font-size: 0.9375rem;
}

.lightbox-body.has-error::before { content: "This screenshot could not be loaded"; }

.lightbox-body img {
  display: block;
  flex: none;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
}

/* Zoom: the screenshot at its full size, panned inside the viewer. Width is set from the script. */
.lightbox.is-zoomed .lightbox-body img {
  max-width: none;
  max-height: none;
  height: auto;
}

/* phones: full-screen viewer, buttons on their own row above the caption */
@media (max-width: 719px) {
  .lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
  }
  .lightbox-bar { grid-template-columns: minmax(0, 1fr); padding: 8px 12px 12px; }
  .lightbox-actions { order: -1; justify-content: flex-end; }
  .lightbox-hint { padding: 8px 12px 0; }
  .lightbox-body { padding: 12px; }
}

/* ---------- 04 method ---------- */

.method-quote {
  margin: 0 0 48px;
  padding: 0;
  max-width: 36ch;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.25rem, 3.6vw, 1.95rem);
  line-height: 1.3;
}

.steps {
  display: grid;
  gap: 0;
  counter-reset: step;
  border-top: 1px solid var(--muted);
}

.steps li {
  counter-increment: step;
  padding: 24px 0;
  border-bottom: 1px solid var(--muted);
}

.steps h3::before {
  content: counter(step) ". ";
  color: var(--muted);
}

.steps p {
  max-width: 65ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* ---------- 06 contact ---------- */

#contact { border-bottom: 0; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--muted);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer p { margin: 0; }

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  display: inline-block;
  padding: 4px 0;
  color: var(--muted);
  text-underline-offset: 4px;
}

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

/* ---------- the one animation: fade in + rise 20px, 250ms ease ---------- */
/* Content is hidden only while .reveal-on is set (the head script sets it when scroll-reveal can work).
   If the script never gets ready, .reveal-failsafe shows everything. Without JS, nothing is ever hidden. */

.reveal-on .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 250ms ease, transform 250ms ease;
}

.reveal-on .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-failsafe .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .section { padding: 96px 0; }
  .hero { padding-top: 80px; padding-bottom: 96px; }
}

@media (min-width: 720px) {
  .nav-list { gap: 2px 28px; }
  .nav-list a { font-size: 0.95rem; }
}

@media (min-width: 820px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 64px;
    align-items: center;
  }

  .hero-photo { max-width: 380px; justify-self: end; }

  .plate-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }

  .proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  /* a group with one screenshot: image left, figures right */
  .proof-grid--single .proof-card { grid-column: 1 / -1; }

  .proof-grid--single figure {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }

  .proof-grid--single figcaption { margin-top: 0; }

  .steps {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }
}
