/* ==========================================================================
   Cut & Stack PDF — "Darkroom Editorial" design system
   Deep charcoal darkroom palette, amber process-light accent, contact-sheet
   rule frames, dashed cut-line motifs, numbered stencil badges.
   ========================================================================== */

:root {
  --charcoal: #141210;
  --charcoal-raised: #1c1815;
  --charcoal-line: #2b2620;
  --amber: #e08d2f;
  --amber-dim: #b06f22;
  --bone: #e8e2d6;
  --bone-dim: #b8b0a0;
  --red-safety: #c1502e;

  --font-head: "Arial Black", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --radius: 3px;
  --max: 1180px;
  --shadow-hard: 4px 4px 0 0 rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--charcoal);
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--charcoal);
  background-image:
    radial-gradient(ellipse at top left, rgba(224, 141, 47, 0.06), transparent 45%),
    radial-gradient(ellipse at bottom right, rgba(224, 141, 47, 0.04), transparent 55%);
  color: var(--bone);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #f0a44a;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--bone);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

/* --------------------------------------------------------------------- */
/* Skip link                                                             */
/* --------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: var(--charcoal);
  padding: 10px 16px;
  z-index: 100;
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* --------------------------------------------------------------------- */
/* Header / nav                                                          */
/* --------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--charcoal-line);
  background: rgba(20, 18, 16, 0.92);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(140%) blur(6px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--bone);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover { color: var(--bone); }

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a:not(.btn) {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.main-nav a:not(.btn):hover,
.main-nav a:not(.btn):active {
  color: var(--amber);
}

.nav-hub-link {
  color: var(--amber) !important;
  position: relative;
  padding-bottom: 1px;
  border-bottom: 1px dashed var(--amber-dim);
}

.nav-hub-link:hover,
.nav-hub-link:active {
  color: #f0a44a !important;
  border-bottom-color: var(--amber);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--charcoal-line);
  color: var(--bone);
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.nav-toggle:hover {
  border-color: var(--amber-dim);
  color: var(--amber);
}

.nav-toggle:active {
  border-color: var(--amber);
}

/* --------------------------------------------------------------------- */
/* Buttons                                                                */
/* --------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.btn-primary {
  background: var(--amber);
  color: #201205;
  box-shadow: var(--shadow-hard);
}

.btn-primary:hover {
  color: #201205;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 0 rgba(0, 0, 0, 0.55);
}

.btn-primary:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 0 rgba(0, 0, 0, 0.55);
}

.btn-ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--charcoal-line);
}

.btn-ghost:hover {
  color: var(--amber);
  border-color: var(--amber-dim);
}

.btn-small {
  padding: 9px 16px;
  min-height: 44px;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------- */
/* Hero                                                                   */
/* --------------------------------------------------------------------- */

.hero {
  border-bottom: 1px dashed var(--charcoal-line);
  padding: 64px 0 56px;
  position: relative;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px dashed var(--amber-dim);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--bone-dim);
  max-width: 46ch;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.trust-line {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--bone-dim);
}

.hero-figure {
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--charcoal-raised);
  position: relative;
}

/* --------------------------------------------------------------------- */
/* Load reveal — staggered fade-up, hero only                            */
/* --------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    animation: revealUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .reveal-1 { animation-delay: 0.05s; }
  .reveal-2 { animation-delay: 0.16s; }
  .reveal-3 { animation-delay: 0.27s; }
  .reveal-4 { animation-delay: 0.38s; }
  .reveal-5 { animation-delay: 0.49s; }

  @keyframes revealUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.hero-figure::before {
  content: "CONTACT SHEET — 01";
  position: absolute;
  top: -11px;
  left: 16px;
  background: var(--charcoal);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--amber);
}

/* --------------------------------------------------------------------- */
/* Contact-sheet framed sections                                         */
/* --------------------------------------------------------------------- */

section {
  padding: 56px 0;
}

.section-head {
  margin-bottom: 34px;
  max-width: 62ch;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 10px;
}

.frame {
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--charcoal-raised);
}

.frame-dashed {
  border: 1px dashed var(--amber-dim);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(224, 141, 47, 0.04);
}

/* --------------------------------------------------------------------- */
/* Numbered stencil badges + steps                                       */
/* --------------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.step {
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  padding: 24px 20px;
  background: var(--charcoal-raised);
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.step:hover {
  border-color: var(--amber-dim);
  transform: translateY(-2px);
}

.stencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--amber);
  margin-bottom: 14px;
  background: repeating-linear-gradient(
    135deg,
    rgba(224, 141, 47, 0.08),
    rgba(224, 141, 47, 0.08) 4px,
    transparent 4px,
    transparent 8px
  );
}

.step-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}

.step h3 { margin-bottom: 8px; }
.step p { color: var(--bone-dim); font-size: 0.95rem; margin: 0; }

/* --------------------------------------------------------------------- */
/* Feature grid                                                          */
/* --------------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--charcoal-raised);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature:hover {
  border-color: var(--amber-dim);
  transform: translateY(-2px);
}

.feature h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
  color: var(--amber);
}

.feature p {
  color: var(--bone-dim);
  font-size: 0.94rem;
  margin: 0;
}

/* --------------------------------------------------------------------- */
/* Calculator                                                            */
/* --------------------------------------------------------------------- */

.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  position: relative;
}

.calc::before {
  content: "JOB TICKET — STACK CALC";
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--charcoal);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--amber);
}

.calc-form {
  display: grid;
  gap: 16px;
}

.calc-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 6px;
}

.calc-field input {
  width: 100%;
  min-height: 44px;
  background: var(--charcoal);
  border: 1px solid var(--charcoal-line);
  color: var(--bone);
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.calc-field input:hover {
  border-color: var(--amber-dim);
}

.calc-field input:focus-visible {
  border-color: var(--amber);
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(224, 141, 47, 0.15);
}

.calc-result {
  border: 1px dashed var(--amber-dim);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(224, 141, 47, 0.05);
  min-height: 100%;
}

.calc-result .result-line {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--bone);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--charcoal-line);
}

.calc-result .result-line:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.calc-result .result-value {
  color: var(--amber);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.calc-sentence {
  margin-top: 14px;
  font-size: 0.98rem;
  color: var(--bone-dim);
}

/* --------------------------------------------------------------------- */
/* FAQ                                                                    */
/* --------------------------------------------------------------------- */

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 78ch;
}

.faq-list details {
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  background: var(--charcoal-raised);
  padding: 4px 20px;
  transition: border-color 0.12s ease;
}

.faq-list details:hover {
  border-color: var(--amber-dim);
}

.faq-list details[open] {
  border-color: var(--amber-dim);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  list-style: none;
  position: relative;
  padding-right: 30px;
  font-family: var(--font-body);
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary:hover { color: var(--amber); }

.faq-list summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  transition: transform 0.18s ease;
}

.faq-list details[open] summary::after {
  content: "\2212";
}

.faq-list details p {
  color: var(--bone-dim);
  padding-bottom: 18px;
  margin: 0;
  animation: faqReveal 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes faqReveal {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* --------------------------------------------------------------------- */
/* Blog cards / listing                                                  */
/* --------------------------------------------------------------------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.blog-card {
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--charcoal-raised);
  text-decoration: none;
  display: block;
  color: var(--bone);
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.blog-card:hover {
  border-color: var(--amber-dim);
  color: var(--bone);
  transform: translateY(-2px);
  background: #201b16;
}

.blog-card:active {
  transform: translateY(0);
}

.blog-card .card-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 10px;
}

.blog-card h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.blog-card p {
  color: var(--bone-dim);
  font-size: 0.94rem;
  margin: 0;
}

/* --------------------------------------------------------------------- */
/* Article                                                                */
/* --------------------------------------------------------------------- */

.article-header {
  border-bottom: 1px dashed var(--charcoal-line);
  padding: 48px 0 32px;
}

.article-header .container { max-width: 820px; }

.byline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--bone-dim);
  margin-top: 6px;
}

article.post {
  padding: 44px 0 64px;
}

article.post .container {
  max-width: 820px;
}

.answer-block {
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: rgba(224, 141, 47, 0.06);
  margin-bottom: 34px;
  font-size: 1.05rem;
}

.answer-block .answer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

article.post h2 {
  margin-top: 2.2em;
  padding-top: 0.6em;
  border-top: 1px dashed var(--charcoal-line);
}

article.post h2:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }

article.post p { color: var(--bone); }

article.post figure {
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--charcoal-raised);
  margin: 24px 0;
}

article.post figcaption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--bone-dim);
  margin-top: 12px;
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.94rem;
}

.table-wrap table {
  border: none;
}

th, td {
  border: 1px solid var(--charcoal-line);
  padding: 12px 14px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

th {
  background: var(--charcoal-raised);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
  background: rgba(224, 141, 47, 0.06);
}

.article-cta {
  margin: 40px 0;
  padding: 26px;
  border: 1px dashed var(--amber-dim);
  border-radius: var(--radius);
  background: rgba(224, 141, 47, 0.05);
  text-align: center;
}

.article-cta p { color: var(--bone-dim); margin-bottom: 16px; }

.external-link-note {
  font-size: 0.85rem;
  color: var(--bone-dim);
}

/* --------------------------------------------------------------------- */
/* Footer                                                                 */
/* --------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--charcoal-line);
  padding: 44px 0 36px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 26px;
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.footer-grid a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-grid a:hover,
.footer-grid a:active { color: var(--amber); }

.footer-grid a:focus-visible { outline-offset: 2px; }

.footer-bottom {
  border-top: 1px dashed var(--charcoal-line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--bone-dim);
}

.footer-bottom a { color: var(--bone-dim); }
.footer-bottom a:hover { color: var(--amber); }

/* --------------------------------------------------------------------- */
/* 404                                                                    */
/* --------------------------------------------------------------------- */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
}

.error-page .frame {
  max-width: 560px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 3.4rem;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------- */
/* Utility                                                                */
/* --------------------------------------------------------------------- */

.cut-rule {
  border: none;
  border-top: 1px dashed var(--charcoal-line);
  margin: 44px 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------- */
/* Responsive                                                            */
/* --------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .steps,
  .feature-grid,
  .calc,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--charcoal);
    border-bottom: 1px solid var(--charcoal-line);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 24px;
    gap: 16px;
    display: none;
  }

  .main-nav.is-open { display: flex; }

  .nav-toggle { display: inline-flex; }

  .site-header .container { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
