/* National Roofing Alliance — editorial roofing resource.
   Deliberately distinct from davidgembala.com (dark/executive):
   warm paper, serif display, terracotta accent, magazine layout. */

:root {
  --paper: #f7f4ee;
  --card: #fffdf8;
  --ink: #211f1b;
  --muted: #6b6760;
  --accent: #8a3b2e;
  --accent-soft: #b5654f;
  --rule: #e4ded2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, 92vw); margin: 0 auto; }
.narrow { width: min(720px, 92vw); margin: 0 auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.head-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding: 1.5rem 0; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 1.6rem; font-size: 0.95rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--accent); text-decoration: none; }

/* Eyebrow */
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; font-weight: 600; color: var(--accent); }

/* Hero (home) */
.hero { padding: 4.5rem 0 4rem; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); margin: 0.9rem 0 1.2rem; max-width: 15ch; }
.hero .standfirst { font-size: 1.2rem; color: var(--muted); max-width: 48ch; margin: 0 0 1.5rem; line-height: 1.62; }
.hero-cta { font-weight: 600; font-size: 1rem; }
.hero-byline { margin: 1.5rem 0 0; font-size: 0.92rem; color: var(--muted); }
.hero-figure { margin: 0; }
.hero-figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 5px; border: 1px solid var(--rule); box-shadow: 0 18px 44px -26px rgba(33, 31, 27, 0.5); display: block; }
.hero-figure figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.7rem; font-style: italic; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } .hero-figure { order: -1; } }

/* Feature cards (home guides) */
.feature-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2.2rem; }
.feature-card { background: var(--card); border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.feature-card:hover { border-color: var(--accent-soft); transform: translateY(-2px); box-shadow: 0 18px 36px -28px rgba(33, 31, 27, 0.55); }
.feature-card > a { display: block; }
.feature-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-bottom: 1px solid var(--rule); }
.feature-card .body { padding: 1.5rem 1.6rem 1.7rem; }
.feature-card .kicker { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); font-weight: 600; }
.feature-card h3 { font-size: 1.5rem; margin: 0.5rem 0 0.6rem; }
.feature-card h3 a { color: var(--ink); }
.feature-card p { color: var(--muted); font-size: 0.98rem; margin: 0 0 1rem; }
.feature-card .more { font-weight: 600; font-size: 0.92rem; }

/* Editorial feature */
.editorial-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 3rem; align-items: center; margin-top: 1.6rem; }
.editorial-grid figure { margin: 0; }
.editorial-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; border: 1px solid var(--rule); display: block; box-shadow: 0 16px 38px -28px rgba(33, 31, 27, 0.5); }
.editorial-body p { font-size: 1.1rem; color: var(--ink); line-height: 1.72; margin: 0 0 1.1rem; }
.editorial-body p.intro::first-letter { float: left; font-family: var(--serif); font-size: 3.4rem; line-height: 0.78; padding: 0.32rem 0.5rem 0 0; color: var(--accent); font-weight: 600; }
.pullquote { font-family: var(--serif); font-size: 1.45rem; font-style: italic; color: var(--ink); border-left: 3px solid var(--accent); padding-left: 1.1rem; margin: 1.5rem 0 0; line-height: 1.4; }
@media (max-width: 820px) { .editorial-grid { grid-template-columns: 1fr; gap: 2rem; } .editorial-grid figure { order: -1; } }

/* Publisher strip */
.publisher { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; align-items: center; }
.publisher p { color: var(--muted); max-width: 62ch; margin: 0.4rem 0 0; }
.publisher .links { display: flex; flex-direction: column; gap: 0.5rem; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.byline-card { display: flex; align-items: center; gap: 1rem; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 5px; padding: 1rem 1.2rem 1rem 1rem; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.byline-card:hover { border-color: var(--accent-soft); box-shadow: 0 14px 30px -26px rgba(33, 31, 27, 0.5); text-decoration: none; }
.byline-card img { width: 84px; height: 104px; object-fit: cover; object-position: 50% 14%; border-radius: 4px; border: 1px solid var(--rule); flex: none; display: block; }
.byline-text { display: flex; flex-direction: column; gap: 0.14rem; line-height: 1.25; }
.byline-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); font-weight: 600; }
.byline-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.byline-role { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 680px) { .publisher { grid-template-columns: 1fr; gap: 1.2rem; } }

/* Page-load reveal (hero) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); animation: reveal 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
  .reveal-1 { animation-delay: 0.05s; }
  .reveal-2 { animation-delay: 0.15s; }
  .reveal-3 { animation-delay: 0.25s; }
  .reveal-4 { animation-delay: 0.35s; }
}
@keyframes reveal { to { opacity: 1; transform: none; } }

/* Sections */
.section { padding: 4rem 0; border-bottom: 1px solid var(--rule); }
.section h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 0.4rem 0 1.5rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

/* Cards / guide grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 1.8rem; transition: border-color .15s ease; }
.card:hover { border-color: var(--accent-soft); }
.card h3 { font-size: 1.4rem; margin: 0.6rem 0 0.7rem; }
.card h3 a { color: var(--ink); }
.card p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.card .kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); font-weight: 600; }

/* Article */
.article { padding: 3.5rem 0 4.5rem; }
.article .eyebrow { display: block; margin-bottom: 0.8rem; }
.article h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); margin: 0 0 1rem; max-width: 22ch; }
.article .standfirst { font-size: 1.25rem; color: var(--muted); margin: 0 0 2.5rem; line-height: 1.6; }
.article h2 { font-size: 1.7rem; margin: 2.6rem 0 0.9rem; }
.article h3 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
.article p { margin: 0 0 1.2rem; }
.article ul, .article ol { margin: 0 0 1.4rem; padding-left: 1.3rem; }
.article li { margin: 0.4rem 0; }
.article figure { margin: 2.5rem 0; }
.article img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--rule); display: block; }
.article figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.7rem; }
.callout { background: var(--card); border-left: 3px solid var(--accent); padding: 1.2rem 1.4rem; margin: 2rem 0; border-radius: 0 4px 4px 0; }
.callout p { margin: 0; font-size: 0.98rem; }

/* Profile */
.profile { padding: 4rem 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.profile .portrait { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--rule); }
.profile .portrait-col { margin: 0; }
.profile figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.7rem; line-height: 1.5; }
.profile h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0.6rem 0 1rem; }
.profile .role { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.5rem; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } .profile .portrait-col { order: -1; } }

/* Image gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--rule); display: block; }
.gallery figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; line-height: 1.5; }

/* Footer */
.site-foot { background: #16140f; color: #cfc9bc; padding: 3rem 0; margin-top: 0; }
.site-foot a { color: #d9b6a8; }
.foot-brand { font-family: var(--serif); font-size: 1.2rem; color: #f1ece1; margin: 0 0 0.4rem; }
.foot-note { margin: 0 0 1rem; max-width: 54ch; color: #b3ada0; font-size: 0.95rem; }
.foot-meta { font-size: 0.85rem; color: #8a857a; margin: 0; }

/* Breadcrumb */
.crumb { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; padding-top: 2rem; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }
