/* LOUDSPARKS — palette & typography continuous with the 2012 site (master.css).
   Single stylesheet, no framework, no build step. */

:root {
  --text: #574747;
  --text-soft: #a1a3a8;
  --bg: #ffffff;
  --bg-soft: #faf7f6;
  --bg-dark: #372727;
  --link: #b1a3a8;
  --link-hover: #977070;
  --accent: #e95533;
  --border: #f1e6e3;
  --rule: #ede4e1;
  --max: 960px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font: 15px/1.7 Georgia, "Libre Baskerville", "Times New Roman", serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: stack header / main / footer vertically and let main grow. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }
.site-header, .site-footer { flex-shrink: 0; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus { color: var(--link-hover); }

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

p { margin: 0 0 1.1em; }

em, i { font-family: "Libre Baskerville", Georgia, serif; }

/* ---------- Headings ---------- */
h1, h2, h3, h4 { color: var(--bg-dark); font-weight: 400; margin: 0; }

h1.brand {
  font: 600 12px/1 Helvetica, Arial, sans-serif;
  letter-spacing: .28em;
  text-transform: uppercase;
}
h1.brand a { color: var(--bg-dark); }

.hero h2,
.section-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-style: italic;
  font-size: 28px;
  line-height: 1.35;
  color: var(--bg-dark);
  margin: 0 0 .8em;
}

h2.page-title {
  font-family: "Julius Sans One", Helvetica, sans-serif;
  font-size: 28px;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 1em;
}

h3 {
  font-family: "Julius Sans One", Helvetica, sans-serif;
  font-size: 14px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 .4em;
}

h4 {
  font: 600 11px/1 Helvetica, Arial, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 2em 0 .6em;
}

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

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
  margin-bottom: 48px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav { font: 600 11px/1 Helvetica, Arial, sans-serif; letter-spacing: .22em; text-transform: uppercase; }
.site-nav a { margin-left: 22px; color: var(--text); }
.site-nav a:hover { color: var(--accent); }
.site-nav a:first-child { margin-left: 0; }

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 72px;
  padding: 32px 0 40px;
  font: 11px/1.6 Helvetica, Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}
.hero p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
}

/* ---------- Work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0 0 64px;
}
@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; }
}

.work-card { display: block; color: var(--text); }
.work-card .thumb {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.work-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.work-card:hover .thumb img { transform: scale(1.03); }
.work-card h3 { margin: 14px 0 6px; color: var(--bg-dark); }
.work-card p { font-size: 13px; color: var(--text-soft); margin: 0; }

/* Smaller archive row */
.archive-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0 0 48px;
}
@media (max-width: 720px) {
  .archive-row { grid-template-columns: repeat(2, 1fr); }
}
.archive-row a {
  display: block;
  color: var(--text-soft);
  font: 10px/1.4 Helvetica, Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.archive-row a:hover { color: var(--accent); }
.archive-row .thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 10px;
}
.archive-row .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */
.section { margin: 64px 0; }
.section .lede {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: center;
  font-size: 16px;
}
.section.center { text-align: center; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 64px auto;
  max-width: 120px;
}

/* ---------- Case-study pages ---------- */
/* Container matches homepage width (960px). Prose blocks inside are
   constrained for readable line length so wide containers don't produce
   uncomfortably long body text. */
.case .container { max-width: var(--max); }

.case h2.page-title,
.case h3.page-title,
.case h4,
.case p,
.case ul.bullets,
.case .visit,
.case .meta,
.case .tag-row,
.case .lede {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.case .hero-img {
  margin: 0 0 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.case .hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* bycoach screenshots are 4:3 product UI shots — show them in full
   (no cropping) inside whatever wrapper aspect ratio they sit in. The wrapper
   background fills any letterbox space. */
.case img[src*="/bycoach/"] {
  object-fit: contain;
  background: var(--bg-soft);
}

/* bycoach hero: image has a near-black background, so the letterbox columns
   should be black too — reads as one continuous frame. Scoped to the hero
   only (tiles fill cleanly without letterbox). */
.case .hero-img:has(img[src*="/bycoach/hero.jpg"]),
.case .hero-img:has(img[src*="/bycoach/hero.jpg"]) img {
  background: #000;
  border-color: #000;
}

/* ---------- Click-to-zoom ---------- */
.case .hero-img img,
.case .image-row img { cursor: zoom-in; }

.image-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity .22s ease;
  cursor: zoom-out;
  padding: 24px;
}
.image-zoom-overlay.visible { opacity: 1; }
.image-zoom-overlay img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
  background: transparent;
}

/* Placeholder for missing bycoach screenshots */
.case .placeholder {
  background: linear-gradient(135deg, #f4ecea 0%, #e8e9ea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font: 11px/1 Helvetica, Arial, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.case .placeholder.tall { aspect-ratio: 16 / 9; }
.case .placeholder.square { aspect-ratio: 4 / 3; }

.case .meta {
  display: flex;
  gap: 32px;
  font: 11px/1.4 Helvetica, Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 32px;
  flex-wrap: wrap;
}
.case .meta strong { color: var(--bg-dark); display: block; font-weight: 600; }

.case ul.bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6em;
}
.case ul.bullets li {
  padding: 6px 0 6px 18px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  font-size: 14px;
}
.case ul.bullets li:before {
  content: "";
  position: absolute; left: 0; top: 14px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.case .visit {
  margin: 32px 0;
  padding: 16px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font: 12px/1.4 Helvetica, Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.case .image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
@media (max-width: 600px) { .case .image-row { grid-template-columns: 1fr; } }
.case .image-row > * {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.case .image-row img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contact form ---------- */
.form {
  max-width: 520px;
  margin: 24px 0;
}
.form label {
  display: block;
  font: 600 11px/1 Helvetica, Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 16px 0 6px;
}
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font: 14px/1.5 Georgia, serif;
  color: var(--text);
  border-radius: 0;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--link-hover);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form button {
  margin-top: 20px;
  background: var(--bg-dark);
  color: #fff;
  border: 0;
  padding: 12px 28px;
  font: 600 11px/1 Helvetica, Arial, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease;
}
.form button:hover { background: var(--accent); }
.form-msg { margin: 16px 0; padding: 12px 16px; font-size: 13px; }
.form-msg.ok { background: #eef5ec; color: #2c5e2c; border: 1px solid #cfe3cb; }
.form-msg.err { background: #fbecea; color: #8a2b1f; border: 1px solid #f0cdc7; }

.contact-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
  font-size: 14px;
}
@media (max-width: 720px) { .contact-blocks { grid-template-columns: 1fr; } }
.contact-blocks h4 { margin-top: 0; }
.contact-blocks a { color: var(--accent); }

/* ---------- Misc ---------- */
.logo-wordmark {
  font: 600 16px/1 Helvetica, Arial, sans-serif;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--bg-dark);
}
.logo-wordmark a { color: inherit; }
.logo-wordmark .sub {
  display: block;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--text-soft);
  margin-top: 4px;
}

.vcard { font-size: 13px; color: var(--text-soft); margin-top: 32px; }
.vcard p { margin: 4px 0; }

.tag-row {
  font: 11px/1 Helvetica, Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 16px;
}
