/* ==========================================================================
   M. Walker / RiskByDesign - site stylesheet
   Dark charcoal portfolio with soft raised cards and a brass-gold accent.
   No external fonts, no dependencies.
   ========================================================================== */

:root {
  /* charcoal surfaces */
  --bg: #212428;
  --bg-deep: #1c1e22;
  --card-top: #26292e;
  --card-bottom: #1e2125;
  --border: rgba(255, 255, 255, 0.05);

  /* soft dual shadows for the raised-card look */
  --shadow-out: 10px 10px 22px rgba(0, 0, 0, 0.38), -8px -8px 18px rgba(255, 255, 255, 0.035);
  --shadow-hover: 14px 14px 28px rgba(0, 0, 0, 0.45), -10px -10px 22px rgba(255, 255, 255, 0.04);

  /* text */
  --text: #e6e8eb;
  --muted: #9aa1ab;

  /* brass gold, from the logo's dot */
  --accent: #c9a24b;
  --accent-bright: #ddb75f;
  --accent-bg: rgba(201, 162, 75, 0.09);

  --font-body: "Aptos", "Aptos Display", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1120px;
  --radius: 10px;
}

/* ---------- reset & base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}

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

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1em; }

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

::selection { background: var(--accent); color: #211d10; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.container-narrow { max-width: 780px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #211d10;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(33, 36, 40, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  gap: 16px;
}

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

.brand-badge {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-out);
  flex-shrink: 0;
}
.brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.9) translateY(14%);
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand-name .gold { color: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-menu a:hover { color: var(--accent-bright); text-decoration: none; }

.nav-contact {
  color: var(--accent-bright) !important;
  border: 1px solid rgba(201, 162, 75, 0.45);
  padding: 9px 18px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-contact:hover {
  background: var(--accent);
  color: #211d10 !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  padding: 90px 0 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 64px;
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.accent { color: var(--accent-bright); }

.hero-lede {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 22px 0 44px;
}

/* find with me / core focus */

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.meta-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.tile-row { display: flex; gap: 16px; }

.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--card-top), var(--card-bottom));
  box-shadow: var(--shadow-out);
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
a.tile:hover {
  color: var(--accent-bright);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}
.tile-static { color: var(--accent); cursor: default; }

/* headshot */

.hero-photo {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--card-top), var(--card-bottom));
  box-shadow: var(--shadow-out);
  padding: 14px;
}
.hero-photo img {
  width: 100%;
  border-radius: 10px;
  filter: grayscale(1) contrast(1.02);
}

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

.section { padding: 90px 0; }

.section-lede {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 48px;
}

section[id] { scroll-margin-top: 90px; }

/* ---------- what i do ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 44px;
}

.service {
  background: linear-gradient(145deg, var(--card-top), var(--card-bottom));
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 36px 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.service-icon {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: 20px;
}

.service h3 { margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 0.95rem; margin: 0; }

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, var(--card-top), var(--card-bottom));
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 34px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.card-head h3 { margin-bottom: 0; font-size: 1.35rem; }

.badges { display: flex; gap: 8px; flex-shrink: 0; }

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.badge-accent {
  color: var(--accent-bright);
  border-color: rgba(201, 162, 75, 0.45);
  background: var(--accent-bg);
}

.card-desc { color: var(--muted); margin-top: 14px; }

.feature-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}
.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 9px;
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
}
.tags li {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--bg-deep);
  border-radius: 6px;
  padding: 4px 11px;
}

.card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.price-note {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(145deg, var(--card-top), var(--card-bottom));
  color: var(--accent-bright);
  box-shadow: var(--shadow-out);
}
.btn-primary:hover {
  background: var(--accent);
  color: #211d10;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }

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

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: linear-gradient(145deg, var(--card-top), var(--card-bottom));
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 28px 30px;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-value {
  font-size: 0.95rem;
  color: var(--muted);
  word-break: break-all;
}

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

.post-title { font-size: clamp(2rem, 4.5vw, 3rem); }

.post-meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.2em;
}

.post-lede {
  font-size: 1.15rem;
  color: var(--text);
}

.post-body p { color: var(--muted); font-size: 1.02rem; }
.post-body .post-lede { color: var(--text); }
.post-body h2 {
  color: var(--text);
  font-size: 1.4rem;
  margin: 2em 0 0.6em;
}
.post-body ul { color: var(--muted); padding-left: 1.3em; margin: 0 0 1em; }
.post-body li { margin-bottom: 0.4em; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; }

.post-list { display: grid; gap: 24px; }

.post-card { color: var(--text); }
.post-card:hover { text-decoration: none; }
.post-card .post-meta { margin-bottom: 0.8em; }
.post-card h2 { font-size: 1.35rem; margin-bottom: 0.4em; }

.post-readmore {
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 38px 0;
  background: var(--bg-deep);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-note { letter-spacing: 0.04em; }

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* if JS is disabled or user prefers less motion, show everything */
.no-js .reveal,
.no-observer .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .service:hover, .contact-card:hover, a.tile:hover { transform: none; }
}

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

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .hero-photo {
    max-width: 380px;
    order: -1;
  }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }

  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li a {
    display: block;
    padding: 14px 28px;
  }
  .nav-contact { border: none; }

  .cards { grid-template-columns: 1fr; }
  .hero-meta { gap: 32px; }
}
