/* =========================================================
   JR CONSULTING WEBSITE STYLES

   Useful search keywords:
   THEME VARIABLES
   BASE STYLES
   HEADER-NAV
   HERO-SECTION
   SERVICES-CARDS
   PROCESS-STEPS
   ACCESSIBILITY-CONTENT
   CONTACT-FORM
   ACCESSIBILITY-TOOLBAR
   FOOTER-CONTENT
   RESPONSIVE
   ========================================================= */

/* =========================
   THEME VARIABLES
   Update the core colours here.
   ========================= */
:root {
  --aqua: #0EA5E9;
  --aqua-dark: #0369A1;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #1e293b;
  --muted: #64748b;
  --border: #dbe4ee;
  --focus: #0284C7;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --font-scale: 1;
  --space-scale: 1;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #0f172a;
    --surface: #172033;
    --surface-soft: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #334155;
    --focus: #38BDF8;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  }
}

html[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #172033;
  --surface-soft: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #334155;
  --focus: #38BDF8;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

html[data-contrast="high"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #eef2f7;
  --text: #0f172a;
  --muted: #243447;
  --border: #0f172a;
  --focus: #000000;
}

html[data-theme="dark"][data-contrast="high"] {
  --bg: #000000;
  --surface: #050505;
  --surface-soft: #111111;
  --text: #ffffff;
  --muted: #eeeeee;
  --border: #ffffff;
  --focus: #ffffff;
}

html[data-text-size="large"] { --font-scale: 1.12; }
html[data-text-size="xlarge"] { --font-scale: 1.24; }
html[data-spacing="roomy"] { --space-scale: 1.18; }

/* =========================
   BASE STYLES
   ========================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
  line-height: calc(1.65 * var(--space-scale));
}

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

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

section { padding: 4.5rem 0; }

h1, h2, h3 {
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 0;
}

h1 {
  font-size: clamp(2.7rem, 7vw, 5rem);
  margin-top: 1.2rem;
}
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.lead {
  color: var(--muted);
  font-size: calc(1.12rem * var(--font-scale));
  max-width: 65ch;
  margin: 1.4rem 0 0;
}

.button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  min-height: 44px;
}

.button.primary {
  background: var(--aqua);
  color: white;
  border-color: var(--aqua);
}
.button.primary:hover {
  background: var(--aqua-dark);
  border-color: var(--aqua-dark);
}

/* =========================
   HEADER-NAV
   Update logo, nav spacing and header behaviour here.
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }

/* =========================
   HERO-SECTION
   Main homepage opening section.
   ========================= */
.hero { padding: clamp(4rem, 9vw, 7.5rem) 0 4rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.visual-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.visual-panel {
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.24), transparent 28%),
    linear-gradient(135deg, var(--surface-soft), var(--surface));
  padding: 1.2rem;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
}

.mini-card {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
  margin-bottom: 0.8rem;
}
.mini-card strong { display: block; margin-bottom: 0.1rem; }
.mini-card span { color: var(--muted); font-size: 0.92rem; }

.caption {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0.8rem 0 0;
}

/* =========================
   SERVICES-CARDS
   Service cards and section intro.
   ========================= */
.section-header {
  max-width: 760px;
  margin-bottom: 2rem;
}
.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: calc(1.3rem * var(--space-scale));
  min-height: 210px;
}
.icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--aqua) 14%, var(--surface-soft));
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--aqua-dark);
  font-weight: 900;
}
.card p { color: var(--muted); margin-bottom: 0; }

/* =========================
   PROCESS-STEPS
   Client engagement process.
   ========================= */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.3rem;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--aqua);
  color: white;
  font-weight: 900;
  margin-bottom: 1rem;
}

/* =========================
   ACCESSIBILITY-CONTENT
   ========================= */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}
.notice {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.4rem;
}

/* =========================
   CONTACT-FORM
   Form layout and fields.
   ========================= */
form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.3rem;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field.full { grid-column: 1 / -1; }

label { font-weight: 750; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  font: inherit;
  min-height: 46px;
}
textarea {
  min-height: 150px;
  resize: vertical;
}
.help {
  color: var(--muted);
  font-size: 0.88rem;
}

/* =========================
   ACCESSIBILITY-TOOLBAR
   Fixed display settings panel.
   ========================= */
.access-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  display: grid;
  gap: 0.7rem;
  justify-items: end;
}
.access-menu {
  width: min(360px, calc(100vw - 2rem));
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 1rem;
  display: none;
}
.access-menu[data-open="true"] { display: block; }

.control-group { margin-top: 0.9rem; }
.control-group p {
  margin: 0 0 0.4rem;
  font-weight: 800;
}

.control-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.control-options button {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.control-options button[aria-pressed="true"] {
  background: var(--aqua);
  border-color: var(--aqua);
  color: white;
  font-weight: 800;
}

/* =========================
   FOOTER-CONTENT
   ========================= */
footer {
  padding: 2rem 0 6rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}


/* =========================
   TESTIMONIALS
   Hidden until enabled through admin.html or data/site-content.json.
   ========================= */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.testimonial-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.4rem;
}

.testimonial-card blockquote {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 1.05rem;
}

.testimonial-card figcaption {
  display: grid;
  gap: 0.15rem;
  color: var(--muted);
}

.testimonial-card figcaption strong {
  color: var(--text);
}

/* Less synthetic polish: slightly softer radius and calmer card feel */
.card,
.step,
.notice,
form,
.testimonial-card {
  box-shadow: none;
}

.visual-card,
form {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

@media (max-width: 620px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

/* =========================
   RESPONSIVE
   Tablet and mobile layouts.
   ========================= */
@media (max-width: 860px) {
  .hero-grid,
  .split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .visual-panel { min-height: auto; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 1rem, 1120px); }
  .hero { padding-top: 3rem; }
  .cards,
  .process,
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  h1 { font-size: clamp(2.45rem, 14vw, 3.7rem); }
  .site-header { position: static; }
}
