/* amartalwar.com
   Layout and type rhythm follow sigmaphoto.com (measured 2026-10-19):
   off-white page, #333 ink, dark announcement bar, centred serif wordmark,
   13px uppercase sans nav, 88px uppercase serif display, 16px uppercase
   serif section labels, 2-up overlay tiles, feature band (black here: the site is strictly black and white, like the book).
   Sigma's own typefaces are proprietary, so free near-matches are used. */

:root {
  --bg: #ffffff;
  --ink: #333333;
  --ink-soft: rgba(51, 51, 51, 0.7);
  --bar: #333333;
  --feature: #111111;
  --cream: #f0f0f0;
  --placeholder: #d4d4d4;
  --line: #333333;
  --rule-soft: rgba(51, 51, 51, 0.15);
  --ph-ink: rgba(51, 51, 51, 0.55);
  --field: #ffffff;
  --btn-bg: #333333;
  --btn-ink: #ffffff;
  --btn-hover: #000000;

  --serif: "Newsreader", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --tile-gap: 16px;
  --section: 120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.sans { font-family: var(--sans); font-size: 13px; letter-spacing: 0.006em; }
.upper { text-transform: uppercase; }

/* ---------- announcement bar ---------- */
.bar {
  background: var(--bar);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 72px;
  min-height: 48px;
  padding: 10px var(--gutter);
  text-align: center;
  text-transform: uppercase;
}
.bar a {
  font-family: var(--sans);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  padding: 12px 0; /* bigger tap area without changing the bar's height */
  margin: -12px 0;
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--gutter);
}
.nav { display: flex; gap: 16px; }
.nav a, .header-right a, .menu-btn {
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  padding: 8px 0;
}
.nav a:hover, .header-right a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wordmark {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.header-right { display: flex; justify-content: flex-end; gap: 16px; }
.menu-btn { display: none; }

/* mobile menu panel */
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  padding: 0 var(--gutter);
  display: none;
  flex-direction: column;
}
.menu-panel.open { display: flex; }
.menu-panel .menu-top {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu-panel nav { display: flex; flex-direction: column; padding-top: 24px; }
.menu-panel nav a {
  font-family: var(--serif);
  font-size: 28px;
  text-transform: uppercase;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}

/* ---------- hero ---------- */
.hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #222;
}

/* ---------- title block ---------- */
.title-block {
  text-align: center;
  padding: var(--section) var(--gutter) 96px;
  max-width: 1200px;
  margin: 0 auto;
}
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.1vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.034em;
  text-transform: uppercase;
}
.title-block .lede { margin-top: 28px; }
.title-block .more { margin-top: 24px; display: inline-block; }
.title-block .credit { margin-top: 14px; font-family: var(--sans); font-size: 13px; text-transform: uppercase; color: var(--ink-soft); }

.more {
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  padding: 6px 0 3px;
  /* underline that draws itself in from the left on hover */
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.more:hover, a:hover > .more, a:focus-visible .more { background-size: 100% 1px; }

/* ---------- section label ---------- */
.label {
  text-align: center;
  text-transform: uppercase;
  padding: var(--section) var(--gutter) 64px;
}

/* ---------- chapter grid (3 up, caption below) ---------- */
.chapters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 32px;
  row-gap: 72px;
  padding: 0 var(--gutter);
}
.chapter .frame { aspect-ratio: 1 / 1; }
/* a lone last chapter sits in the middle column */
@media (min-width: 1025px) { .chapter:last-child:nth-child(3n+1) { grid-column: 2; } }
.chapter .num {
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.chapter h3 {
  margin-top: 6px;
  font-weight: 400;
  font-size: 16px;
  text-transform: uppercase;
}
.chapter p { margin-top: 10px; max-width: 34em; color: var(--ink); }

/* ---------- photo placeholder ---------- */
.ph {
  background: var(--placeholder);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
}
.ph span {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ph-ink);
  padding: 12px;
}
.frame { position: relative; overflow: hidden; }
.frame picture { display: block; width: 100%; height: 100%; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
/* chapter photos are shown whole, never cropped: film frames float on white */
.frame.contain img { object-fit: contain; object-position: 50% 100%; }

/* ---------- feature band ---------- */
.feature {
  margin-top: var(--section);
  background: var(--feature);
  color: #fff;
  text-align: center;
  padding: 140px var(--gutter);
}
.feature .display { letter-spacing: 0; }
/* photo of Amar beside his story: side by side on wide screens, stacked on phones */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; text-align: left; padding: 120px var(--gutter); }
.feature-photo img { width: 100%; height: auto; }
.feature-photo .ph { aspect-ratio: 3 / 2; }
.feature .feature-copy p { margin-left: 0; }
.feature .feature-copy .display { font-size: clamp(40px, 4.6vw, 72px); }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 40px; text-align: center; padding: 0 0 96px; }
  .feature-copy { padding: 0 var(--gutter); }
  .feature .feature-copy p { margin-left: auto; }
}
.feature p {
  max-width: 34em;
  margin: 28px auto 0;
  font-size: 17px;
  line-height: 1.45;
}
.feature .more { margin-top: 28px; display: inline-block; }

/* ---------- 2-up overlay tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--tile-gap);
  padding: 0 var(--gutter);
}
.tile { position: relative; aspect-ratio: 1 / 1; overflow: hidden; color: #fff; }
.tile .frame { position: absolute; inset: 0; }
.tile .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
}
.tile .copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.tile h3 {
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  text-transform: uppercase;
}
.tile .more { margin-top: 16px; }
.tile .ph { background: #666666; }
.tile .ph span { color: rgba(255, 255, 255, 0.6); }

/* ---------- stories (3 column text) ---------- */
.stories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 32px;
  row-gap: 64px;
  padding: 0 var(--gutter);
}
.story h3 { font-weight: 400; font-size: 16px; text-transform: uppercase; }
.story p { margin-top: 14px; max-width: 30em; }

/* ---------- notify ---------- */
.notify {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
  padding: var(--section) var(--gutter) 0;
}
.notify-form { padding: 0 20px; }
.notify-form h2 { font-weight: 400; font-size: 16px; text-transform: uppercase; }
.notify-form .sub { margin-top: 6px; }
.notify-form label { display: block; margin-top: 28px; font-family: var(--sans); font-size: 12px; }
.notify-form input, .notify-form textarea {
  width: 100%;
  margin-top: 8px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 12px;
  font: 16px var(--sans);
  background: var(--field);
  color: var(--ink);
}
.notify-form textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.notify-form label { margin-top: 20px; }
.btn {
  margin-top: 24px;
  width: 100%;
  height: 40px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  border-radius: 3px;
}
.btn:hover { background: var(--btn-hover); }
.btn:disabled { opacity: 0.6; cursor: default; }
.form-small { margin-top: 10px; font-family: var(--sans); font-size: 12px; color: var(--ink-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 14px; font-family: var(--sans); font-size: 13px; color: var(--ink-soft); min-height: 1em; }
.notify-panel { background: var(--cream); aspect-ratio: 16 / 10; overflow: hidden; }
.notify-panel img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

/* ---------- footer ---------- */
.footer {
  margin-top: 220px;
  padding: 0 var(--gutter) 24px;
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
}
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer h4 { font-weight: 400; color: var(--ink-soft); margin-bottom: 16px; }
.footer li { list-style: none; line-height: 1.25; }
.footer li a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1024px) { .footer li a { display: inline-block; padding: 7px 0; } .footer li { line-height: 1.1; } }
.footer .copy-line { margin-top: 120px; text-transform: none; }

/* ---------- reading pages (introduction / afterword) ---------- */
.reading { max-width: 680px; margin: 0 auto; padding: 96px var(--gutter) 0; }
.reading .display { text-align: center; }
.reading .eyebrow { text-align: center; font-family: var(--sans); font-size: 13px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 24px; }
.reading-photo { margin: 56px calc(50% - min(50vw, 560px)) 0; }
.reading-photo img { width: 100%; height: auto; }
.reading .body { margin-top: 72px; font-size: 19px; line-height: 1.6; }
.reading .body p + p { margin-top: 1.1em; }
.reading .sign { margin-top: 2em; font-style: italic; }
.reading .next { margin-top: 72px; text-align: center; }

/* ---------- dark mode ----------
   Follows the device setting; the Light/Dark switch overrides it
   (data-theme on <html>). Still strictly neutral greys. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111;
    --ink: #e6e6e6;
    --ink-soft: rgba(230, 230, 230, 0.62);
    --bar: #000000;
    --feature: #1e1e1e;
    --cream: #1a1a1a;
    --placeholder: #2a2a2a;
    --line: #e6e6e6;
    --rule-soft: rgba(230, 230, 230, 0.15);
    --ph-ink: rgba(230, 230, 230, 0.45);
    --field: #1a1a1a;
    --btn-bg: #e6e6e6;
    --btn-ink: #111111;
    --btn-hover: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111111;
  --ink: #e6e6e6;
  --ink-soft: rgba(230, 230, 230, 0.62);
  --bar: #000000;
  --feature: #1e1e1e;
  --cream: #1a1a1a;
  --placeholder: #2a2a2a;
  --line: #e6e6e6;
  --rule-soft: rgba(230, 230, 230, 0.15);
  --ph-ink: rgba(230, 230, 230, 0.45);
  --field: #1a1a1a;
  --btn-bg: #e6e6e6;
  --btn-ink: #111111;
  --btn-hover: #ffffff;
  color-scheme: dark;
}
.theme-btn {
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  padding: 8px 0;
}
.theme-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.menu-panel .theme-btn {
  text-align: left;
  font-family: var(--serif);
  font-size: 28px;
  padding: 12px 0;
}
@media (max-width: 640px) {
  .header-right .theme-btn { display: none; }
}

/* ---------- motion ----------
   Everything here is gated on html.js (so the page still shows if scripts fail)
   and on prefers-reduced-motion: no-preference (so it switches off for people
   who ask their device for less motion). */
.header { transition: box-shadow 0.4s ease; }
.header.scrolled { box-shadow: 0 1px 0 var(--rule-soft); }
.hero { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  /* sections rise into place; --d staggers items in a row */
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms),
                transform 1s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
  }
  .js .reveal.in { opacity: 1; transform: none; }

  /* photos "develop": pale and soft first, then the full print, like a
     picture coming up in a darkroom tray */
  .js .reveal img, .js .notify-panel img, .js .reading-photo img {
    filter: brightness(1.7) contrast(0.45) blur(3px);
    transition: filter 2.2s cubic-bezier(0.25, 0.6, 0.2, 1) calc(var(--d, 0ms) + 150ms);
  }
  .js .reveal.in img, .js .notify-panel.in img, .js .reading-photo.in img { filter: none; }

  /* top photo settles in when the page opens */
  .js .hero img { animation: hero-in 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; will-change: transform; }
  @keyframes hero-in {
    from { transform: scale(1.08); filter: brightness(1.6) contrast(0.5); }
    to { transform: scale(1); filter: none; }
  }

  /* heading block: lines rise one after another */
  .js .title-block > * { opacity: 0; transform: translateY(20px); transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .title-block.in > * { opacity: 1; transform: none; }
  .js .title-block.in > :nth-child(2) { transition-delay: 0.15s; }
  .js .title-block.in > :nth-child(3) { transition-delay: 0.3s; }
  .js .title-block.in > :nth-child(4) { transition-delay: 0.45s; }
  .js .title-block.reveal { opacity: 1; transform: none; }

  /* tiles are links: the photo eases in a touch on hover */
  @media (hover: hover) {
    .tile .frame img { transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), filter 2.2s ease; }
    .tile:hover .frame img { transform: scale(1.04); }
    .tile .frame::after { transition: background 0.6s ease; }
    .tile:hover .frame::after { background: rgba(0, 0, 0, 0.42); }
  }
}

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .nav { display: none; }
  .menu-btn { display: block; justify-self: start; }
  .chapters { grid-template-columns: repeat(2, 1fr); }
  .stories { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  :root { --section: 80px; }
  body { font-size: 16px; }
  .bar { gap: 16px; text-align: left; justify-content: space-between; font-size: 15px; }
  .wordmark { font-size: 22px; }
  .hero img { aspect-ratio: auto; }
  .title-block { padding-bottom: 64px; }
  .title-block .lede br { display: none; }
  .chapters { grid-template-columns: 1fr; row-gap: 56px; }
  .chapter .frame.contain:has(img) { aspect-ratio: auto; }
  .chapter .frame.contain:has(img) img { height: auto; }
  .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 4 / 5; }
  .stories { grid-template-columns: 1fr; row-gap: 48px; }
  .feature { padding: 96px var(--gutter); }
  .notify { grid-template-columns: 1fr; }
  .notify-form { padding: 0; }
  .notify-panel { aspect-ratio: 4 / 5; }
  .footer { margin-top: 140px; }
  .footer .copy-line { margin-top: 72px; }
  .reading { padding-top: 64px; }
  .reading .body { margin-top: 48px; font-size: 18px; }
}

/* focus ring in ink, not the browser's coloured default (site is strictly black and white) */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.notify-form input:focus, .notify-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; }
