/* ============================================
   PermitKY — styles.css
   Aesthetic: Refined utilitarian / civic authority
   Palette: Deep navy + warm amber + parchment
   Typography: Playfair Display (display) + Source Serif 4 (body)
   ============================================ */

/* ---- TOKENS ---- */
:root {
  --navy:       #0f1f3d;
  --navy-mid:   #1a3260;
  --navy-light: #2a4a8a;
  --amber:      #c8882a;
  --amber-light:#e6a84a;
  --parchment:  #f7f3ec;
  --cream:      #fdfaf5;
  --text:       #1a1a1a;
  --text-mid:   #3a3a3a;
  --text-muted: #6b6b6b;
  --border:     #d8d0c4;
  --border-dark:#b8a898;
  --success:    #1a6b3a;
  --warn:       #8a5a00;
  --error:      #8a1a1a;
  --shadow-sm:  0 1px 4px rgba(15,31,61,0.10);
  --shadow-md:  0 4px 16px rgba(15,31,61,0.14);
  --shadow-lg:  0 8px 32px rgba(15,31,61,0.18);
  --radius:     4px;
  --radius-lg:  8px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --max-width: 1140px;
  --section-pad: 72px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--navy-light);
  text-decoration: underline;
  text-decoration-color: var(--amber-light);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover { color: var(--amber); text-decoration-color: var(--amber); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }

strong { font-weight: 600; }
em { font-style: italic; }

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

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid var(--amber);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  background: var(--amber-light);
  border-color: var(--amber-light);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.55);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  letter-spacing: 0.02em;
}
.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.10);
  color: #fff;
  text-decoration: none;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--amber);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo { width: 32px; height: 32px; border-radius: 4px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}
.brand-name::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  margin-left: 3px;
  vertical-align: super;
}

.site-nav {
  display: flex;
  gap: 28px;
  flex: 1;
}
.site-nav a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--amber-light); }

.nav-cta { flex-shrink: 0; font-size: 0.88rem; padding: 8px 18px; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1e3a6e 100%);
  color: #fff;
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      rgba(255,255,255,0.025) 48px,
      rgba(255,255,255,0.025) 49px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 48px,
      rgba(255,255,255,0.025) 48px,
      rgba(255,255,255,0.025) 49px
    );
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-light);
  border: 1px solid rgba(200,136,42,0.45);
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 20px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 20px;
  max-width: 760px;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  max-width: 680px;
  margin-bottom: 32px;
  font-weight: 300;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 680px;
}

.fact {
  background: rgba(255,255,255,0.06);
  padding: 20px 16px;
  text-align: center;
}
.fact-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--amber-light);
  line-height: 1;
  margin-bottom: 6px;
}
.fact-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}

/* ---- HERO IMAGE BAND ---- */
.hero-image-band {
  background: var(--navy-mid);
  height: 260px;
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

/* ---- CALLOUT BAND ---- */
.callout-band {
  background: #fef9ef;
  border-top: 3px solid var(--amber);
  border-bottom: 1px solid #e8d8b8;
  padding: 20px 0;
}

.callout-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--navy);
}

.callout-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
  color: var(--amber);
}

/* ---- SECTIONS ---- */
.section {
  padding: var(--section-pad) 0;
}
.section--alt {
  background: var(--parchment);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 720px;
  margin-top: 12px;
  margin-bottom: 40px;
}

h2 + .section-intro { margin-top: 14px; }

/* ---- OFFICE CARDS ---- */
.office-card {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  background: #fff;
  transition: box-shadow 0.2s;
}
.office-card:hover { box-shadow: var(--shadow-md); }

.office-card-header {
  background: var(--navy);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.county-badge {
  background: var(--amber);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.county-badge--gold { background: #9a7a1e; }
.county-badge--slate { background: #3a5a8a; }

.office-card-title h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 2px;
}
.office-subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  font-style: italic;
}

.office-card-body { padding: 28px; }

.office-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
}

.detail-block { }
.detail-block--wide { grid-column: 1 / -1; }

.detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.detail-value {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}

.detail-value a { font-weight: 600; }

.fee-note {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

.office-card-footer {
  background: var(--parchment);
  border-top: 1px solid var(--border);
  padding: 14px 28px;
}

.office-link {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--navy-light);
}
.office-link:hover { color: var(--amber); }

/* ---- COUNTY GRID ---- */
.county-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.county-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.county-tile span {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.county-tile--soon {
  border-style: dashed;
  opacity: 0.72;
}

/* ---- STEPS LIST ---- */
.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 36px;
}

.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.step-num {
  width: 42px;
  height: 42px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.step-body { flex: 1; }
.step-body h3 { margin-bottom: 8px; font-size: 1.1rem; }

.step-note {
  background: #fff8e8;
  border-left: 3px solid var(--amber);
  padding: 10px 14px;
  font-size: 0.87rem;
  color: var(--text-mid);
  margin-top: 10px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.alt-method-box {
  background: #eef4ff;
  border: 1px solid #c0d4f0;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 8px;
}
.alt-method-box h3 { color: var(--navy); margin-bottom: 8px; font-size: 1.05rem; }

/* ---- FEE TABLE ---- */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 12px;
  background: #fff;
}

.fee-table th {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
}

.fee-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.fee-table tr:last-child td { border-bottom: none; }

.fee-table tr:nth-child(even) td { background: var(--parchment); }

.fee-table--full { font-size: 0.85rem; }

/* ---- TWO COLUMN ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.two-col h3 { margin-bottom: 12px; font-size: 1.1rem; }

/* ---- CALCULATOR ---- */
.calc-box {
  background: #fff;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 640px;
  box-shadow: var(--shadow-sm);
}

.calc-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.calc-row label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.calc-row input[type="date"] {
  padding: 10px 14px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  min-width: 180px;
  flex: 1;
}

.calc-result { margin-top: 24px; }

.calc-output {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-row-out {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.92rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.calc-row-out:last-child { border-bottom: none; }
.calc-row-out span { color: var(--text-muted); }
.calc-row-out strong { font-weight: 600; }

.status-ok     { color: var(--success); font-weight: 600; }
.status-warn   { color: var(--warn); font-weight: 600; }
.status-late   { color: #b05000; font-weight: 600; }
.status-expired { color: var(--error); font-weight: 600; }
.calc-error    { color: var(--error); font-size: 0.9rem; }

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.faq-item:last-child { border-bottom: none; }

.faq-item summary {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
  transition: background 0.15s;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--amber);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item summary:hover { background: var(--parchment); }
.faq-item[open] summary { background: var(--parchment); border-bottom: 1px solid var(--border); }

.faq-item p {
  padding: 16px 24px;
  font-size: 0.93rem;
  color: var(--text-mid);
  margin: 0;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.78);
  padding: 56px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .brand-name { color: #fff; font-size: 1.5rem; }
.footer-brand p {
  font-size: 0.85rem;
  margin-top: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}
.footer-verify {
  font-size: 0.78rem !important;
  color: rgba(255,255,255,0.45) !important;
  margin-top: 10px !important;
}

.footer-col h4 {
  color: rgba(255,255,255,0.45);
  font-size: 0.68rem;
  margin-bottom: 14px;
  letter-spacing: 0.12em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--amber-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 16px 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  :root { --section-pad: 52px; }

  .header-inner { gap: 16px; }
  .site-nav { display: none; }

  .hero { padding: 52px 0 44px; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); max-width: 400px; }

  .office-detail-grid { grid-template-columns: 1fr; }
  .detail-block--wide { grid-column: 1; }

  .two-col { grid-template-columns: 1fr; gap: 32px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --section-pad: 40px; }

  .container { padding: 0 16px; }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }

  .hero { padding: 40px 0 36px; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }

  .office-card-header { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px; }
  .office-card-body { padding: 20px 18px; }
  .office-card-footer { padding: 12px 18px; }

  .step { flex-direction: column; gap: 12px; }
  .step-num { width: 34px; height: 34px; font-size: 0.95rem; }

  .hero-ctas { flex-direction: column; align-items: flex-start; }

  .calc-row { flex-direction: column; align-items: stretch; }
  .calc-row input[type="date"] { width: 100%; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }

  .fee-table { font-size: 0.78rem; }
  .fee-table th, .fee-table td { padding: 8px 10px; }
  .fee-table--full th:nth-child(3),
  .fee-table--full td:nth-child(3),
  .fee-table--full th:nth-child(4),
  .fee-table--full td:nth-child(4) { display: none; }

  .hero-image-band { height: 160px; }
}

/* ---- PRINT ---- */
@media print {
  .site-header, .hero-image-band, .site-footer, .btn-primary, .btn-ghost, .nav-cta { display: none; }
  .section, .section--alt { padding: 24px 0; break-inside: avoid; }
  .office-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}
