/* ============================================================
   Morton Enterprises NRV - Main Stylesheet
   ============================================================ */

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

:root {
  --color-brand:       #1c6e4a;
  --color-brand-dark:  #0e3324;
  --color-accent:      #e8842c;
  --color-river:       #2a8fa0;
  --color-text:        #1a1a2e;
  --color-text-muted:  #5a5a72;
  --color-bg:          #ffffff;
  --color-bg-subtle:   #f4f8f6;
  --color-border:      #d9e4de;
  --font-sans:         'Inter', system-ui, -apple-system, sans-serif;
  --max-width:         1100px;
  --radius:            8px;
  --shadow:            0 2px 12px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1rem;
}

/* --- Site notice ------------------------------------------ */
.site-notice {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  background: var(--color-brand-dark);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(-100%);
  transition: transform 220ms ease;
}

.site-notice.is-visible {
  transform: translateY(0);
}

.site-notice-inner {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-notice-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.site-notice-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .site-notice {
    transition: none;
  }
}

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

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

a {
  color: var(--color-brand);
  text-decoration: underline;
}
a:hover { color: var(--color-brand-dark); }

/* --- Layout helpers --------------------------------------- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* --- Header ----------------------------------------------- */
.site-header {
  background: var(--color-brand-dark);
  color: #fff;
  padding: 0.4rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: none;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo:hover,
.logo:focus-visible {
  color: #fff;
}

.logo-image {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.site-nav .nav-contact {
  background: var(--color-accent);
  color: #fff;
  margin-left: 0.35rem;
}

.site-nav .nav-contact:hover,
.site-nav .nav-contact[aria-current="page"] {
  background: #d9701d;
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav nav {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 10rem;
  padding: 0.5rem;
  background: var(--color-brand-dark);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mobile-nav ul {
  list-style: none;
}

.mobile-nav a {
  display: block;
  color: #fff;
  padding: 0.55rem 0.7rem;
  text-decoration: none;
}

.mobile-nav a:hover {
  background: rgba(255,255,255,.12);
}

/* --- Hero ------------------------------------------------- */
.hero {
  background-color: var(--color-brand-dark);
  background-image: linear-gradient(rgba(14, 51, 36, .4), rgba(14, 51, 36, .4)), url('/images/blueridgeimpressionsd-cropped.png');
  background-size: 100% 100%;
  background-position: center;
  color: #fff;
  padding: 2.75rem 0 2.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: .85;
  max-width: 600px;
  margin-inline: auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.18); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
  margin-left: 0.75rem;
}

/* --- Sections --------------------------------------------- */
.section {
  padding: 4rem 0;
}

.section-alt { background: var(--color-bg-subtle); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-brand-dark);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--color-text-muted);
  max-width: 560px;
  margin-inline: auto;
}

/* --- Cards ------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,.1); }

.card-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-brand-dark);
  margin-bottom: 0.5rem;
}

.card p { color: var(--color-text-muted); font-size: 0.95rem; }

/* --- Homepage split sections ----------------------------- */
.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 7vw, 5rem);
  align-items: start;
}

.split-header {
  position: sticky;
  top: 7rem;
}

.split-header h2 {
  color: var(--color-brand-dark);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.split-header p {
  color: var(--color-text-muted);
}

.split-content {
  min-width: 0;
}

.service-list,
.principle-list {
  display: grid;
  gap: 0;
}

.service-row,
.principle-row {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.service-row:last-child,
.principle-row:last-child {
  border-bottom: 1px solid var(--color-border);
}

.service-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
}

.service-row-icon {
  color: var(--color-accent);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  padding-top: 0.1rem;
}

.service-row h3,
.principle-row h3 {
  color: var(--color-brand-dark);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.service-row p,
.principle-row p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

.split-content.prose p {
  margin-bottom: 1rem;
}

.split-content.prose p:last-child {
  margin-bottom: 0;
}

/* --- CTA banner ------------------------------------------ */
.cta-banner {
  background: var(--color-brand);
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.25rem;
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.cta-banner p {
  opacity: .85;
  margin-bottom: 1.75rem;
}

/* --- Page hero (inner pages) ----------------------------- */
.page-hero {
  background: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
  padding: 3rem 0 2.5rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--color-brand-dark);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 560px;
}

/* --- Prose content --------------------------------------- */
.prose { max-width: 720px; }
.prose h2 { color: var(--color-brand-dark); margin: 2rem 0 0.75rem; font-size: 1.5rem; }
.prose p  { margin-bottom: 1rem; color: var(--color-text-muted); }
.prose ul { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--color-text-muted); }
.prose li { margin-bottom: 0.4rem; }

/* --- Contact form ---------------------------------------- */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(28,110,74,.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* --- Footer ----------------------------------------------- */
.site-footer {
  background: var(--color-brand-dark);
  color: rgba(255,255,255,.7);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer .footer-location {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  opacity: .6;
}

.site-footer .footer-build {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  opacity: .55;
}

.site-footer .footer-build a {
  color: inherit;
}

/* --- 404 -------------------------------------------------- */
.error-page {
  text-align: center;
  padding: 6rem 1.25rem;
}
.error-page h1 { font-size: 5rem; color: var(--color-brand); font-weight: 700; }
.error-page p  { color: var(--color-text-muted); margin: 1rem 0 2rem; font-size: 1.1rem; }

/* --- Blog & Projects --------------------------------------- */
.tag-list {
  margin-bottom: 2rem;
}
.tag-list h3 {
  font-size: 1rem;
  color: var(--color-brand-dark);
  margin-bottom: 0.75rem;
}
.tag-link {
  display: inline-block;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-brand-dark);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin: 0 0.4rem 0.4rem 0;
  font-size: 0.85rem;
  text-decoration: none;
}
.tag-link:hover { background: var(--color-brand); color: #fff; }

.coming-soon {
  text-align: center;
  padding: 4rem 1.25rem;
  color: var(--color-text-muted);
}
.coming-soon h2 {
  color: var(--color-brand-dark);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.entry-list {
  list-style: none;
  display: grid;
  gap: 1.5rem;
}
.entry-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}
.entry-card-title { font-size: 1.2rem; margin-bottom: 0.35rem; }
.entry-card-title a { text-decoration: none; color: var(--color-brand-dark); }
.entry-card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.entry-card-summary { color: var(--color-text-muted); margin-bottom: 0.5rem; }
.entry-card-tags { margin-top: 0.5rem; }

.entry-meta .dates { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.entry-meta .summary { font-size: 1.05rem; color: var(--color-text-muted); margin-bottom: 1rem; }

.status-badge {
  display: inline-block;
  background: var(--color-river);
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-badge.status-completed { background: var(--color-brand); }
.status-badge.status-in-progress { background: var(--color-accent); }

/* --- Responsive ------------------------------------------- */
@media (max-width: 640px) {
  .site-nav { display: none; }
  .mobile-nav { display: block; }
  .hero { padding: 2.25rem 0 2rem; }
}

@media (max-width: 760px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .split-header {
    position: static;
  }
}
