/* NW Media - Corporate Site Styles */

:root {
  --bg: #ffffff;
  --bg-subtle: #fafaf9;
  --bg-muted: #f5f5f4;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-subtle: #78716c;
  --accent: #b91c1c;
  --accent-dark: #991b1b;
  --max-width: 1120px;
  --content-width: 760px;
  --radius: 4px;
  --radius-lg: 8px;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
}

.brand-name {
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 820px;
  margin-bottom: 24px;
}

.hero .lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--text);
  color: #ffffff;
}

.btn-primary:hover {
  background: #000;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn-link {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
}

.btn-link:hover {
  border-color: var(--text);
}

/* Sections */
section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 20px;
  max-width: 720px;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 680px;
}

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

.lead {
  font-size: 18px;
  color: var(--text-muted);
}

/* Grid */
.grid {
  display: grid;
  gap: 32px;
  margin-top: 40px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Cards */
.card {
  padding: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  font-size: 15px;
  margin-bottom: 0;
}

/* Capability list */
.capability {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  align-items: start;
}

.capability:last-child {
  border-bottom: 1px solid var(--border);
}

.capability-num {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 13px;
  color: var(--text-subtle);
  letter-spacing: 0.05em;
  padding-top: 2px;
}

.capability h3 {
  margin-bottom: 6px;
}

.capability p {
  font-size: 15px;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .capability {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Definition list (for API usage etc) */
dl.definitions {
  margin-top: 24px;
}

dl.definitions dt {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 6px;
}

dl.definitions dt:first-child {
  margin-top: 0;
}

dl.definitions dd {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 4px;
}

/* Tagged callout */
.callout {
  padding: 20px 22px;
  background: var(--bg-muted);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
}

.callout p {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 0;
}

.callout strong {
  color: var(--text);
}

/* Legal / long-form pages */
.legal-page {
  padding: 64px 0 96px;
}

.legal-page h1 {
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-page .updated {
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 40px;
  display: block;
}

.legal-page h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 12px;
  scroll-margin-top: 80px;
}

.legal-page h3 {
  font-size: 17px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-page p,
.legal-page li {
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.65;
}

.legal-page p {
  margin-bottom: 14px;
}

.legal-page ul,
.legal-page ol {
  margin: 8px 0 18px 22px;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page strong {
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 0;
}

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

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand {
  max-width: 340px;
}

.footer-brand p {
  font-size: 14px;
  margin-top: 12px;
  margin-bottom: 0;
}

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-subtle);
}

@media (max-width: 640px) {
  .footer-meta {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* Contact-specific */
.contact-block {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.contact-block:first-of-type {
  border-top: 1px solid var(--border);
}

.contact-label {
  font-size: 13px;
  color: var(--text-subtle);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}

.contact-value {
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.55;
}

.contact-value a {
  color: var(--accent);
  text-decoration: none;
}

.contact-value a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .contact-block {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Links in body */
a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

/* Skip to content for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: white;
  padding: 8px 12px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
