/* Rubricare — shared stylesheet
   Design tokens derived from the brand mark: teal, coral, navy, ink. */

:root {
  --teal: #1F5866;
  --teal-deep: #163F49;
  --coral: #E07A50;
  --coral-deep: #C55F38;
  --navy: #152A33;
  --ink: #1A2226;
  --slate: #55636A;
  --paper: #FBFAF8;
  --paper-dim: #F2F0EB;
  --line: #E2DFD8;
  --white: #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; color: var(--slate); }
a { color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

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

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img { height: 32px; width: auto; display: block; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 32px;
}

.main-nav a:first-child { margin-left: 0; }

.main-nav a:hover { color: var(--teal); }
.main-nav a[aria-current="page"] { color: var(--teal); font-weight: 600; }

.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--teal-deep); }

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 72px;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}

.hero .eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--coral);
  display: inline-block;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-lede {
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
}

.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-deep); }

.btn-ghost { border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Plan panel (product demonstration) ---------- */

.plan-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 24px 60px -32px rgba(21, 42, 51, 0.35);
}

.plan-panel .panel-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  font-weight: 600;
  margin-bottom: 14px;
}

.plan-line {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--ink);
  border-left: 3px solid transparent;
}

.plan-line.flag-rp {
  background: #FBEDE6;
  border-left-color: var(--coral);
}

.plan-line.flag-clarity {
  background: #EAF1F0;
  border-left-color: var(--teal);
}

.plan-line .flag-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.flag-rp .flag-tag { color: var(--coral-deep); }
.flag-clarity .flag-tag { color: var(--teal-deep); }

/* ---------- Sections ---------- */

section { padding: 64px 0; }
.section-alt { background: var(--paper-dim); }
.section-dark { background: var(--navy); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #C7D4D6; }

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
}

.section-dark .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}

.card .quad-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
}

.card h3 { margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Advisory note ---------- */

.advisory-note {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.advisory-note .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--coral);
  margin-top: 6px;
  flex-shrink: 0;
}

.advisory-note p { margin: 0; font-size: 0.95rem; }

/* ---------- Methodology steps ---------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step .step-index {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--coral);
  font-weight: 600;
}

/* ---------- Form ---------- */

.form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 560px;
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
}

.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal);
  outline: none;
}

.field-hint { font-size: 0.82rem; color: var(--slate); margin-top: 4px; }

.form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  display: none;
}

.form-status.visible { display: block; }
.form-status.ok { color: var(--teal-deep); }
.form-status.err { color: var(--coral-deep); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #B7C4C7;
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand img { height: 26px; }

.footer-brand span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
  font-weight: 600;
}

.site-footer p { color: #9FB0B3; font-size: 0.9rem; max-width: 40ch; }

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #B7C4C7; text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: #8CA0A3;
}

/* ---------- 404 ---------- */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.error-mark {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .main-nav { display: none; }
}
