/* morgancollins.net — shared styles.
   Palette and type scale lifted from the live coachava theme so the rebuild
   matches the WordPress original rather than approximating it. */

:root {
  --base:      #f7f3ed;   /* cream page background */
  --contrast:  #2e2e2e;   /* body text, footer */
  --primary:   #46b1e3;   /* header bar, hero, CTA band */
  --secondary: #1e44b3;
  --tertiary:  #fab22d;   /* buttons, pills, icon circles */
  --white:     #fff;
  --rule:      rgba(46,46,46,0.15);
  --muted:     rgba(46,46,46,0.72);

  --font: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;

  --fs-body:  clamp(1.125rem, 1.125rem + ((1vw - 0.2rem) * 0.167), 1.225rem);
  --fs-h1:    clamp(2.75rem, 2.75rem + ((1vw - 0.2rem) * 2.5), 5.5rem);
  --fs-h2:    clamp(2rem, 2rem + ((1vw - 0.2rem) * 0.625), 3rem);
  --fs-small:  0.8rem;
  --fs-medium: clamp(0.8125rem, 0.813rem + ((1vw - 0.2rem) * 0.228), 0.95rem);

  --wrap: 1200px;
  --pad:  clamp(1.25rem, 4vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }

body {
  background: var(--base);
  color: var(--contrast);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 { letter-spacing: -0.05rem; line-height: 1.05; font-weight: 400; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.1rem; line-height: 1; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--contrast);
  color: var(--white); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- header */

.site-header { background: var(--primary); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 1.1rem; flex-wrap: wrap;
}
.brand {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; line-height: 1.25; max-width: 22ch;
}
.site-nav a {
  font-size: 0.95rem; font-weight: 700; text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus-visible { text-decoration: underline; }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-block; background: var(--tertiary); color: var(--contrast);
  font: inherit; font-size: 0.9rem; font-weight: 700; text-decoration: none;
  padding: 0.72rem 1.35rem; border: 0; border-radius: 3px; cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--contrast); outline-offset: 2px; }

.pill {
  display: inline-block; background: var(--tertiary); color: var(--contrast);
  font-size: 0.8rem; font-weight: 700; padding: 0.32rem 0.72rem; border-radius: 3px;
}

.eyebrow {
  font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- hero */

.hero { background: var(--primary); }
.hero .wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.hero h1 { margin-bottom: 1.1rem; }
.hero .roles { font-size: 1.05rem; margin-bottom: 1.1rem; }
.hero .bio { font-size: 1rem; max-width: 46ch; margin-bottom: 1.8rem; }
.hero-figure img { width: 100%; }

/* ------------------------------------------------------------- about */

.about { padding-block: clamp(3rem, 7vw, 5rem); }
.about .cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about .pill { margin-bottom: 1.5rem; }
.about p + p { margin-top: 1.1rem; }
.about .rule { border: 0; border-top: 1px solid var(--rule); margin-top: 2.5rem; }

/* ---------------------------------------------------------- services */

.services { padding-bottom: clamp(3rem, 7vw, 5rem); }
.services .grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem);
}
.service .icon {
  width: 62px; height: 62px; border-radius: 50%; background: var(--tertiary);
  display: grid; place-items: center; margin-bottom: 1.1rem;
}
.service .icon img { width: 30px; height: 30px; }
.service h3 { margin-bottom: 0.6rem; }
.service p { font-size: 0.95rem; }

/* -------------------------------------------------------------- blog */

.blog-teaser { padding-bottom: clamp(3rem, 7vw, 5rem); }
.blog-teaser .head {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start; margin-bottom: 2rem;
}
/* Newest three posts: thumbnail cards, three to a row. Thumbnails are
   cropped to a square so the row lines up whatever the source aspect ratio;
   a post without an image gets a blank square so the titles still align. */
.blog-teaser .cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.post-card { display: block; text-decoration: none; min-width: 0; }
.post-card img, .post-card .thumb-blank {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  margin-bottom: 0.9rem;
}
.post-card .thumb-blank { background: var(--rule); }
.post-card .title { display: block; font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.post-card .date { display: block; font-size: var(--fs-small); font-weight: 700; margin-top: 0.35rem; }
.post-card:hover .title { text-decoration: underline; }
/* Older posts: titles only, one per line. */
.post-list { list-style: none; margin-top: 2.25rem; border-top: 1px solid var(--rule); }
.post-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--rule);
}
.post-list a { font-size: 1.05rem; font-weight: 700; text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list .date { font-size: var(--fs-small); font-weight: 700; white-space: nowrap; }
/* Footer column with no CTA button (homepage): close the gap the button left. */
.site-footer .no-cta .socials { margin-top: 1.1rem; }

/* --------------------------------------------------------------- CTA */

.cta { background: var(--primary); }
.cta .wrap { padding-block: clamp(3rem, 7vw, 5rem); }
.cta h2 { margin-bottom: 0.9rem; }
.cta p { margin-bottom: 1.6rem; }

/* ------------------------------------------------------------ footer */

.site-footer { background: var(--contrast); color: var(--base); }
.site-footer .wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.site-footer .eyebrow, .site-footer .brandline { color: var(--primary); }
.site-footer .eyebrow { display: block; margin-bottom: 1.1rem; }
.site-footer .brandline {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 1.1rem;
}
.site-footer .tagline { color: var(--primary); font-size: 1.35rem; line-height: 1.3; }
.site-footer .legal { font-size: var(--fs-medium); color: var(--primary); margin-top: 2.5rem; }
.socials { display: flex; gap: 1.1rem; margin-top: 2.5rem; }
.socials a { color: var(--primary); display: inline-flex; }
.socials a:hover { color: var(--white); }
.socials svg { width: 24px; height: 24px; fill: currentColor; display: block; }

/* --------------------------------------------------------- article */

.article { padding-block: clamp(2.5rem, 6vw, 4rem); }
.article .cols {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 6vw, 5rem); align-items: start;
}
.article .pill { margin-bottom: 1.5rem; }
.article h1 { margin-bottom: 1.6rem; }
.article .date { font-size: var(--fs-small); font-weight: 700; margin-bottom: 2.2rem; }
.prose { max-width: 68ch; }
.prose h3 { margin: 2rem 0 0.9rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul { margin: 0 0 1.1rem 1.35rem; }
.prose li { margin-bottom: 0.35rem; }
.author img { width: 110px; height: 110px; margin-bottom: 1.4rem; }
.author p { font-size: 1rem; margin-bottom: 1.2rem; }
.author a { font-size: 0.95rem; font-weight: 700; }

/* ------------------------------------------------------------- form */

.contact { padding-block: clamp(2.5rem, 6vw, 4rem); }
.contact h1 { margin-bottom: 2rem; }
.contact .cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-figure { background: rgba(255,255,255,0.45); padding: clamp(1.5rem, 4vw, 3rem); }
.contact .intro { margin-bottom: 1.8rem; }

.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: 0.92rem; font-weight: 700; margin-bottom: 0.4rem; }
.field .req { color: #d63638; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--contrast);
  background: var(--white); border: 1px solid transparent; border-radius: 2px;
  padding: 0.78rem 0.9rem;
}
.field textarea { min-height: 190px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a8a8a; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(70,177,227,0.35);
}
.field.has-error input, .field.has-error textarea { border-color: #d63638; }
.field .err { font-size: 0.85rem; color: #b32d2e; margin-top: 0.4rem; font-weight: 600; }
.counter { font-size: 0.85rem; text-align: right; margin-top: 0.35rem; color: var(--muted); }
.counter.over { color: #b32d2e; font-weight: 700; }

.notice { padding: 1.1rem 1.3rem; margin-bottom: 1.8rem; border-left: 4px solid; }
.notice.ok   { border-color: #2f8f4e; background: rgba(47,143,78,0.10); }
.notice.bad  { border-color: #d63638; background: rgba(214,54,56,0.09); }
.notice h2   { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.notice ul   { margin: 0.5rem 0 0 1.2rem; }
.notice p, .notice li { font-size: 1rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .services .grid { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .article .cols { grid-template-columns: 1fr; }
  .article .author { order: -1; }
}
@media (max-width: 780px) {
  .hero .wrap, .about .cols, .blog-teaser .head, .contact .cols,
  .site-footer .wrap { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .site-footer .legal, .socials { margin-top: 1.6rem; }
}
@media (max-width: 520px) {
  .services .grid { grid-template-columns: 1fr; }
  .blog-teaser .cards { grid-template-columns: 1fr; }
  .post-card img, .post-card .thumb-blank { max-width: 372px; }
  .post-list li { flex-direction: column; gap: 0.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
