/* IrrigationPermitGuide — Main Stylesheet */
/* Aesthetic: Clean editorial authority with earthy blue-green water tones */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&family=DM+Mono:wght@400;500&display=swap');

:root {
  --brand:       #1a6b5a;
  --brand-dark:  #0f4a3d;
  --brand-light: #e8f4f1;
  --accent:      #d97706;
  --accent-light:#fef3c7;
  --text:        #1c2b27;
  --text-muted:  #4a6b61;
  --border:      #c9ddd9;
  --bg:          #f7fbfa;
  --white:       #ffffff;
  --warn:        #b45309;
  --warn-bg:     #fffbeb;
  --radius:      6px;
  --shadow:      0 2px 12px rgba(26,107,90,0.10);
  --shadow-lg:   0 8px 32px rgba(26,107,90,0.14);
  --max:         1140px;
  --font-serif:  'Source Serif 4', Georgia, serif;
  --font-display:'Playfair Display', Georgia, serif;
  --font-mono:   'DM Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

/* ── Typography ── */
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.2; color: var(--brand-dark); }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2rem 0 0.75rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin: 1.5rem 0 0.5rem; }
h4 { font-size: 1rem; font-family: var(--font-serif); font-weight: 600; margin: 1rem 0 0.4rem; }
p  { margin-bottom: 1.1rem; }
a  { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
ul,ol { padding-left: 1.6rem; margin-bottom: 1.1rem; }
li { margin-bottom: 0.35rem; }
strong { color: var(--brand-dark); font-weight: 600; }
code { font-family: var(--font-mono); font-size: 0.85em; background: var(--brand-light); padding: 2px 6px; border-radius: 3px; }

/* ── Layout ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.content-wrap { max-width: 820px; }

/* ── Header ── */
.site-header {
  background: var(--brand-dark);
  padding: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.5rem;
  max-width: var(--max); margin: 0 auto;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.site-logo .logo-icon { font-size: 1.4rem; }
.site-logo:hover { color: #a7d9cf; }

.site-nav { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.site-nav a {
  color: #b8ddd7; text-decoration: none;
  font-family: var(--font-serif); font-size: 0.88rem;
  padding: 0.4rem 0.75rem; border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover, .site-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 60%, #2a9d8f 100%);
  color: #fff;
  padding: 4rem 1.5rem 3.5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { max-width: var(--max); margin: 0 auto; position: relative; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
.hero .lead { font-size: 1.15rem; opacity: 0.9; max-width: 620px; margin-bottom: 2rem; font-weight: 300; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.75rem 1.75rem;
  border-radius: var(--radius); font-family: var(--font-serif);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  text-decoration: none; border: 2px solid transparent;
  transition: all 0.18s;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #b45309; border-color: #b45309; color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.88rem; }

/* ── Trust Bar ── */
.trust-bar { background: var(--brand-light); border-bottom: 1px solid var(--border); padding: 0.85rem 1.5rem; }
.trust-bar-inner { max-width: var(--max); margin: 0 auto; display: flex; gap: 2rem; flex-wrap: wrap; align-items: center; }
.trust-item { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.trust-item strong { color: var(--brand-dark); }

/* ── Main content ── */
.main-content { padding: 3rem 1.5rem; }
.main-content .container { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; }
@media (max-width: 900px) { .main-content .container { grid-template-columns: 1fr; } }

/* ── Sidebar ── */
.sidebar { }
.sidebar-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.sidebar-box h3 { font-size: 1rem; margin: 0 0 1rem; border-bottom: 2px solid var(--brand-light); padding-bottom: 0.5rem; }
.sidebar-box ul { list-style: none; padding: 0; }
.sidebar-box ul li { border-bottom: 1px solid var(--brand-light); }
.sidebar-box ul li a { display: block; padding: 0.45rem 0; font-size: 0.9rem; text-decoration: none; color: var(--text-muted); }
.sidebar-box ul li a:hover { color: var(--brand); }

/* ── State Grid ── */
.state-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem; margin: 1.5rem 0;
}
.state-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1rem;
  text-decoration: none; display: block;
  transition: all 0.15s; box-shadow: var(--shadow);
}
.state-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.state-card .state-name { font-family: var(--font-display); font-size: 0.95rem; color: var(--brand-dark); display: block; }
.state-card .state-status { font-size: 0.75rem; margin-top: 0.25rem; display: flex; align-items: center; gap: 0.3rem; }
.status-required { color: #b45309; }
.status-conditional { color: #1a6b5a; }
.status-none { color: #6b7280; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-required { background: #d97706; }
.dot-conditional { background: #1a6b5a; }
.dot-none { background: #9ca3af; }

/* ── Permit Status Badge ── */
.permit-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.9rem; border-radius: 20px;
  font-size: 0.85rem; font-weight: 600; font-family: var(--font-serif);
}
.badge-required { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-conditional { background: var(--brand-light); color: var(--brand-dark); border: 1px solid var(--border); }
.badge-none { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }

/* ── Info Boxes ── */
.info-box {
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin: 1.5rem 0; display: flex; gap: 1rem;
}
.info-box .info-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 0.1rem; }
.info-box.tip    { background: var(--brand-light); border-left: 4px solid var(--brand); }
.info-box.warn   { background: var(--warn-bg); border-left: 4px solid var(--accent); }
.info-box.alert  { background: #fef2f2; border-left: 4px solid #dc2626; }
.info-box p      { margin: 0; font-size: 0.95rem; }
.info-box strong { display: block; margin-bottom: 0.3rem; }

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.92rem; }
.data-table th {
  background: var(--brand-dark); color: #fff;
  padding: 0.75rem 1rem; text-align: left;
  font-family: var(--font-serif); font-weight: 600; font-size: 0.88rem;
}
.data-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
.data-table tr:nth-child(even) td { background: var(--brand-light); }
.data-table tr:hover td { background: #d4ede8; }
.data-table .tbl-yes  { color: #b45309; font-weight: 600; }
.data-table .tbl-no   { color: #6b7280; }
.data-table .tbl-cond { color: var(--brand); font-weight: 600; }

/* ── FAQ ── */
.faq-list { margin: 1.5rem 0; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: var(--white);
  border: none; cursor: pointer; padding: 1rem 1.25rem;
  font-family: var(--font-serif); font-size: 0.97rem; font-weight: 600;
  color: var(--brand-dark); display: flex; justify-content: space-between; align-items: center;
  transition: background 0.15s;
}
.faq-q:hover { background: var(--brand-light); }
.faq-q .faq-icon { font-size: 1.1rem; transition: transform 0.2s; flex-shrink: 0; }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 1.25rem 1rem; background: var(--white); font-size: 0.95rem; line-height: 1.7; }
.faq-a.open { display: block; }

/* ── Checklist Box ── */
.checklist { list-style: none; padding: 0; margin: 1rem 0; }
.checklist li { padding: 0.5rem 0 0.5rem 2rem; position: relative; border-bottom: 1px solid var(--brand-light); font-size: 0.95rem; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* ── Tool Section ── */
.tool-container {
  background: var(--white); border: 2px solid var(--brand);
  border-radius: var(--radius); padding: 2rem;
  margin: 2rem 0; box-shadow: var(--shadow-lg);
}
.tool-container h2 { margin-top: 0; }
.tool-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; min-width: 180px; }
.form-group label { font-size: 0.88rem; font-weight: 600; color: var(--brand-dark); }
.form-group select, .form-group input {
  padding: 0.65rem 0.9rem; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-serif);
  font-size: 0.95rem; color: var(--text); background: var(--bg);
  transition: border-color 0.15s;
}
.form-group select:focus, .form-group input:focus {
  outline: none; border-color: var(--brand); background: var(--white);
}
.tool-result {
  margin-top: 1.5rem; padding: 1.5rem; border-radius: var(--radius);
  background: var(--brand-light); border: 1px solid var(--border);
  display: none;
}
.tool-result.visible { display: block; }
.result-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--brand-dark); margin-bottom: 0.75rem; }
.result-items { list-style: none; padding: 0; }
.result-items li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; display: flex; gap: 0.5rem; }
.result-items li:last-child { border: none; }
.result-items .ri-label { font-weight: 600; min-width: 160px; color: var(--brand-dark); }

/* ── Breadcrumb ── */
.breadcrumb { padding: 0.75rem 1.5rem; background: var(--white); border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.breadcrumb-inner { max-width: var(--max); margin: 0 auto; }
.breadcrumb a { color: var(--brand); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-muted); margin: 0 0.4rem; }

/* ── Page Header (interior pages) ── */
.page-hero {
  background: var(--brand-dark);
  padding: 2.5rem 1.5rem;
  color: #fff;
}
.page-hero-inner { max-width: var(--max); margin: 0 auto; }
.page-hero h1 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 0.5rem; }
.page-hero .page-lead { opacity: 0.85; font-size: 1rem; max-width: 600px; font-weight: 300; }
.page-hero .permit-badge { margin-top: 1rem; }

/* ── State Detail ── */
.state-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.meta-value { font-size: 0.97rem; font-weight: 600; color: var(--brand-dark); }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p  { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 1rem; }
.card .card-link { font-size: 0.88rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.card .card-link:hover { text-decoration: underline; }

/* ── Footer ── */
.site-footer {
  background: var(--brand-dark); color: #b8ddd7;
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .site-logo { font-size: 1.1rem; margin-bottom: 0.75rem; display: inline-block; }
.footer-brand p { font-size: 0.85rem; opacity: 0.75; line-height: 1.6; }
.footer-col h4 { color: #fff; font-family: var(--font-serif); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.85rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a { color: #8fc9c0; text-decoration: none; font-size: 0.88rem; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; font-size: 0.8rem; opacity: 0.65; }
.disclaimer-bar {
  background: var(--warn-bg); border-top: 2px solid #fde68a;
  padding: 0.85rem 1.5rem; font-size: 0.82rem; color: #78350f; text-align: center;
}

/* ── Utility ── */
.section-label {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--brand); font-family: var(--font-mono); font-weight: 500;
  margin-bottom: 0.4rem; display: block;
}
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.88rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-nav { display: none; flex-direction: column; width: 100%; padding: 1rem; background: rgba(0,0,0,0.2); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-inner { flex-wrap: wrap; }
  .hero { padding: 2.5rem 1.5rem 2rem; }
  .main-content { padding: 2rem 1rem; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .data-table { font-size: 0.82rem; }
  .data-table th, .data-table td { padding: 0.55rem 0.65rem; }
  .tool-container { padding: 1.25rem; }
}

/* ── Print ── */
@media print {
  .site-header, .site-footer, .sidebar, .trust-bar, .hero-cta { display: none; }
  body { font-size: 12pt; }
  .main-content .container { grid-template-columns: 1fr; }
}
