/* victormacias.com relaunch: shared styles for homepage and post template */

:root {
  --ink: #14171A;
  --ink-soft: #2B3036;
  --muted: #454B52;
  --line: #E3E5E8;
  --wash: #F3F4F6;
  --paper: #FFFFFF;
  --accent: #1D3FCF;
  --accent-hover: #1631A3;
  --on-dark-muted: #B6BCC4;
  --on-dark-body: #D5D9DE;
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1120px;
  --measure: 720px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus { top: 16px; color: var(--paper); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  padding: 10px 0;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
}
.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 10px 0;
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  padding: 15px 26px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--accent-hover); color: var(--paper); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--wash); color: var(--ink); }
.btn-small { font-size: 16px; padding: 11px 18px; }

/* Hero */
.hero .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 80px;
}
.hero-copy {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-role { margin: 0; font-weight: 600; font-size: 16px; color: var(--accent); }
.hero h1 {
  font-weight: 700;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero-lede { margin: 0; font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero-photo {
  flex: 1 1 320px;
  min-width: 0;
  aspect-ratio: 4 / 5;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--wash);
}

/* Proof strip */
.proof { background: var(--ink); color: var(--paper); }
.proof .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 36px;
  padding-top: 32px;
  padding-bottom: 32px;
}
.proof-label { margin: 0; font-size: 15px; color: var(--on-dark-muted); }
.proof a {
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  padding: 10px 0;
}
.proof a:hover { color: var(--on-dark-body); text-decoration: underline; }

/* Sections */
.section .wrap { padding-top: 96px; padding-bottom: 96px; }
.section-alt { background: var(--wash); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 40px;
}
.section-head h2 { font-weight: 700; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; }
.section-head p { margin: 12px 0 0; color: var(--muted); max-width: 560px; }

/* Story: a real sequence, so the numbers carry meaning */
.story {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.story li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.story-num { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--accent); }
.story h3 { font-weight: 600; font-size: 24px; line-height: 1.2; }
.story p { margin: 0; color: var(--muted); }
.story a { font-weight: 600; padding: 10px 0; margin-top: auto; align-self: flex-start; }
.story .story-now { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.story .story-now .story-num { color: var(--on-dark-muted); }
.story .story-now p { color: var(--on-dark-body); }

/* Writing grid */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.post-card {
  text-decoration: none;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-card:hover { color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.post-kind { font-size: 14px; font-weight: 600; color: var(--muted); }
.post-title { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.25; }

/* Signup */
.signup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}
.signup-copy { flex: 1 1 400px; min-width: 0; }
.signup-copy h2 { font-weight: 700; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; }
.signup-copy p { margin: 12px 0 0; color: var(--muted); max-width: 480px; }
.signup-form { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.signup-form label { font-weight: 600; font-size: 15px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 12px; }
.signup-row input {
  flex: 1 1 240px;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  font: inherit;
  color: var(--ink);
  border: 1.5px solid #6B7280;
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.signup-row .btn { height: 52px; }
.signup-hidden { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 15px;
  color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer a { padding: 10px 0; color: var(--muted); }

/* Post template */
.article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 72px 32px 48px;
  font-size: 18px;
  line-height: 1.7;
}
.article-kind { margin: 0 0 16px; font-weight: 600; font-size: 15px; color: var(--accent); }
.article h1 { font-weight: 700; font-size: clamp(34px, 5vw, 46px); line-height: 1.1; letter-spacing: -0.02em; }
.article-meta { margin: 16px 0 0; font-size: 15px; color: var(--muted); }
.summary {
  margin: 32px 0;
  background: var(--wash);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.summary h2 { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--muted); }
.summary p { margin: 8px 0 0; }
.article figure { margin: 0 0 32px; }
.article figure img { border-radius: var(--radius); width: 100%; }
.article figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.article-body h2 { font-weight: 600; font-size: 30px; line-height: 1.2; margin: 40px 0 12px; }
.article-body p, .article-body ul { color: var(--ink-soft); }
.update {
  margin-top: 40px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 36px;
}
.update-date { margin: 0; font-size: 15px; color: var(--on-dark-muted); }
.update h2 { margin: 8px 0 12px; font-weight: 600; font-size: 30px; line-height: 1.2; }
.update p { color: var(--on-dark-body); }
.update .btn { margin-top: 8px; }

.after-post {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 32px 72px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.author {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--wash); }
.author-text { flex: 1 1 320px; min-width: 0; font-size: 16px; line-height: 1.5; }
.author-text p { margin: 0 0 4px; }
.author-name { font-weight: 600; }
.author-text .author-bio { color: var(--muted); }
.author-text a { display: inline-block; font-weight: 600; padding: 10px 0; }
.signup-box { background: var(--wash); border-radius: var(--radius); padding: 32px; }
.signup-box h2 { font-weight: 600; font-size: 26px; line-height: 1.2; }
.signup-box > p { margin: 6px 0 16px; font-size: 16px; color: var(--muted); }
.related h2 { font-weight: 600; font-size: 22px; margin-bottom: 16px; }
.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.related a {
  display: block;
  height: 100%;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
}
.related a:hover { border-color: var(--accent); }

@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .section .wrap { padding-top: 64px; padding-bottom: 64px; }
  .article { padding: 48px 20px 32px; }
  .after-post { padding: 0 20px 56px; }
  .update { padding: 28px 24px; }
  .story li, .post-card, .signup-box { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
