/* Hallmark stamp: custom-corporate-editorial-textured | manual-audit: PASS
   Aesthetic: Swiss Aviation & Maritime Freight Editorial.
   Tactile archival paper grain, architectural drafting dot-grid, IATA air-waybill
   security hatch, corner registration marks, and crisp technical blueprint SVGs. */

:root {
  --bg-canvas: #f6f5f0;
  --bg-surface: #ffffff;
  --bg-subtle: #efede6;
  --bg-navy: #0b253a;
  --ink-primary: #111315;
  --ink-secondary: #4b5260;
  --ink-muted: #6e7480;
  --border-hairline: #dcdad1;
  --border-strong: #c8c5ba;
  --accent-corporate: #0f3d5e;
  --accent-corporate-hover: #0a2b43;
  --accent-brass: #8c6d3f;
  --status-ok-bg: #f0fdf4;
  --status-ok-ink: #166534;
  --status-warn-bg: #fefce8;
  --status-warn-ink: #854d0e;
  --font-sans: 'Inter', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html,
body {
  overflow-x: clip;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}

/* Subtle physical archival paper tooth across the viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperGrain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperGrain)'/%3E%3C/svg%3E");
}

html[dir="rtl"],
html[dir="rtl"] body {
  font-family: 'IBM Plex Sans Arabic', var(--font-sans);
}

.font-mono-tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Architectural drafting coordinate dot-grid for technical sections */
.bg-drafting-grid {
  background-color: #fbfaf7;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 61, 94, 0.14) 1px, transparent 0),
    linear-gradient(to right, rgba(220, 218, 209, 0.32) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(220, 218, 209, 0.32) 1px, transparent 1px);
  background-size: 24px 24px, 96px 96px, 96px 96px;
}

/* Warm stone textured section background */
.bg-stone-paper {
  background-color: var(--bg-canvas);
  background-image: radial-gradient(circle at 1px 1px, rgba(17, 19, 21, 0.065) 1px, transparent 0);
  background-size: 20px 20px;
}

/* IATA Air Waybill security guilloche diagonal hatch */
.bg-waybill-hatch {
  background-color: #f1efe8;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(15, 61, 94, 0.035),
    rgba(15, 61, 94, 0.035) 2px,
    transparent 2px,
    transparent 8px
  );
}

/* Tactile cardstock surface with subtle light-catch bevel */
.surface-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(17, 19, 21, 0.04),
    0 6px 16px rgba(17, 19, 21, 0.025);
}

/* Architectural corner registration ticks */
.corner-ticks {
  position: relative;
}
.corner-ticks::before,
.corner-ticks::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-color: var(--accent-corporate);
  opacity: 0.45;
}
.corner-ticks::before {
  top: -1px;
  left: -1px;
  border-top: 1.5px solid;
  border-left: 1.5px solid;
}
.corner-ticks::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1.5px solid;
  border-right: 1.5px solid;
}

/* Instant keyboard focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-corporate);
  outline-offset: 2px;
}

/* Clean summary disclosures */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

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

/* Header: keep menu labels on one line */
header nav a, header nav button { white-space: nowrap; }
header nav { column-gap: 0.8rem !important; }
header .h-16 > a { white-space: nowrap; }
@media (max-width: 1439px) { header .h-16 > a > span { display: none; } }
