/* ============================================
   Lawrence Hitches - Static Site
   Typography-first, minimal, fast
   ============================================ */

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

:root {
  --nav-bg: #1a1a2e;
  --green: #1fbf75;
  --green-hover: #17a564;
  --purple: #6c5ce7;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg: #fff;
  --bg-light: #f8f9fa;
  --border: #e9ecef;
  --max-width: 1200px;
  --content-width: 740px;
  --font: -apple-system, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-heading: -apple-system, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; color: var(--text); }
h1 { font-size: 2.5rem; margin-bottom: 1rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; margin: 2.5rem 0 1rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1.25rem; }

a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-hover); }

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

ul, ol { margin: 0 0 1.25rem 1.5rem; }
li { margin-bottom: 0.4rem; }

blockquote {
  border-left: 4px solid var(--green);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-light);
  color: var(--text-light);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  background: var(--bg-light);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

pre {
  background: var(--nav-bg);
  color: #e0e0e0;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.5;
}
pre code { background: none; padding: 0; color: inherit; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th { font-weight: 600; background: var(--bg-light); position: sticky; top: 0; }
td { white-space: normal; }

hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

img { max-width: 100%; height: auto; border-radius: 8px; }

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

/* --- Skip to content (a11y) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--green);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  z-index: 200;
}
.skip-link:focus { top: 0.5rem; }

/* --- Navigation --- */
.nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 1.5rem;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav-logo {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-logo:hover { color: #fff; }

.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

.nav-cta {
  background: var(--green) !important;
  color: #fff !important;
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--green-hover) !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: 0.3s; }

/* --- Hero --- */
.hero {
  background: var(--nav-bg);
  color: #fff;
  padding: 5rem 1.5rem 4rem;
}
.hero-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-content { max-width: 700px; }
.hero-image img {
  width: 100%;
  max-width: 450px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.hero h1 {
  font-size: 3rem;
  line-height: 1.12;
  margin-bottom: 1.5rem;
  color: #fff;
  letter-spacing: -0.03em;
}
.hero h1 em {
  color: var(--green);
  font-style: normal;
}
.hero-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
}
.hero-sub a { color: var(--green); }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn-outline:hover { border-color: #fff; color: #fff; }

/* --- Logos --- */
.logos-section {
  background: var(--bg);
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.logos-label {
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.logos-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logos-grid img {
  max-width: 110px;
  max-height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.45;
  transition: opacity 0.3s;
}
.logos-grid img:hover { opacity: 0.85; }

/* --- Scrolling Logo Carousel --- */
.logo-marquee {
  overflow: hidden;
  padding: 0;
  position: relative;
}
.logo-marquee::before,
.logo-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
}
.logo-marquee::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.logo-marquee::after { right: 0; background: linear-gradient(to left, var(--bg), transparent); }

.logo-track {
  display: flex;
  gap: 3rem;
  animation: scroll-logos 30s linear infinite;
  width: max-content;
}
.logo-track img {
  max-width: 120px;
  height: 32px;
  object-fit: contain;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.3s;
  filter: grayscale(1);
}
.logo-track img:hover {
  opacity: 1;
  filter: grayscale(0);
}

@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Sections --- */
.section { padding: 4rem 1.5rem; }
.section-dark { background: var(--nav-bg); color: #fff; }
.section-dark h2 { color: #fff; margin-top: 0; }
.section-dark p { color: rgba(255,255,255,0.7); }

/* --- Services grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.service-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  color: var(--text);
}
.service-card h3 { font-size: 1.05rem; margin: 0 0 0.5rem; color: var(--text); }
.service-card p { font-size: 0.9rem; color: var(--text-light); margin: 0; line-height: 1.5; }

/* --- Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.25rem;
}

/* --- Awards --- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.award-card {
  background: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-align: center;
}
.award-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(31, 191, 117, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  margin-bottom: 0.5rem;
}
.award-card h3 { font-size: 0.95rem; margin: 0.5rem 0 0.25rem; }
.award-card p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

@media (max-width: 768px) {
  .awards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .awards-grid { grid-template-columns: 1fr; }
}

/* --- Media Cards (editorial card style) --- */
.media-card {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 2rem;
  align-items: start;
  padding: 2rem;
  background: var(--bg-light);
  border-radius: 12px;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s;
}
.media-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.media-card-content { flex: 1; }
.media-card-image img {
  width: 220px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.media-pub {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  display: block;
  margin-bottom: 0.5rem;
}
.media-card h3 { font-size: 1.15rem; margin: 0 0 0.6rem; line-height: 1.4; }
.media-card h3 a { color: var(--text); }
.media-card h3 a:hover { color: var(--green); }
.media-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.75rem; line-height: 1.6; }
.media-link { font-size: 0.85rem; font-weight: 500; }
.media-topics { font-size: 0.8rem; color: var(--green); margin-bottom: 0.5rem; }

@media (max-width: 768px) {
  .media-card { grid-template-columns: 1fr; padding: 1.5rem; }
  .media-card-image { order: -1; }
  .media-card-image img { width: 100%; height: 180px; }
}

/* --- Article (single post) --- */
.article-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.article-category {
  background: var(--bg-light);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 500;
  text-decoration: none;
}
.article-category:hover { background: var(--green); color: #fff; }

.article-content { padding-bottom: 2rem; }
.article-content h2 { padding-top: 1rem; border-top: 1px solid var(--border); }
.article-content h2:first-of-type { border-top: none; padding-top: 0; }

/* Author bio */
.author-bio {
  background: var(--bg-light);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  border-left: 4px solid var(--purple);
  margin: 2.5rem 0;
}
.author-bio strong { display: block; margin-bottom: 0.5rem; }

/* FAQ styling */
.article-content h2 + h3 { margin-top: 1rem; }

/* --- Article Grid (listings) --- */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.category-pill {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  background: var(--bg-light);
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--border);
}
.category-pill:hover, .category-pill.active {
  background: var(--nav-bg);
  color: #fff;
  border-color: var(--nav-bg);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.article-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.article-card:hover {
  border-color: var(--green);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  color: var(--text);
}
.article-card h3 { font-size: 1.05rem; margin: 0.5rem 0; line-height: 1.4; }
.article-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.25rem; }
.card-category { font-size: 0.7rem; color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.card-date { font-size: 0.8rem; color: var(--text-muted); }
.card-readtime { font-size: 0.8rem; color: var(--text-muted); margin-top: auto; }

/* --- Topic Pages (hub/pillar) --- */
.topic-summary { font-size: 1.05rem; line-height: 1.8; margin-bottom: 2rem; }
.topic-takeaways {
  background: var(--bg-light);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}
.topic-takeaways h2 { margin-top: 0; font-size: 1.2rem; }
.topic-takeaways li { margin-bottom: 0.6rem; line-height: 1.5; }

.topic-article-list { display: flex; flex-direction: column; gap: 0; }
.topic-article-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, padding 0.15s;
}
.topic-article-item:first-child { border-top: 1px solid var(--border); }
.topic-article-item:hover { background: var(--bg-light); padding-left: 0.75rem; padding-right: 0.75rem; border-radius: 6px; }
.topic-article-item h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.topic-article-item p { font-size: 0.875rem; color: var(--text-light); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topic-article-item .card-readtime { white-space: nowrap; margin-left: 1.5rem; margin-top: 0.2rem; }

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

/* --- Footer --- */
.footer {
  background: var(--nav-bg);
  color: rgba(255,255,255,0.65);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
.footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer p { font-size: 0.875rem; line-height: 1.6; margin-bottom: 0.5rem; }
.footer a { color: rgba(255,255,255,0.65); }
.footer a:hover { color: var(--green); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.4rem; font-size: 0.875rem; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  text-align: center;
  color: rgba(255,255,255,0.4);
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 0;
}
.testimonial-card .stars {
  color: #f5a623;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}
.testimonial-card p {
  font-style: italic;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.95rem;
}
.testimonial-card footer {
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-image { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }
  .nav-links.active { display: flex; }
  .nav-toggle { display: block; }

  .hero { padding: 3rem 1.5rem 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }

  .services-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 1rem; }
  .stat-number { font-size: 2rem; }

  .logos-grid { gap: 1.5rem; }
  .logos-grid img { max-width: 80px; max-height: 28px; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }

  .article-header { padding: 2.5rem 0 1.5rem; }
  .article-grid { grid-template-columns: 1fr; }

  table { font-size: 0.8rem; }
  th, td { padding: 0.5rem 0.75rem; }

  .topic-article-item { flex-direction: column; }
  .topic-article-item .card-readtime { margin-left: 0; margin-top: 0.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .container { padding: 0 1rem; }
  .section { padding: 3rem 1rem; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .category-filter { gap: 0.35rem; }
  .category-pill { font-size: 0.75rem; padding: 0.3rem 0.75rem; }
}

/* --- Print --- */
@media print {
  .nav, .footer, .hero-cta, .nav-toggle { display: none; }
  .hero { background: #fff; color: #000; padding: 1rem 0; }
  .hero h1 { color: #000; }
  body { font-size: 12pt; line-height: 1.5; }
  a { color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
