/*
Theme Name: North & Pine
Author: Barron Enterprises
Description: Editorial single-page WordPress theme built around a bento grid and an oversized kinetic wordmark. Forest palette, no external resources. Uses subgrid, container queries, aspect-ratio, clamp, and @scroll-timeline where supported.
Version: 1.0.0
Text Domain: north-pine
*/

:root {
  --np-forest: #1f2d22;
  --np-moss: #3a4c3d;
  --np-sage: #7a8b7c;
  --np-cream: #f5efe3;
  --np-paper: #faf6ec;
  --np-bone: #e8e0cb;
  --np-rust: #b85833;
  --np-rust-dark: #8a3f22;
  --np-ochre: #c99a4f;
  --np-ink: #15201a;
  --np-muted: #586357;
  --np-line: rgba(31, 45, 34, 0.14);

  --np-serif: "Iowan Old Style", "Hoefler Text", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --np-sans:  -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Inter, Arial, sans-serif;
  --np-mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--np-sans);
  color: var(--np-ink);
  background: var(--np-paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--np-serif);
  color: var(--np-forest);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 500; }

p { margin: 0 0 1em; max-width: 62ch; }
a { color: var(--np-rust); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
a:hover { color: var(--np-rust-dark); border-bottom-color: currentColor; }

.np-eyebrow {
  display: inline-block;
  font-family: var(--np-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--np-rust);
}

.np-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--np-forest);
  color: var(--np-paper) !important;
  padding: 15px 26px 14px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 0 !important;
  border-radius: 100px;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  cursor: pointer;
}
.np-cta:hover { background: var(--np-rust); color: var(--np-paper) !important; transform: translateY(-1px); }
.np-cta::after { content: "→"; transition: transform 0.2s; }
.np-cta:hover::after { transform: translateX(4px); }

.np-cta-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--np-forest) !important;
  padding: 14px 24px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  background: transparent;
  border: 1px solid var(--np-forest) !important;
  border-radius: 100px;
}
.np-cta-ghost:hover { background: var(--np-forest); color: var(--np-paper) !important; }

/* ================================================================
   HEADER — minimal floating pill
================================================================== */
.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: color-mix(in oklab, var(--np-paper) 82%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--np-line);
  border-radius: 100px;
  padding: 10px 14px 10px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(100% - 24px);
}
.site-header .brand {
  font-family: var(--np-serif);
  font-size: 1.1rem;
  color: var(--np-forest);
  border: 0;
  white-space: nowrap;
  font-weight: 500;
}
.site-header .brand .amp {
  color: var(--np-rust);
  font-style: italic;
  font-family: var(--np-serif);
  margin: 0 2px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-header nav a {
  color: var(--np-ink);
  font-size: 0.9rem;
  border: 0;
  font-weight: 500;
}
.site-header nav a:not(.np-cta-mini):hover { color: var(--np-rust); }
.site-header nav .np-cta-mini {
  background: var(--np-forest);
  color: var(--np-paper) !important;
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 0 !important;
}
.site-header nav .np-cta-mini:hover { background: var(--np-rust); }

@media (max-width: 700px) {
  .site-header nav a:not(.np-cta-mini) { display: none; }
}

/* ================================================================
   HERO — asymmetric editorial, oversized kinetic serif
================================================================== */
.np-hero {
  padding: 180px 40px 80px;
  background: var(--np-cream);
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 960px) {
  .np-hero { grid-template-columns: 1fr 1fr; gap: 64px; padding: 200px 60px 120px; }
}

.np-hero-lede {
  position: relative;
  z-index: 2;
  max-width: 46ch;
}
.np-hero-lede .np-eyebrow { margin-bottom: 24px; }
.np-hero-lede p {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--np-muted);
  max-width: 44ch;
  margin-top: 8px;
}
.np-hero-lede .actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.np-hero-wordmark {
  font-family: var(--np-serif);
  font-size: clamp(6rem, 18vw, 17rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--np-forest);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  text-align: right;
  font-weight: 400;
}
.np-hero-wordmark .line {
  display: block;
  overflow: visible;
}
.np-hero-wordmark .line .amp {
  font-style: italic;
  color: var(--np-rust);
  display: inline-block;
  transform: translateY(0.08em);
}
.np-hero-wordmark .line.offset {
  transform: translateX(-0.2em);
}

/* Decorative arc under the hero (pure CSS, no external SVG/image) */
.np-hero::before {
  content: "";
  position: absolute;
  bottom: -280px;
  right: -180px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--np-ochre) 30%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.np-hero-meta {
  position: absolute;
  left: 40px;
  bottom: 40px;
  font-family: var(--np-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--np-muted);
  text-transform: uppercase;
  display: flex;
  gap: 24px;
  z-index: 2;
}
.np-hero-meta span { display: flex; align-items: center; gap: 8px; }
.np-hero-meta span::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--np-rust);
}

/* ================================================================
   SECTION WRAPPER (shared)
================================================================== */
.np-section {
  padding: 120px 40px;
  position: relative;
}
.np-section.np-forest-bg { background: var(--np-forest); color: var(--np-cream); }
.np-section.np-forest-bg h2, .np-section.np-forest-bg h3 { color: var(--np-paper); }
.np-section.np-bone-bg { background: var(--np-bone); }
.np-section-header {
  max-width: 1280px;
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: end;
}
@media (min-width: 900px) {
  .np-section-header { grid-template-columns: 1fr 1fr; }
}
.np-section-header .np-eyebrow { margin-bottom: 12px; }
.np-section-header p { color: var(--np-muted); max-width: 48ch; }
.np-forest-bg .np-section-header p { color: color-mix(in oklab, var(--np-cream) 80%, transparent); }

/* ================================================================
   BENTO GRID — the centerpiece
================================================================== */
.np-bento {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 180px;
  gap: 16px;
}

.np-tile {
  position: relative;
  background: var(--np-paper);
  border: 1px solid var(--np-line);
  border-radius: 24px;
  padding: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
}
.np-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(31, 45, 34, 0.28);
}
.np-tile h3 {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  margin: 0 0 8px;
}
.np-tile p {
  color: var(--np-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Tile variants — 12-col grid positioning */
.np-tile.is-lead {
  grid-column: span 12;
  grid-row: span 2;
  background: var(--np-forest);
  color: var(--np-cream);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: space-between;
}
.np-tile.is-lead h2 {
  color: var(--np-paper);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  max-width: 22ch;
}
.np-tile.is-lead p {
  color: color-mix(in oklab, var(--np-cream) 84%, transparent);
  font-size: 1.05rem;
  max-width: 52ch;
}
.np-tile.is-lead .np-eyebrow { color: var(--np-ochre); margin-bottom: 16px; }

.np-tile.is-service { grid-column: span 4; grid-row: span 2; }
.np-tile.is-stat {
  grid-column: span 4;
  grid-row: span 2;
  background: var(--np-ochre);
  color: var(--np-forest);
  padding: 32px;
  align-items: flex-start;
}
.np-tile.is-stat h3 { color: var(--np-forest); }
.np-tile.is-stat .big-num {
  font-family: var(--np-serif);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 1;
  color: var(--np-forest);
  margin: 0;
  font-weight: 400;
}
.np-tile.is-stat .big-num .suffix {
  font-size: 0.4em;
  vertical-align: super;
  font-family: var(--np-mono);
  letter-spacing: 0.1em;
  color: var(--np-moss);
  margin-left: 4px;
}

.np-tile.is-clients {
  grid-column: span 8;
  grid-row: span 1;
  background: var(--np-bone);
}
.np-tile.is-clients ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 20px;
}
.np-tile.is-clients li {
  font-family: var(--np-serif);
  font-size: 1.1rem;
  color: var(--np-forest);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-tile.is-caption {
  grid-column: span 4;
  grid-row: span 1;
  background: var(--np-rust);
  color: var(--np-paper);
  padding: 28px;
  justify-content: flex-end;
}
.np-tile.is-caption p {
  color: var(--np-paper);
  font-family: var(--np-serif);
  font-size: 1.1rem;
  font-style: italic;
  max-width: none;
  margin: 0;
}

.np-tile .tile-index {
  font-family: var(--np-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--np-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}
.np-tile.is-lead .tile-index, .np-tile.is-stat .tile-index, .np-tile.is-caption .tile-index { color: inherit; opacity: 0.7; }

/* Responsive collapse: 12 → 6 → stacked */
@media (max-width: 1024px) {
  .np-bento { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 200px; }
  .np-tile.is-lead { grid-column: span 6; }
  .np-tile.is-service { grid-column: span 3; }
  .np-tile.is-stat { grid-column: span 3; }
  .np-tile.is-clients { grid-column: span 6; grid-row: span 2; }
  .np-tile.is-caption { grid-column: span 6; }
}
@media (max-width: 640px) {
  .np-bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .np-tile { grid-column: span 1 !important; grid-row: auto !important; min-height: 220px; }
  .np-hero-meta { position: static; margin-top: 40px; }
}

/* ================================================================
   TESTIMONIAL MARQUEE
================================================================== */
.np-marquee-wrap {
  overflow: hidden;
  padding: 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
.np-marquee {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: np-marquee 60s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .np-marquee { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}
.np-quote {
  flex-shrink: 0;
  width: clamp(320px, 36vw, 520px);
  padding: 36px;
  background: color-mix(in oklab, var(--np-paper) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--np-cream) 14%, transparent);
  border-radius: 20px;
}
.np-quote blockquote {
  margin: 0 0 20px;
  font-family: var(--np-serif);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--np-paper);
}
.np-quote cite {
  font-style: normal;
  font-family: var(--np-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--np-ochre);
}
@keyframes np-marquee {
  to { transform: translateX(calc(-50% - 12px)); }
}

/* ================================================================
   CONTACT — asymmetric split
================================================================== */
.np-contact {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 900px) {
  .np-contact { grid-template-columns: 1.15fr 1fr; gap: 80px; align-items: start; }
}
.np-contact-lede h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin-bottom: 16px;
}
.np-contact-lede h2 em {
  font-style: italic;
  color: var(--np-rust);
  font-weight: 400;
}
.np-contact-lede p {
  color: var(--np-muted);
  font-size: 1.1rem;
  max-width: 42ch;
}
.np-contact-meta {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  font-family: var(--np-mono);
  font-size: 0.82rem;
  color: var(--np-muted);
}
.np-contact-meta strong {
  display: block;
  color: var(--np-forest);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.np-form-card {
  background: var(--np-forest);
  color: var(--np-paper);
  padding: 48px;
  border-radius: 24px;
}
.np-form-card h3 {
  color: var(--np-paper);
  margin-bottom: 8px;
  font-size: 1.25rem;
}
.np-form-card .form-intro {
  color: color-mix(in oklab, var(--np-cream) 80%, transparent);
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.np-form-card .ff-default label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--np-ochre) !important;
  font-weight: 600;
  font-family: var(--np-mono);
}
.np-form-card .ff-default input,
.np-form-card .ff-default select,
.np-form-card .ff-default textarea {
  background: color-mix(in oklab, var(--np-paper) 6%, transparent) !important;
  border: 1px solid color-mix(in oklab, var(--np-cream) 20%, transparent) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  font-family: var(--np-sans) !important;
  font-size: 1rem !important;
  color: var(--np-paper) !important;
  width: 100% !important;
}
.np-form-card .ff-default input::placeholder,
.np-form-card .ff-default textarea::placeholder { color: color-mix(in oklab, var(--np-cream) 40%, transparent) !important; }
.np-form-card .ff-default input:focus,
.np-form-card .ff-default select:focus,
.np-form-card .ff-default textarea:focus {
  outline: 0 !important;
  border-color: var(--np-ochre) !important;
  background: color-mix(in oklab, var(--np-paper) 12%, transparent) !important;
}
.np-form-card .ff-default .ff-btn-submit {
  background: var(--np-rust) !important;
  color: var(--np-paper) !important;
  padding: 15px 32px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  border: 0 !important;
  border-radius: 100px !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  margin-top: 8px;
}
.np-form-card .ff-default .ff-btn-submit:hover { background: var(--np-ochre) !important; color: var(--np-forest) !important; }

/* ================================================================
   FOOTER
================================================================== */
.site-footer {
  background: var(--np-forest);
  color: var(--np-cream);
  padding: 64px 40px 40px;
  font-size: 0.92rem;
}
.np-foot {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 760px) {
  .np-foot { grid-template-columns: 2fr 1fr 1fr; align-items: end; }
}
.np-foot .brand-foot {
  font-family: var(--np-serif);
  font-size: 1.6rem;
  color: var(--np-paper);
}
.np-foot .brand-foot .amp { color: var(--np-ochre); font-style: italic; margin: 0 2px; }
.np-foot p { color: color-mix(in oklab, var(--np-cream) 78%, transparent); max-width: 36ch; margin-top: 8px; }
.np-foot h4 {
  font-family: var(--np-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--np-ochre);
  margin-bottom: 12px;
  font-weight: 600;
}
.np-foot ul { list-style: none; padding: 0; margin: 0; line-height: 2; }
.np-foot a { color: var(--np-cream); border: 0; }
.np-foot a:hover { color: var(--np-paper); }
.np-foot-legal {
  max-width: 1280px; margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid color-mix(in oklab, var(--np-cream) 14%, transparent);
  font-family: var(--np-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--np-cream) 50%, transparent);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
