/*
 * RunByMany, LLC — site stylesheet
 *
 * Keeps the original identity (sea-green nav bar, the "R" roundel that
 * completes the wordmark, white rounded cards on a grey field) and makes it
 * responsive, accessible and dark-mode aware. No external fonts or scripts so
 * the strict Content-Security-Policy set in CloudFront holds.
 */

:root {
  --green: #8fbc8f;          /* original nav colour (darkseagreen) */
  --green-ink: #2e4a33;      /* dark green sampled from the logo */
  --green-deep: #1f3523;
  --green-tint: #e6efe5;
  --bg: #d6d9d4;             /* softened version of the original #ccc */
  --surface: #ffffff;
  --surface-2: #eef0ec;
  --text: #1c211d;
  --muted: #535b54;
  --border: #c3c9c1;
  --focus: #2e4a33;
  --danger: #a3262e;
  --ok: #2c6b34;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 6px 24px rgb(0 0 0 / 6%);
  --max: 960px;
  --font: "Trebuchet MS", Trebuchet, "Lucida Sans Unicode", "Lucida Grande",
          "Lucida Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: Rockwell, "Roboto Slab", "Courier New", Georgia, serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green: #7fae80;
    --green-ink: #a9d2a9;
    --green-deep: #cfe6cf;
    --green-tint: #22301f;
    --bg: #151916;
    --surface: #1f2420;
    --surface-2: #272d28;
    --text: #e6eae5;
    --muted: #a4ada5;
    --border: #39413a;
    --focus: #a9d2a9;
    --danger: #ff8a8f;
    --ok: #8fd197;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--green-ink); text-underline-offset: 2px; }
a:hover { text-decoration: none; }

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

::selection { background: #f6cf74; color: #000; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--green-deep); }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem); }
h2 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- masthead: [R]unByMany, LLC. ---------- */
.masthead { padding: 1.5rem 0 1rem; }
.masthead .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* The R badge and the wordmark share one font and size, so the R reads as the
   first letter of the word. Badge colours flip with the theme: dark circle and
   white R in light mode, light circle and dark R in dark mode (both ~9:1). */
.brand {
  display: inline-flex; align-items: center; gap: .04em;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.6rem);
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--green-ink);
}
/* text-box trims each text box to cap height → baseline, so the R is exactly
   centred in its circle and the circle is centred on the wordmark's capitals. */
.brand .mark,
.brand .wordmark { display: inline-block; text-box: trim-both cap alphabetic; }
.brand .mark {
  flex: none;
  box-sizing: border-box;
  width: 1.3em; height: 1.3em;
  padding-top: calc((1.3em - 1cap) / 2);
  text-align: center;
  border-radius: 50%;
  background: var(--green-ink);
  color: var(--surface);
}
.brand .wordmark { color: var(--green-ink); }
.tagline { margin: 0 0 .35rem; color: var(--muted); font-size: .95rem; }

/* ---------- nav bar (the original green bar) ---------- */
.nav {
  flex: 1 1 100%;
  background: var(--green);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav a {
  display: block;
  padding: .7rem 1.15rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  text-transform: lowercase;
}
.nav li:first-child a { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface); color: var(--text); }
@media (prefers-color-scheme: dark) {
  .nav a { color: #0f1a10; }
}

.nav-toggle { display: none; }

@media (max-width: 640px) {
  .nav-toggle {
    display: flex; align-items: center; gap: .5rem; width: 100%;
    background: none; border: 0; color: #fff; font: inherit; font-size: 1.05rem;
    padding: .7rem 1rem; cursor: pointer; text-align: left;
  }
  .nav-toggle .bars { width: 18px; height: 2px; background: currentColor; position: relative; }
  .nav-toggle .bars::before, .nav-toggle .bars::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
  }
  .nav-toggle .bars::before { top: -6px; }
  .nav-toggle .bars::after { top: 6px; }
  .js .nav ul { display: none; }
  .js .nav.open ul { display: flex; }
  .nav ul { flex-direction: column; padding-bottom: .4rem; }
  .nav a, .nav li:first-child a { border-radius: 0; }
}

/* ---------- main content ---------- */
main { flex: 1; padding: 1.75rem 0 2.5rem; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
}
.card + .card { margin-top: 1.5rem; }

.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.hero { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: center; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

.button {
  display: inline-block;
  background: var(--green-ink);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: .75rem 1.4rem;
  font: inherit; font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--green-deep); }
.button.secondary { background: transparent; color: var(--green-ink); box-shadow: inset 0 0 0 2px var(--green); }
.button.secondary:hover { background: var(--green-tint); }
.button[disabled] { opacity: .6; cursor: progress; }
@media (prefers-color-scheme: dark) {
  .button { color: #0f1a10; }
  .button:hover { background: var(--green); }
}

/* ---------- carousel (case studies) ---------- */
.carousel { position: relative; }
.carousel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.slides { list-style: none; margin: 0; padding: 0; }
.slide + .slide { margin-top: 2rem; }          /* no-JS: all slides stacked */
.js .slide + .slide { margin-top: 0; }
.js .slide[hidden] { display: none; }

.slide h3 { font-size: 1.2rem; margin-bottom: .75rem; }
.slide figure { margin: 0; }
.slide .shot {
  display: block; width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  opacity: .8;
  transition: opacity .2s;
}
.slide .shot:hover { opacity: 1; }
.slide figcaption {
  margin-top: 1rem;
  background: var(--surface-2);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.carousel-controls { display: none; }
.js .carousel-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1rem;
}
.arrow {
  white-space: nowrap;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; padding: .5rem .9rem; cursor: pointer;
}
.arrow:hover { background: var(--green-tint); }
.dots { display: flex; gap: .5rem; }
.dots button {
  width: 12px; height: 12px; padding: 0; border-radius: 50%;
  border: 2px solid var(--green); background: transparent; cursor: pointer;
}
.dots button[aria-current="true"] { background: var(--green); }

/* ---------- generic lists / sections ---------- */
.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .55rem 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: 0; }

.pill-list { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-list li { background: var(--green-tint); border-radius: 999px; padding: .25rem .8rem; font-size: .92rem; }

/* testimonials */
.quotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .quotes { grid-template-columns: 1fr 1fr; } }
.quotes blockquote {
  margin: 0; height: 100%;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--green);
  padding: 1rem 1.25rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: .75rem;
}
.quotes p { margin: 0; }
.quotes cite { font-style: normal; font-weight: 700; color: var(--green-ink); }

/* services table */
.table-wrap { overflow-x: auto; }
table.rates { width: 100%; border-collapse: collapse; margin: .5rem 0 1.5rem; }
.rates th, .rates td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.rates thead th { background: var(--green); color: #fff; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.rates thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.rates thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.rates tbody tr:nth-child(odd) { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { .rates thead th { color: #0f1a10; } }

/* call to action box (the old .contactbox) */
.contactbox {
  margin-top: 1.75rem;
  text-align: center;
  background: var(--green-tint);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1rem;
  font-size: 1.08rem;
}

/* ---------- contact form ---------- */
.contact-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 2fr 3fr; } }

.form { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .3rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem .8rem;
}
.field textarea { min-height: 11rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: transparent; }
.field .hint { color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }

/* honeypot: hidden from people, visible to naive bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.status { border-radius: var(--radius-sm); padding: .8rem 1rem; font-weight: 700; }
.status:empty { display: none; }
.status.ok { background: var(--green-tint); color: var(--ok); }
.status.err { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

.obfuscated { white-space: nowrap; }

/* ---------- footer ---------- */
.site-footer { padding: 1.5rem 0 2rem; color: var(--muted); font-size: .9rem; text-align: center; }
.site-footer p { margin: .15rem 0; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

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