/* Rellek Advisory — site styles. Brand values from SPEC §11.1. */

:root {
  --color-navy: #0A1F3E;
  --color-ink: #011027;
  --color-blue: #0E4FA1;
  --color-blue-bright: #0D72CC;
  --color-blue-mid: #124273;
  --color-slate: #46545F;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F5F8FC;
  --color-border: #D8E1EC;
  --color-error: #B42318;
  --color-error-bg: #FEF3F2;
  --color-success-bg: #ECFDF3;
  --color-success: #05603A;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(10, 31, 62, 0.06), 0 4px 16px rgba(10, 31, 62, 0.06);
  --header-height: 68px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-slate);
  background: var(--color-surface);
}

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

h1, h2, h3 {
  color: var(--color-navy);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

a { color: var(--color-blue); text-underline-offset: 0.15em; }
a:hover { color: var(--color-blue-mid); }

:focus-visible {
  outline: 3px solid var(--color-blue-bright);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Draft placeholders: must all be resolved before launch (SPEC §13). */
.tbd {
  background: #FFF4CC;
  color: #5C4500;
  border: 1px dashed #C9A200;
  border-radius: 4px;
  padding: 0 0.25rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button-primary { background: var(--color-blue); color: #fff; }
.button-primary:hover { background: var(--color-blue-mid); color: #fff; }
.button-secondary { background: transparent; color: var(--color-blue); border-color: var(--color-blue); }
.button-secondary:hover { background: var(--color-surface-alt); color: var(--color-blue-mid); }
.button-large { min-height: 52px; padding: 0.8rem 1.5rem; font-size: 1.05rem; }
.button[disabled] { opacity: 0.65; cursor: progress; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-height);
}

.brand { display: inline-flex; margin-right: auto; }
.brand img { display: block; width: auto; height: 36px; }

.header-cta { order: 2; padding: 0.5rem 0.9rem; }
.cta-long { display: none; }

.nav-toggle {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  position: relative;
  content: "";
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0.5rem 1.25rem 1rem; }
.site-nav a {
  display: block;
  padding: 0.7rem 0;
  color: var(--color-navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--color-surface-alt);
}
.site-nav a:hover { color: var(--color-blue); }

@media (min-width: 480px) {
  .brand img { height: 42px; }
}

@media (min-width: 940px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    order: 1;
    background: none; border: 0; box-shadow: none;
  }
  .site-nav ul { display: flex; gap: 1.5rem; padding: 0; }
  .site-nav a { padding: 0.25rem 0; border: 0; font-weight: 500; }
  .header-cta { order: 2; margin-left: 0.75rem; }
  .cta-long { display: inline; }
  .cta-short { display: none; }
}

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--color-surface-alt); }
.section-title { margin-bottom: 1rem; }
.section-intro { font-size: 1.125rem; max-width: 46rem; margin-bottom: 2rem; }

/* Hero */
.hero {
  padding: 4.5rem 0 4rem;
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, #fff 100%);
}
.hero-inner > * { max-width: 880px; }
.eyebrow {
  color: var(--color-blue);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 44rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.75rem; }
.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0; margin: 0;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.95rem;
}
.trust-line li::before { content: "✓"; color: var(--color-blue-bright); margin-right: 0.4rem; }

/* Problems */
.problem-grid {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}
.problem-grid li {
  background: #fff;
  border-left: 4px solid var(--color-blue-bright);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  color: var(--color-navy);
}
.bridge { font-size: 1.15rem; font-weight: 600; color: var(--color-navy); max-width: 46rem; margin: 0; }

@media (min-width: 640px) { .problem-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .problem-grid { grid-template-columns: repeat(3, 1fr); } }

/* Services */
.card-grid { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card ul { margin: 0; padding-left: 1.2rem; }
.card li { margin-bottom: 0.35rem; }
.card-featured { border: 2px solid var(--color-blue); box-shadow: var(--shadow); }
.card-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.15rem 0.6rem;
  background: var(--color-blue);
  color: #fff;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.footnote { font-size: 0.95rem; max-width: 52rem; margin: 0; }

@media (min-width: 760px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }

/* Process */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 4.25rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.25rem; top: 1.2rem;
  width: 2.2rem; height: 2.2rem;
  display: grid;
  place-items: center;
  background: var(--color-navy);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
}
.steps h3 { margin-bottom: 0.35rem; }
.steps p { margin: 0; }

/* Why Rellek */
.value-grid { display: grid; gap: 1.5rem; }
.value-icon {
  width: 40px; height: 40px;
  margin-bottom: 0.75rem;
  fill: none;
  stroke: var(--color-blue-bright);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.value p { margin: 0; }

@media (min-width: 640px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .value-grid { grid-template-columns: repeat(4, 1fr); } }

/* About */
.about { display: grid; gap: 2rem; align-items: start; }
.about-photo {
  width: 160px; height: 160px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue-bright), var(--color-navy));
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.about-name { font-size: 1.25rem; font-weight: 700; color: var(--color-navy); }
.about-role { display: block; font-size: 1rem; font-weight: 500; color: var(--color-slate); }
.highlights { padding-left: 1.2rem; }
.about-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

@media (min-width: 760px) { .about { grid-template-columns: 200px 1fr; } .about-photo { width: 200px; height: 200px; } }

/* FAQ */
.faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 0.75rem;
}
.faq summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
}
.faq details[open] summary { border-bottom: 1px solid var(--color-border); }
.faq details p { padding: 1rem 1.25rem 0.25rem; }

/* Form */
.consult-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.consult-form fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.consult-form > fieldset > legend {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-navy);
  padding: 0;
  margin-bottom: 1rem;
}
.required-note { font-size: 0.9rem; margin-bottom: 1rem; }
.req { color: var(--color-error); }

.field { margin-bottom: 1.1rem; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field label,
.choice-group > legend {
  display: block;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.35rem;
  padding: 0;
}

.consult-form input[type="text"],
.consult-form input[type="email"],
.consult-form input[type="tel"],
.consult-form select,
.consult-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--color-ink);
  background: #fff;
  border: 1px solid #A9B7C8;
  border-radius: 8px;
}
.consult-form textarea { resize: vertical; min-height: 140px; }
.consult-form [aria-invalid="true"] { border-color: var(--color-error); border-width: 2px; }

.choice-group { margin-bottom: 1.1rem !important; }
.choice {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 400 !important;
  color: var(--color-slate) !important;
  margin-bottom: 0.4rem;
  cursor: pointer;
}
.choice input { width: 1.15rem; height: 1.15rem; margin: 0.25rem 0 0; flex: none; accent-color: var(--color-blue); }
.choice-inline { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.choice-inline > legend { width: 100%; }
.consent { margin-top: 0.25rem; }

.field-hint { font-size: 0.9rem; margin: 0.35rem 0 0; }
.field-error { color: var(--color-error); font-size: 0.92rem; font-weight: 600; margin: 0.35rem 0 0; }

.error-summary {
  border: 2px solid var(--color-error);
  background: var(--color-error-bg);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.error-summary h3 { color: var(--color-error); font-size: 1.05rem; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--color-error); font-weight: 600; }

.form-status { margin-bottom: 1rem; font-weight: 600; }
.form-status.is-error { color: var(--color-error); }

.form-success {
  border: 2px solid var(--color-success);
  background: var(--color-success-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.form-success h3 { color: var(--color-success); }
.form-success p { margin: 0; }

.turnstile { min-height: 65px; }

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

.notice {
  background: #FFF4CC;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.contact-alt { margin: 1.25rem 0 0; }

/* Footer */
.site-footer { background: var(--color-surface-alt); border-top: 1px solid var(--color-border); padding: 2.5rem 0 1.5rem; font-size: 0.95rem; }
.footer-inner { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; }
.footer-brand img { display: block; height: 36px; width: auto; margin-bottom: 0.75rem; }
.footer-brand p, .footer-contact p { margin: 0 0 0.35rem; }
.footer-legal p { margin: 0; font-size: 0.9rem; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1fr; } .footer-contact { text-align: right; } }

/* Privacy and 404 pages */
.prose h1 { margin-bottom: 0.5rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.muted { color: var(--color-slate); font-size: 0.95rem; }
.not-found { text-align: center; padding: 3rem 1.25rem; }
.not-found .hero-actions { justify-content: center; }
