/* ==========================================================================
   markstiles.ai — design system
   Palette: navy / white / silver / controlled orange
   Built static: no frameworks, no build step, no external dependencies.
   ========================================================================== */

:root {
  /* Color */
  --navy-900: #0b1d36;
  --navy-800: #10294a;
  --navy-700: #163760;
  --navy-600: #1f4b7f;
  --navy-100: #e6ecf4;

  --ink: #14202e;
  --ink-soft: #41505f;
  --ink-mute: #6a798a;

  --silver-50: #f7f9fb;
  --silver-100: #eef1f5;
  --silver-200: #dfe4ea;
  --silver-300: #c8d0da;

  --orange: #d2691e;
  --orange-dark: #b0571a;
  --orange-soft: #fdf3ec;

  --white: #ffffff;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;

  /* Space */
  --wrap: 1120px;
  --wrap-narrow: 760px;
  --gap: 1.5rem;
  --section-y: clamp(3.5rem, 7vw, 6rem);

  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(11, 29, 54, 0.06),
    0 2px 8px rgba(11, 29, 54, 0.05);
  --shadow-md: 0 2px 4px rgba(11, 29, 54, 0.06),
    0 12px 28px rgba(11, 29, 54, 0.09);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--navy-900);
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-dark); }

ul { margin: 0 0 1.1rem; padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }

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

/* ------------------------------------------------------------- layout --- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2rem);
}

.wrap--narrow { max-width: var(--wrap-narrow); }

section { padding-block: var(--section-y); }

.section--tint { background: var(--silver-50); border-block: 1px solid var(--silver-200); }
.section--navy { background: var(--navy-900); color: #dce5f0; }
.section--navy h2,
.section--navy h3 { color: var(--white); }

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.85rem;
}

.section--navy .eyebrow { color: #f0a267; }

.lede {
  font-size: clamp(1.075rem, 1.6vw, 1.24rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

.section--navy .lede { color: #b9c9dc; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 0.75rem 1.15rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

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

.btn--primary { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn--primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }

.btn--ghost { background: transparent; color: var(--navy-800); border-color: var(--silver-300); }
.btn--ghost:hover { border-color: var(--navy-600); color: var(--navy-800); background: var(--white); }

.section--navy .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.section--navy .btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }

/* ------------------------------------------------------------- header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--silver-200);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
}
.brand__name { font-weight: 750; color: var(--navy-900); font-size: 1.06rem; letter-spacing: -0.01em; }
.brand__role { font-size: 0.73rem; color: var(--ink-mute); letter-spacing: 0.055em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-size: 0.94rem;
  font-weight: 550;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav a:hover { color: var(--navy-800); }
.nav .btn { padding: 0.6rem 1.1rem; font-size: 0.92rem; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav__links { display: none; }
}

/* --------------------------------------------------------------- hero --- */
.hero { padding-block: clamp(3rem, 6vw, 5.25rem) clamp(3rem, 6vw, 5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 { margin-bottom: 1rem; }

.hero__sub {
  font-size: clamp(1.075rem, 1.7vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 0;
}

.hero__photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--silver-100);
}
.hero__photo img { width: 100%; aspect-ratio: 512 / 620; object-fit: cover; object-position: 50% 22%; }

.hero__stamp {
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--ink-mute);
  text-align: center;
}

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero__photo { max-width: 290px; margin-inline: auto; }
}

@media (max-width: 640px) {
  .brand__role { display: none; }
  .brand__name { font-size: 1.12rem; }
  .nav .btn { white-space: nowrap; padding: 0.55rem 0.95rem; font-size: 0.9rem; }
  .btn-row .btn { width: 100%; }
}

/* ------------------------------------------------------- proof strip --- */
.proofbar {
  background: var(--navy-900);
  color: #cfdcea;
  padding-block: 1.5rem;
}
.proofbar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.25rem 2rem;
}
.proofbar__item { display: flex; flex-direction: column; gap: 0.15rem; }
.proofbar__num {
  font-size: 1.6rem;
  font-weight: 750;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.proofbar__label { font-size: 0.87rem; color: #9db2ca; }

/* -------------------------------------------------------------- cards --- */
.grid { display: grid; gap: 1.35rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--silver-200);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.card h3 { margin-bottom: 0.45rem; }
.card p { font-size: 0.97rem; color: var(--ink-soft); }

/* ------------------------------------------------------------- method --- */
.method { counter-reset: step; }
.method__step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--silver-200);
}
.method__step:last-child { border-bottom: 0; }

.method__num {
  counter-increment: step;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy-800);
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 1rem;
}
.method__num::before { content: counter(step); }

.method__body h3 { margin-bottom: 0.3rem; }
.method__body p { margin-bottom: 0.5rem; color: var(--ink-soft); font-size: 0.99rem; }
.method__eg {
  font-size: 0.93rem;
  color: var(--ink-mute);
  border-left: 3px solid var(--orange);
  padding-left: 0.85rem;
  margin: 0;
}

/* ------------------------------------------------------- systems grid --- */
.system {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--silver-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.system:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--silver-300); }

.system__kicker {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.55rem;
}
.system h3 { font-size: 1.14rem; margin-bottom: 0.4rem; }
.system p { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.tags li {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--navy-700);
  background: var(--silver-100);
  border: 1px solid var(--silver-200);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
}

.system__link {
  margin-top: auto;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--navy-600);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.system__link:hover { color: var(--orange-dark); text-decoration: underline; }

/* -------------------------------------------------------- case study --- */
.case {
  background: var(--white);
  border: 1px solid var(--silver-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.case:last-child { margin-bottom: 0; }

.case__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem; margin-bottom: 0.35rem; }
.case__head h3 { margin: 0; font-size: clamp(1.3rem, 2.3vw, 1.6rem); }

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--verified { background: #e7f3ec; color: #1d6b42; border: 1px solid #bfe0cd; }
.badge--live { background: var(--orange-soft); color: var(--orange-dark); border: 1px solid #f2d3ba; }
.badge--confidential { background: var(--silver-100); color: var(--ink-soft); border: 1px solid var(--silver-300); }

.case__client { color: var(--ink-mute); font-size: 0.93rem; margin-bottom: 1.35rem; }

.case__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 1.1rem 2.25rem; }
.case__block h4 {
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.case__block p, .case__block ul { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 0; }
.case__block li { font-size: 0.97rem; color: var(--ink-soft); }

.results {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--silver-200);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.15rem;
}
.results > div { display: flex; flex-direction: column; gap: 0.2rem; }
.result__num {
  display: block;
  font-size: 1.55rem;
  font-weight: 750;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.result__num em { font-style: normal; color: var(--orange); }
.result__label { display: block; font-size: 0.87rem; color: var(--ink-mute); line-height: 1.45; }

/* --------------------------------------------------------- engagement --- */
.engage { border-left: 3px solid var(--orange); padding-left: 1.15rem; }
.engage h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.engage p { font-size: 0.96rem; color: var(--ink-soft); margin-bottom: 0; }

/* -------------------------------------------------------------- about --- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr); gap: clamp(2rem, 5vw, 3.5rem); }
@media (max-width: 900px) { .about__grid { grid-template-columns: 1fr; } }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--silver-200);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}
.facts li:last-child { border-bottom: 0; }
.facts strong { display: block; color: var(--navy-900); font-size: 0.98rem; margin-bottom: 0.1rem; }

/* ------------------------------------------------------------ contact --- */
.contact__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 880px) { .contact__grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.9rem; font-weight: 650; color: #e9f0f8; }
.field .req { color: #f0a267; }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 0.72rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8ea5bf; }
.field select option { color: #14202e; }

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.12);
}

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

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

.form__note { font-size: 0.86rem; color: #9db2ca; margin: 0; }

.contact-direct { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.contact-direct li { margin-bottom: 0.9rem; font-size: 0.98rem; }
.contact-direct a { color: #f0a267; font-weight: 600; }
.contact-direct a:hover { color: #fff; }

/* ------------------------------------------------------------- footer --- */
.site-footer {
  background: #071527;
  color: #8ba1bb;
  padding-block: 2.5rem;
  font-size: 0.9rem;
}
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; align-items: center; }
.site-footer a { color: #b9cbe0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* --------------------------------------------------------------- misc --- */
.callout {
  background: var(--orange-soft);
  border: 1px solid #f2d3ba;
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin-top: 2rem;
}
.callout p { font-size: 0.97rem; color: #7a4419; margin-bottom: 0; }
.callout strong { color: #6b3a13; }

.section-head { max-width: 66ch; margin-bottom: 2.5rem; }
