/* ==========================================================================
   Sherekes LLC — "Manifest" design system
   Palette: ink / paper / brass, evoking a shipping manifest & cargo tagging.
   Type: Oswald (condensed industrial display) + IBM Plex Sans (body)
         + IBM Plex Mono (data / codes / labels).
   ========================================================================== */

:root {
  /* Light (default) */
  --ink: #141b22;
  --ink-soft: #263038;
  --paper: #edeee6;
  --paper-raised: #f8f8f3;
  --brass: #a9762f;
  --brass-strong: #8c5f22;
  --slate: #5b6670;
  --line: #d9d9cf;
  --shadow: rgba(20, 27, 34, 0.08);

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --max-width: 1180px;
  --radius: 3px;

  /* Fixed "stamped ink" tokens for the hero / CTA band / footer — these bands
     are a deliberate single dark identity (like a stamped manifest cover)
     and intentionally do not flip with light/dark theme. */
  --stamp-bg: #141b22;
  --stamp-text: #f4f2ea;
  --stamp-text-muted: #b9c0c6;
  --stamp-line: rgba(255, 255, 255, 0.14);
  --stamp-brass: #d4a05c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7e5dc;
    --ink-soft: #c7c9c1;
    --paper: #0c1115;
    --paper-raised: #161b20;
    --brass: #d19a55;
    --brass-strong: #e6b06e;
    --slate: #93a0a8;
    --line: #262d33;
    --shadow: rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --ink: #e7e5dc;
  --ink-soft: #c7c9c1;
  --paper: #0c1115;
  --paper-raised: #161b20;
  --brass: #d19a55;
  --brass-strong: #e6b06e;
  --slate: #93a0a8;
  --line: #262d33;
  --shadow: rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] {
  --ink: #141b22;
  --ink-soft: #263038;
  --paper: #edeee6;
  --paper-raised: #f8f8f3;
  --brass: #a9762f;
  --brass-strong: #8c5f22;
  --slate: #5b6670;
  --line: #d9d9cf;
  --shadow: rgba(20, 27, 34, 0.08);
}

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

html { scroll-behavior: smooth; }

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

html, body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  width: 100%;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; font-weight: 600; letter-spacing: 0.2px; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--brass);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 999;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- Header ---- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: padding 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

header.is-scrolled {
  padding: 13px 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px var(--shadow);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.logo .dot { color: var(--brass); font-size: 1.6rem; line-height: 0; }

nav ul {
  display: flex;
  list-style: none;
  gap: 36px;
}

nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 3px;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--brass);
  transition: width 0.2s ease;
}
nav a:hover::after, nav a:focus-visible::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 42px;
  height: 38px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--stamp-bg);
  color: var(--stamp-text);
  padding: 178px 28px 130px;
  overflow: hidden;
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero .mono-tag { color: var(--stamp-brass); display: block; margin-bottom: 22px; }

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 22px;
  color: var(--stamp-text);
}

.hero p {
  font-size: 1.12rem;
  color: var(--stamp-text-muted);
  max-width: 600px;
  margin: 0 auto 38px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brass); color: #1a1204; }
.btn-primary:hover { background: var(--brass-strong); box-shadow: 0 10px 26px -8px var(--brass); }

.btn-ghost { background: transparent; color: var(--stamp-text); border-color: var(--stamp-line); }
.btn-ghost:hover { border-color: var(--stamp-brass); color: var(--stamp-brass); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brass); color: var(--brass-strong); }

/* ---- Reveal-on-scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { transition-delay: calc(var(--i, 0) * 90ms); }

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

/* ---- Sections ---- */
section { padding: 108px 28px; }

.section-header {
  max-width: 620px;
  margin: 0 auto 60px;
}
.section-header.centered { text-align: center; }
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  color: var(--ink);
  margin: 12px 0 14px;
}
.section-header p { color: var(--slate); font-size: 1.02rem; }

/* ---- About / manifest cover block ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
}

.about-grid h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 12px 0 20px; }
.about-grid p { color: var(--slate); margin-bottom: 16px; font-size: 1.02rem; max-width: 62ch; }

.manifest-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.manifest-card .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.manifest-card .row:last-child { border-bottom: none; }
.manifest-card .row .k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--slate); }
.manifest-card .row .v { font-family: var(--font-display); font-size: 1.05rem; text-align: right; }

/* ---- Categories: cargo tags ---- */
.categories { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cat-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px -14px var(--shadow); border-color: var(--brass); }

.cat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  background: var(--brass);
  border-radius: 0 2px 2px 0;
}

.cat-card .code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 1.2px;
  color: var(--brass);
  display: block;
  margin-bottom: 12px;
}
.cat-card h3 { font-size: 1.05rem; margin-bottom: 8px; font-weight: 600; font-family: var(--font-body); }
.cat-card p { color: var(--slate); font-size: 0.93rem; }

/* ---- Why us: ledger list ---- */
.ledger {
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.ledger-row {
  display: grid;
  grid-template-columns: 90px 1fr 1.6fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.ledger-row .idx { font-family: var(--font-mono); color: var(--brass); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.ledger-row h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.08rem; }
.ledger-row p { color: var(--slate); font-size: 0.97rem; }

@media (max-width: 760px) {
  .ledger-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--stamp-bg);
  color: var(--stamp-text);
  text-align: center;
  border-top: 1px solid var(--stamp-line);
}
.cta-band .mono-tag { color: var(--stamp-brass); }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 14px 0 16px; color: var(--stamp-text); }
.cta-band p { color: var(--stamp-text-muted); max-width: 540px; margin: 0 auto 32px; }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.contact-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
}
.contact-card h3 { font-family: var(--font-body); color: var(--ink); margin-bottom: 20px; font-size: 1.1rem; font-weight: 600; }

.contact-row {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.contact-row .label { font-family: var(--font-mono); font-weight: 600; color: var(--brass); min-width: 96px; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; padding-top: 3px; }
.contact-row .value { color: var(--ink); font-size: 0.98rem; }
.contact-row .value a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--brass); }
.contact-row .value a:hover { color: var(--brass-strong); }

.contact-card p.note { color: var(--slate); font-size: 0.97rem; }

/* ---- Footer ---- */
footer {
  background: var(--stamp-bg);
  color: var(--stamp-text-muted);
  padding: 34px 28px;
  text-align: center;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}
footer a { color: var(--stamp-brass); text-decoration: none; }

/* ---- Back to top ---- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--stamp-bg);
  color: var(--stamp-text);
  border: 1px solid var(--stamp-line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 90;
  font-size: 1.1rem;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--stamp-brass); color: #1a1204; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  nav { position: fixed; top: 0; right: -100%; height: 100vh; width: min(78vw, 320px); background: var(--paper-raised); border-left: 1px solid var(--line); transition: right 0.3s ease; padding: 100px 32px 32px; }
  nav.is-open { right: 0; box-shadow: -20px 0 40px var(--shadow); }
  nav ul { flex-direction: column; gap: 26px; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  section { padding: 76px 22px; }
  .hero { padding: 150px 22px 90px; }
}
