/* Earldrych personal site. Brand: white canvas, charcoal ink, periwinkle CTAs only.
   Structure and spacing discipline adapted from the Stripe design system;
   colors, type, and buttons follow brand/brand-guidelines.svg. */

:root {
  --ink: #1A1A1A;
  --ink-2: #3A3D4A;
  --mute: #6B6B78;
  --line: #E4E4EA;
  --peri: #8A8FD0;
  --peri-deep: #6F74BD;
  --peri-ink: #2D2F66;
  --bg: #FFFFFF;
  --bg-soft: #F7F7FA;
  --radius-btn: 10px;
  --radius-card: 14px;
  --max: 1080px;
  --pad: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--pad);
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 42px; height: auto; flex-shrink: 0; }

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--peri); color: var(--ink); }

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

.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: var(--radius-btn);
  padding: 14px 26px;
  line-height: 1;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.btn:active { transform: translateY(1px); }

.btn:focus-visible {
  outline: 3px solid var(--peri);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--peri);
  color: var(--peri-ink);
}

.btn-primary:hover { background: var(--peri-deep); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 12px 24px;
}

.btn-outline:hover { border-color: var(--peri-deep); color: var(--peri-deep); }

.btn-sm { padding: 10px 18px; font-size: 14px; }

.header-cta { flex-shrink: 0; }

/* ---------- labels ---------- */

.label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 18px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--peri);
  flex-shrink: 0;
}

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

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--pad) 48px;
}

.hero h1 {
  font-size: clamp(2.7rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  animation: rise 500ms ease both;
}

.hero-sub {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 600;
  color: var(--ink-2);
  margin-top: 14px;
  animation: rise 500ms 80ms ease both;
}

.hero-body {
  max-width: 560px;
  margin-top: 20px;
  font-size: 17px;
  color: var(--ink-2);
  animation: rise 500ms 160ms ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
  animation: rise 500ms 240ms ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-sub, .hero-body, .hero-actions { animation: none; }
}

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

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

.hero-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
}

/* ---------- sections ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px var(--pad) 0;
}

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 720px;
}

.prose {
  max-width: 620px;
  margin-top: 24px;
  font-size: 17px;
  color: var(--ink-2);
}

.prose p + p { margin-top: 16px; }

/* ---------- cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px;
  background: var(--bg);
}

.card h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 12px;
}

.card p { font-size: 15px; color: var(--ink-2); }

.card-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--peri-ink);
  background: #EEEFF9;
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 16px;
}

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card-link:hover {
  border-color: var(--peri);
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.07);
  transform: translateY(-3px);
}

.card-link:focus-visible {
  outline: 3px solid var(--peri);
  outline-offset: 2px;
}

.card-more {
  margin-top: auto;
  padding-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--peri-deep);
}

.card-link:hover .card-more { text-decoration: underline; }

/* ---------- steps (how it works) ---------- */

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.step {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px;
}

.step-num {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--peri-deep);
  margin-bottom: 14px;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.step p { font-size: 15px; color: var(--ink-2); }

/* ---------- tiers ---------- */

.tier {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.tier-featured {
  border-color: var(--peri);
  box-shadow: 0 8px 30px rgba(138, 143, 208, 0.18);
}

.tier h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.tier-for {
  font-size: 14.5px;
  color: var(--mute);
  margin-bottom: 20px;
}

.tier-list {
  list-style: none;
  margin-top: auto;
}

.tier-list li {
  font-size: 14.5px;
  color: var(--ink-2);
  padding: 8px 0 8px 26px;
  position: relative;
  border-top: 1px solid var(--line);
}

.tier-list li:first-child { border-top: none; }

.tier-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--peri);
}

.tier-note {
  max-width: 720px;
  margin-top: 28px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
}

/* ---------- strip ---------- */

.strip {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 44px;
}

.strip h2 { margin-bottom: 4px; }
.strip .label { margin-bottom: 14px; }
.strip .prose { margin-top: 16px; }

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

.about {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px var(--pad) 0;
}

.about h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 20px;
}

.about-lead {
  font-size: 19px;
  color: var(--ink-2);
  margin-bottom: 32px;
}

.about p {
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: 18px;
}

.about h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 44px 0 16px;
}

.about-belief {
  font-size: 21px !important;
  font-weight: 600;
  color: var(--ink) !important;
  border-left: 4px solid var(--peri);
  padding-left: 20px;
  line-height: 1.4;
}

.about-signoff {
  margin-top: 40px;
  color: var(--mute) !important;
  font-style: italic;
}

.text-link {
  color: var(--peri-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--peri);
}

.text-link:hover { color: var(--ink); }

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

.blog-list {
  max-width: 760px;
  margin: 36px auto 0;
}

.post-entry {
  border-top: 1px solid var(--line);
  padding: 30px 0;
}

.post-entry:first-child { border-top: none; }

.post-date {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 10px;
}

.post-entry h3 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.post-entry h3 a { color: var(--ink); text-decoration: none; }
.post-entry h3 a:hover { color: var(--peri-deep); }

.post-entry p { font-size: 16px; color: var(--ink-2); margin-bottom: 14px; }

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

.back-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--peri-deep);
  text-decoration: none;
  margin-bottom: 22px;
}

.back-link:hover { text-decoration: underline; }

.post .post-date { margin-bottom: 16px; }

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

.contact-wrap {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form { max-width: 560px; }

.form-field { margin-bottom: 20px; }

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

.form-field .optional { font-weight: 400; color: var(--mute); }

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #C7C9D4;
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.form-field textarea { resize: vertical; }

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--peri);
  box-shadow: 0 0 0 3px rgba(138, 143, 208, 0.25);
}

.contact-form .btn { margin-top: 4px; cursor: pointer; border: none; }

.contact-aside {
  border-left: 3px solid var(--peri);
  padding-left: 24px;
}

.contact-aside a {
  display: block;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  padding: 5px 0;
}

.contact-aside a:hover { color: var(--peri-deep); text-decoration: underline; }

/* ---------- cta band ---------- */

.cta-band {
  max-width: var(--max);
  margin: 96px auto 0;
  padding: 72px 48px;
  background: var(--ink);
  border-radius: var(--radius-card);
  text-align: center;
}

@media (min-width: 1128px) {
  .cta-band { margin-left: auto; margin-right: auto; }
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 640px;
  margin: 0 auto;
}

.cta-band p {
  color: #C7C9D4;
  margin: 18px auto 32px;
  font-size: 16px;
  max-width: 480px;
}

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

.site-footer {
  margin-top: 110px;
  border-top: 1px solid var(--line);
  padding: 56px var(--pad) 40px;
}

.footer-row {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-heading {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  padding: 4px 0;
}

.footer-col a:hover { color: var(--peri-deep); text-decoration: underline; }

.footer-note { font-size: 14.5px; color: var(--ink-2); max-width: 280px; }

.footer-legal {
  max-width: var(--max);
  margin: 48px auto 0;
  font-size: 13px;
  color: var(--mute);
}

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

@media (max-width: 860px) {
  .card-grid, .card-grid-3, .step-grid { grid-template-columns: 1fr; }
  .section { padding-top: 64px; }
  .cta-band { margin: 64px var(--pad) 0; padding: 56px 28px; }
  .strip { padding: 32px 24px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 32px; }
  .contact-aside { border-left: none; border-top: 3px solid var(--peri); padding-left: 0; padding-top: 20px; }
}

@media (max-width: 640px) {
  /* keep tap targets at 48px minimum */
  .btn { padding: 17px 28px; }
  .btn-sm { padding: 15px 22px; }
  .site-header { flex-wrap: wrap; gap: 14px; }
  .site-nav { margin-left: 0; gap: 18px; order: 3; width: 100%; }
  .header-cta { margin-left: auto; }
  .hero { padding-top: 40px; }
  .footer-row { grid-template-columns: 1fr; }
}
