/* ============================================
   Jonathan Howe — Portfolio
   Palette + type pulled directly from the source
   deck's theme (Lora/Lato, sage-slate scheme)
   ============================================ */

:root {
  --forest: #24322A;
  --terracotta: #BF7B54;
  --sage: #7A9B7E;
  --pale-sage: #DCE6D6;
  --slate: #565B5E;
  --white: #FFFFFF;
  --cream: #FAF9F6;
  --max-width: 1120px;
  --gap: 1.5rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--forest);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

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

img { max-width: 100%; display: block; border-radius: 6px; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }
@media (max-width: 640px) { section { padding: 3rem 0; } }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 0.6em;
  display: block;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--pale-sage);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.site-nav .brand {
  font-family: 'Lora', serif;
  font-weight: 600;
  color: var(--forest);
  font-size: 1.05rem;
}
.site-nav .brand:hover { text-decoration: none; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
}
.site-nav a { color: var(--forest); font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--terracotta); text-decoration: none; }

/* ---------- Confetti motif ---------- */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti span {
  position: absolute;
  display: block;
  border-radius: 4px;
  opacity: 0.55;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--forest);
  color: var(--white);
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
}
.hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 640px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .headshot { margin: 0 auto; }
}
.hero .headshot {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
}
.hero h1 { color: var(--white); margin-bottom: 0.15em; }
.hero .role { color: var(--pale-sage); font-size: 1.15rem; margin-bottom: 1rem; }
.hero .lede { color: rgba(255,255,255,0.85); max-width: 46ch; }
.hero .links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.2rem; }
@media (max-width: 640px) { .hero .links { justify-content: center; } }
.hero .links a {
  color: var(--white);
  border-bottom: 1px solid var(--terracotta);
  padding-bottom: 2px;
}

/* ---------- Focus strip ---------- */
.focus-strip { background: var(--pale-sage); }
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: left;
}
@media (max-width: 780px) { .focus-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.focus-grid h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate); margin-bottom: 0.6em; }
.focus-grid ul { margin: 0; padding-left: 1.1em; }
.focus-grid li { margin-bottom: 0.3em; }

/* ---------- Case study teaser cards ---------- */
.cs-teasers { background: var(--white); }
.cs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
@media (max-width: 780px) { .cs-grid { grid-template-columns: 1fr; } }
.cs-card {
  display: block;
  background: var(--forest);
  color: var(--white);
  border-radius: 10px;
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.cs-card:hover { text-decoration: none; transform: translateY(-3px); }
.cs-card .eyebrow { color: var(--terracotta); }
.cs-card h3 { color: var(--white); margin-bottom: 0.4em; }
.cs-card p { color: rgba(255,255,255,0.8); margin-bottom: 0; }
.cs-card .arrow { color: var(--terracotta); font-weight: 700; margin-top: 1rem; display: inline-block; }

/* ---------- Work sections ---------- */
.company-block { border-top: 1px solid var(--pale-sage); padding: 4rem 0; }
.company-block:first-of-type { border-top: none; }
.company-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2.2rem;
}
.company-head h2 { margin-bottom: 0; }
.company-head .title { color: var(--slate); font-size: 1.05rem; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
@media (max-width: 780px) { .project-grid { grid-template-columns: 1fr; } }
.project-card {
  border: 1px solid var(--pale-sage);
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
}
.project-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--pale-sage); }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.project-card .body { padding: 1.4rem 1.5rem 1.6rem; }
.project-card h3 { margin-bottom: 0.5em; }
.project-card ul { margin: 0.6em 0 0; padding-left: 1.1em; }
.project-card li { margin-bottom: 0.3em; }
.project-card .cs-link { display: inline-block; margin-top: 0.9em; font-weight: 700; }

/* full-bleed image row inside a company block */
.image-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.5rem;
}
@media (max-width: 780px) { .image-row { grid-template-columns: 1fr 1fr; } }
.image-row img { width: 100%; height: 220px; object-fit: cover; }

/* ---------- Learnings callout ---------- */
.learnings {
  background: var(--terracotta);
  color: var(--white);
  border-radius: 10px;
  padding: 1.8rem 2rem;
  margin-top: 2rem;
}
.learnings .eyebrow { color: var(--forest); }
.learnings p { margin-bottom: 0.5em; color: var(--white); }
.learnings p:last-child { margin-bottom: 0; }

/* ---------- About / contact ---------- */
.about-section { background: var(--forest); color: var(--white); position: relative; overflow: hidden; }
.about-section .wrap { position: relative; z-index: 2; }
.about-section h2 { color: var(--white); }
.about-section p { color: rgba(255,255,255,0.85); max-width: 60ch; }
.contact-links { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem; }
.contact-links a { color: var(--white); font-weight: 700; border-bottom: 1px solid var(--terracotta); padding-bottom: 2px; }

footer.site-footer {
  background: var(--forest);
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  padding: 1.5rem 0 2.2rem;
  text-align: center;
}
footer.site-footer a { color: rgba(255,255,255,0.75); }

/* ============================================
   Case study page
   ============================================ */
.cs-hero {
  background: var(--forest);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 4rem 0 3.5rem;
}
.cs-hero .wrap { position: relative; z-index: 2; }
.cs-hero .back-link { color: var(--pale-sage); font-size: 0.9rem; font-weight: 600; }
.cs-hero h1 { color: var(--white); margin-top: 1rem; }
.cs-hero .subtitle { color: rgba(255,255,255,0.8); max-width: 60ch; font-size: 1.1rem; }
.cs-hero .meta { display: flex; gap: 2rem; margin-top: 1.5rem; flex-wrap: wrap; }
.cs-hero .meta div { font-size: 0.85rem; color: var(--pale-sage); text-transform: uppercase; letter-spacing: 0.05em; }
.cs-hero .meta strong { display: block; color: var(--white); font-size: 1rem; text-transform: none; letter-spacing: 0; margin-top: 0.2em; font-family: 'Lora', serif; }

.hero-shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: -3rem;
  position: relative;
  z-index: 3;
}
@media (max-width: 640px) { .hero-shots { grid-template-columns: 1fr; margin-top: 2rem; } }
.hero-shots img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
@media (max-width: 640px) { .hero-shots img { height: 220px; } }

.cs-section { padding: 3.5rem 0; border-top: 1px solid var(--pale-sage); }
.cs-section:first-of-type { border-top: none; }
.cs-section .two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 780px) { .cs-section .two-col { grid-template-columns: 1fr; } }
.cs-section ul { padding-left: 1.2em; }
.cs-section li { margin-bottom: 0.5em; }

.question-callout {
  font-family: 'Lora', serif;
  font-size: 1.35rem;
  color: var(--forest);
  background: var(--pale-sage);
  border-radius: 10px;
  padding: 1.6rem 1.8rem;
  margin: 1.5rem 0 0;
}

.challenge-list { display: flex; flex-direction: column; gap: 1.6rem; }
.challenge {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.2rem;
  align-items: start;
}
.challenge .num {
  font-family: 'Lora', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--terracotta);
}
.challenge h3 { margin-bottom: 0.4em; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 640px) { .metrics-grid { grid-template-columns: 1fr; } }
.metric-card {
  background: var(--cream);
  border: 1px solid var(--pale-sage);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
}

.result-block { background: var(--forest); color: var(--white); border-radius: 12px; padding: 2.5rem; }
.result-block h2 { color: var(--white); }
.result-block p { color: rgba(255,255,255,0.85); }
.result-block .lesson {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--white);
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 640px) { .detail-gallery { grid-template-columns: 1fr 1fr; } }
.detail-gallery img { width: 100%; height: 260px; object-fit: cover; }

.cs-nav-footer {
  padding: 3rem 0 4rem;
  text-align: center;
}
.cs-nav-footer a { font-weight: 700; }
