/* ==========================================================================
   GetZips — Core Stylesheet
   Design concept: a postal sorting-facility / route-map console.
   Signature motif: the postmark ring (dashed circle + burst strokes) and
   stamp-perforation dividers, echoed from the logo throughout the UI.
   ========================================================================== */

:root {
  --ink: #17233d;         /* deep navy ink — primary text, dark surfaces */
  --ink-soft: #4a5568;    /* muted body text on paper */
  --paper: #edf0e7;       /* cool paper background (not warm cream) */
  --paper-raised: #f7f8f3;/* card surface, slightly lighter than paper */
  --line: #d7d5c3;        /* hairline / perforation color on paper */
  --line-dark: #2c3a5c;   /* hairline on ink surfaces */
  --postal-red: #c1392b;  /* primary accent — CTAs, postmark ink */
  --postal-red-dark: #9f2e22;
  --route-blue: #2b5d8c;  /* secondary accent — links, data highlights */
  --stamp-gold: #c99a3a;  /* tertiary accent — badges, highlights */
  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
}

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

/* ==========================================================================
   Perforation divider — mimics a stamp's torn edge between sections
   ========================================================================== */
.perf-divider {
  position: relative;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0, var(--line) 6px, transparent 6px, transparent 14px
  );
}
.perf-divider.on-ink {
  background: repeating-linear-gradient(
    to right,
    var(--line-dark) 0, var(--line-dark) 6px, transparent 6px, transparent 14px
  );
}

/* ==========================================================================
   Postmark badge — the recurring signature element.
   Used as section eyebrows, "verified" tags on result cards, etc.
   ========================================================================== */
.postmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px dashed currentColor;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.postmark::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header {
  background-color: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  color: #cbd3e4;
  transition: color 0.15s ease;
  position: relative;
}
.nav-link:hover { color: #ffffff; }
.nav-link.active { color: #ffffff; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--postal-red);
  border-radius: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background-color: var(--ink);
  background-image: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(43,93,140,0.35), transparent 60%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* faint coordinate-grid backdrop */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 40%, transparent 85%);
  pointer-events: none;
}

/* Live clock — split-flap / departure-board styling */
.clock-console {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 0.75rem;
}
.clock-digits {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.clock-colon { animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* Search console card */
.search-console {
  background: var(--paper-raised);
  border-radius: 1rem;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.04);
}
.search-console input[type="text"] {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Result cards (luggage-tag styling)
   ========================================================================== */
.result-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(23,35,61,0.28);
  border-color: var(--route-blue);
}
/* tag hole notch, top-left, luggage-tag feel */
.result-card::before {
  content: "";
  position: absolute;
  top: -1px; left: 18px;
  width: 14px; height: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 999px 999px;
}
.result-zip {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Skeleton loading shimmer */
.skeleton {
  background: linear-gradient(90deg, #e4e2d3 25%, #efeee1 37%, #e4e2d3 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ==========================================================================
   Numbered step markers — used ONLY for genuinely sequential content
   (the "How to use GetZips" steps)
   ========================================================================== */
.step-number {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--postal-red);
  line-height: 1;
}

/* ==========================================================================
   Data table (used on zip pages)
   ========================================================================== */
.data-table {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  width: 100%;
  border-collapse: collapse;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

/* Big ZIP display on single-zip pages */
.zip-hero-number {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.9;
}

/* Postmark ring behind the big zip number */
.zip-ring {
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: 999px;
}

/* Utility: dashed card for FAQ / accordion */
.accordion-item summary {
  cursor: pointer;
  list-style: none;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item[open] .accordion-chevron { transform: rotate(180deg); }

/* Focus visibility (accessibility floor) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--route-blue);
  outline-offset: 2px;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .clock-colon, .skeleton { animation: none !important; }
  .result-card { transition: none !important; }
}

/* Mobile nav panel */
#mobile-nav { transition: max-height 0.25s ease; }
