/* ============================================================
   Sai Mudragada — "The Field Manual"
   Editorial, print-inspired working document:
   warm paper, ink black, blue-pen annotations, one hot accent.
   Fraunces (display serif) / Archivo (body) / IBM Plex Mono.
   ============================================================ */

:root {
  --paper: #f4f0e6;
  --paper-deep: #ece7d8;
  --ink: #191713;
  --ink-soft: #4c4738;
  --pen: #1d3fc4;          /* blue ballpoint */
  --hot: #e8501a;          /* vermillion — stamps & alerts only */
  --marker: #f6e25c;       /* highlighter yellow */
  --rule: rgba(25, 23, 19, 0.9);
  --rule-soft: rgba(25, 23, 19, 0.18);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Archivo", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --max: 1160px;
  --pad: clamp(20px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    /* faint paper grain */
    repeating-linear-gradient(0deg, rgba(25,23,19,0.012) 0 1px, transparent 1px 3px),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

a { color: inherit; }

::selection { background: var(--marker); color: var(--ink); }

h1, h2, h3 { font-weight: 600; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker-track { transform: none !important; }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  padding: 12px var(--pad);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.topbar-name { font-weight: 500; }
.topbar-item { color: var(--ink-soft); }
.topbar-status {
  margin-left: auto;
  text-decoration: none;
  color: var(--hot);
  font-weight: 500;
}
.topbar-status:hover { text-decoration: underline; }
.blink { animation: blink 1.6s step-end infinite; }
@keyframes blink { 50% { opacity: 0.15; } }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 9vh, 110px) var(--pad) 40px;
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--pen);
  margin-bottom: 34px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 2px;
  background: var(--pen);
  vertical-align: middle;
  margin-right: 12px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.9rem, 8vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  max-width: 14ch;
}
.hero-title em {
  font-style: italic;
  font-weight: 600;
}
.asterisk { color: var(--hot); font-family: var(--sans); font-weight: 700; }

/* marker highlight */
.hl {
  position: relative;
  white-space: nowrap;
}
.hl::before {
  content: "";
  position: absolute;
  inset: 12% -2% 4% -1%;
  background: var(--marker);
  transform: skew(-8deg) rotate(-0.8deg);
  z-index: -1;
}

/* blue-pen annotation + arrow */
.anno-wrap { position: relative; display: inline-block; }
.anno-arrow {
  position: absolute;
  width: clamp(60px, 7vw, 96px);
  left: calc(100% + 16px);
  top: 0.28em;
  stroke: var(--pen);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.anno-note {
  position: absolute;
  left: calc(100% + clamp(84px, 9vw, 124px));
  top: 0.05em;
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
  color: var(--pen);
  transform: rotate(-3deg);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .anno-arrow, .anno-note { display: none; }
}

.footnote {
  margin-top: 34px;
  max-width: 52ch;
  font-size: 15.5px;
  color: var(--ink-soft);
  border-left: 2px solid var(--hot);
  padding-left: 16px;
}
.footnote .mono { color: var(--hot); }
.footnote em { font-style: italic; }

/* hero facts */
.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 58px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule-soft);
}
.fact {
  padding: 22px 18px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fact + .fact { padding-left: 22px; border-left: 1px solid var(--rule-soft); }
.fact-num {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
}
.fact-num i { font-style: italic; font-weight: 400; font-size: 0.65em; }
.fact-label { font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-soft); line-height: 1.7; }

/* hero ctas */
.hero-ctas { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 40px; }
.cta {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}
.cta:hover { color: var(--pen); border-color: var(--pen); }
.cta-alt { border-bottom-color: var(--rule-soft); }
.cta-arrow { display: inline-block; transition: transform 0.25s; }
.cta:hover .cta-arrow { transform: translate(2px, 2px); }

/* ---------- receipt ---------- */
.receipt-wrap {
  margin-top: 70px;
  display: flex;
  align-items: flex-end;
  gap: 26px;
  flex-wrap: wrap;
}
.receipt {
  background: #fffdf6;
  width: min(520px, 100%);
  padding: 26px 26px 20px;
  transform: rotate(-0.8deg);
  box-shadow: 3px 6px 0 rgba(25, 23, 19, 0.14);
  /* zigzag receipt edges */
  clip-path: polygon(
    0 8px, 4% 0, 8% 8px, 12% 0, 16% 8px, 20% 0, 24% 8px, 28% 0, 32% 8px, 36% 0,
    40% 8px, 44% 0, 48% 8px, 52% 0, 56% 8px, 60% 0, 64% 8px, 68% 0, 72% 8px,
    76% 0, 80% 8px, 84% 0, 88% 8px, 92% 0, 96% 8px, 100% 0,
    100% calc(100% - 8px), 96% 100%, 92% calc(100% - 8px), 88% 100%, 84% calc(100% - 8px),
    80% 100%, 76% calc(100% - 8px), 72% 100%, 68% calc(100% - 8px), 64% 100%,
    60% calc(100% - 8px), 56% 100%, 52% calc(100% - 8px), 48% 100%, 44% calc(100% - 8px),
    40% 100%, 36% calc(100% - 8px), 32% 100%, 28% calc(100% - 8px), 24% 100%,
    20% calc(100% - 8px), 16% 100%, 12% calc(100% - 8px), 8% 100%, 4% calc(100% - 8px), 0 100%
  );
}
.receipt-head {
  font-size: 11px;
  letter-spacing: 0.1em;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--rule-soft);
}
.receipt-body {
  font-size: 12px;
  line-height: 2.05;
  min-height: 148px;
  color: var(--ink-soft);
}
.receipt-body .log-line { display: block; }
.receipt-body .t { color: rgba(25,23,19,0.38); margin-right: 8px; }
.receipt-body .ok { color: var(--pen); font-weight: 500; }
.receipt-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--ink-soft);
}
.receipt-caption {
  font-size: 11.5px;
  font-style: italic;
  color: var(--pen);
  transform: rotate(-1.2deg);
  padding-bottom: 8px;
}

/* ---------- ticker ---------- */
.ticker {
  margin-top: 70px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  padding: 10px 0;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  animation: ticker 36s linear infinite;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(70px, 10vh, 120px) var(--pad) 0;
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(18px, 4vw, 54px);
  align-items: start;
  margin-bottom: clamp(40px, 6vh, 64px);
}
.section-no {
  font-size: clamp(3.4rem, 7vw, 5.6rem);
  font-weight: 900;
  font-style: italic;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
.section-title-wrap h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.section-sub { max-width: 58ch; color: var(--ink-soft); }

/* ---------- 01 blueprint ---------- */
.blueprint {
  border: 2px solid var(--pen);
  background:
    linear-gradient(rgba(29, 63, 196, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 63, 196, 0.055) 1px, transparent 1px),
    #f0ede0;
  background-size: 26px 26px, 26px 26px, auto;
  padding: clamp(22px, 4vw, 44px);
  position: relative;
}
.blueprint-stamp {
  position: absolute;
  top: -13px;
  left: 26px;
  background: var(--paper);
  padding: 2px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--pen);
  border: 1px solid var(--pen);
}
.bp-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.bp-node {
  flex: 1;
  border: 1.5px solid var(--pen);
  background: rgba(255, 253, 246, 0.85);
  padding: 18px 16px;
  min-width: 0;
  box-shadow: 4px 4px 0 rgba(29, 63, 196, 0.16);
}
.bp-node h3 {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--pen);
  margin: 8px 0 10px;
  font-weight: 500;
}
.bp-node p { font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.bp-step {
  font-size: 10px;
  color: rgba(29, 63, 196, 0.6);
  letter-spacing: 0.1em;
}
.bp-tools {
  display: block;
  margin-top: 12px;
  font-size: 10.5px;
  font-style: italic;
  color: var(--pen);
}
.bp-end { background: var(--pen); }
.bp-end h3, .bp-end .bp-step, .bp-end .bp-tools { color: rgba(244, 240, 230, 0.85); }
.bp-end p { color: rgba(244, 240, 230, 0.75); }

.bp-link {
  flex: 0 0 clamp(26px, 3.4vw, 52px);
  position: relative;
}
.bp-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  border-top: 2px dashed var(--pen);
}
.bp-link::after {
  content: "▸";
  position: absolute;
  top: 50%;
  right: -2px;
  transform: translateY(-54%);
  color: var(--pen);
  font-size: 13px;
}
.bp-anno {
  position: absolute;
  top: calc(50% - 32px);
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  font-size: 9.5px;
  font-style: italic;
  color: var(--pen);
  white-space: nowrap;
  background: #f0ede0;
  padding: 1px 6px;
  border: 1px dashed rgba(29, 63, 196, 0.35);
  z-index: 2;
}
.blueprint-note {
  margin-top: 26px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--pen);
}

@media (max-width: 900px) {
  .bp-flow { flex-direction: column; }
  .bp-link { flex-basis: 44px; }
  .bp-link::before {
    left: 50%; right: auto; top: 4px; bottom: 4px;
    border-top: none;
    border-left: 2px dashed var(--pen);
  }
  .bp-link::after {
    content: "▾";
    right: auto; left: 50%; top: auto; bottom: -4px;
    transform: translateX(-56%);
  }
  .bp-anno { top: 50%; left: 58%; transform: translateY(-50%) rotate(-2deg); }
}

/* ---------- 02 ledger ---------- */
.ledger { border-top: 2px solid var(--ink); }
.ledger-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: clamp(20px, 3vh, 30px) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.ledger-num {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}
.ledger-num i { font-style: italic; font-weight: 400; font-size: 0.5em; margin-left: 2px; }
.ledger-desc { max-width: 56ch; color: var(--ink-soft); font-size: 15.5px; }
.ledger-tag {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--pen);
  border: 1px solid currentColor;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .ledger-row { grid-template-columns: 1fr; gap: 10px; }
  .ledger-tag { justify-self: start; }
}

/* ---------- 03 shipping log ---------- */
.ships { border-top: 2px solid var(--ink); }
.ship {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(22px, 3.4vh, 34px) 14px;
  margin: 0 -14px;
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.22s, color 0.22s;
}
.ship:hover { background: var(--ink); color: var(--paper); }
.ship-no { font-size: 12px; letter-spacing: 0.1em; padding-top: 8px; color: var(--hot); }
.ship:hover .ship-no { color: var(--marker); }
.ship-body h3 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.ship-body p { max-width: 62ch; font-size: 15px; color: var(--ink-soft); transition: color 0.22s; }
.ship:hover .ship-body p { color: rgba(244, 240, 230, 0.75); }
.ship-tag {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  align-self: start;
  padding-top: 12px;
  color: var(--ink-soft);
  transition: color 0.22s;
}
.ship:hover .ship-tag { color: rgba(244, 240, 230, 0.7); }
@media (max-width: 720px) {
  .ship { grid-template-columns: 1fr; gap: 8px; }
  .ship-tag { padding-top: 0; }
}

/* ---------- 04 service record ---------- */
.record { border-top: 2px solid var(--ink); }
.rec-item {
  display: grid;
  grid-template-columns: minmax(110px, 170px) 1fr;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(24px, 3.6vh, 38px) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.rec-when { display: flex; align-items: baseline; gap: 10px; }
.rec-year {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
}
.rec-now { font-size: 10.5px; letter-spacing: 0.1em; color: var(--hot); }
.rec-body h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.rec-body p { max-width: 66ch; color: var(--ink-soft); font-size: 15.5px; }
@media (max-width: 720px) {
  .rec-item { grid-template-columns: 1fr; gap: 8px; }
}

.creds {
  margin-top: 30px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  line-height: 2.1;
}

/* ---------- 05 words / poster ---------- */
.poster-wrap { margin-bottom: 50px; }
.poster {
  position: relative;
  background:
    radial-gradient(ellipse at 75% 15%, rgba(255, 255, 255, 0.05), transparent 55%),
    #101319;
  color: #edeff2;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 84px) clamp(30px, 6vw, 72px);
  transform: rotate(-1.4deg);
  box-shadow: 0 22px 50px rgba(25, 23, 19, 0.35);
}
.tape {
  position: absolute;
  width: 108px;
  height: 30px;
  background: rgba(246, 226, 92, 0.5);
  box-shadow: 0 1px 3px rgba(25, 23, 19, 0.2);
}
.tape-tl { top: -14px; left: -32px; transform: rotate(-38deg); }
.tape-br { bottom: -14px; right: -32px; transform: rotate(-38deg); }
.poster-copy {
  font-size: clamp(1.8rem, 4.8vw, 3.6rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
}
.poster-brand {
  margin-top: clamp(28px, 4vw, 46px);
  text-align: right;
  font-size: 14px;
  color: #c9cdd3;
}
.poster-wrap figcaption {
  margin-top: 30px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.words-list { list-style: none; border-top: 2px solid var(--ink); }
.words-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.words-list .serif { font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 600; font-style: italic; }
.words-list .mono { font-size: 10.5px; letter-spacing: 0.12em; color: var(--pen); white-space: nowrap; }

/* ---------- 06 contact ---------- */
.contact { padding-bottom: clamp(80px, 12vh, 140px); }
.contact-inner {
  position: relative;
  border: 2px solid var(--ink);
  padding: clamp(44px, 7vw, 90px) clamp(24px, 5vw, 70px);
  text-align: center;
  background: var(--paper-deep);
}
.stamp {
  position: absolute;
  top: clamp(14px, 3vw, 30px);
  right: clamp(14px, 3vw, 34px);
  border: 3px double var(--hot);
  color: var(--hot);
  font-size: clamp(10px, 1.4vw, 13px);
  letter-spacing: 0.18em;
  line-height: 1.5;
  padding: 10px 14px;
  transform: rotate(9deg);
  border-radius: 4px;
  opacity: 0.85;
}
.contact-title {
  font-size: clamp(2.3rem, 5.6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.02;
  margin-bottom: 22px;
}
.contact-title em { font-style: italic; color: var(--pen); }
.contact-sub { max-width: 52ch; margin: 0 auto 40px; color: var(--ink-soft); }
.contact-email {
  display: inline-block;
  font-size: clamp(1.25rem, 3.4vw, 2.3rem);
  font-weight: 600;
  font-style: italic;
  text-decoration: none;
  border-bottom: 3px solid var(--hot);
  padding-bottom: 4px;
  transition: color 0.2s;
  word-break: break-all;
}
.contact-email:hover { color: var(--hot); }
.contact-alt { margin-top: 26px; font-size: 11.5px; letter-spacing: 0.12em; }
.contact-alt a { color: var(--ink-soft); text-decoration: none; }
.contact-alt a:hover { color: var(--pen); text-decoration: underline; }

/* ---------- footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px var(--pad) 34px;
  border-top: 2px solid var(--ink);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ---------- responsive helpers ---------- */
@media (max-width: 860px) { .hide-md { display: none; } }
@media (max-width: 620px) {
  .hide-sm { display: none; }
  .hero-facts { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: none; border-top: 1px solid var(--rule-soft); }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
}
