/* ============================================================================
   Rooman Platform — Shared Design System
   One source of truth for tokens + components across every surface
   (landing page, course generator, learner classroom, dashboards).
   Mobile-first: base styles are for small screens, media queries scale up.
   ========================================================================= */

:root {
  /* Brand */
  --navy:      #1F3469;
  --navy-700:  #182A55;
  --navy-900:  #0F1B38;
  --orange:    #F8951E;
  --orange-600:#E07E0B;
  --red:       #C73E2C;
  --green:     #327838;
  --teal:      #0E7C86;

  /* Neutrals */
  --ink:       #16203A;
  --body:      #4B5563;
  --muted:     #6B7485;
  --line:      #E4E8F2;
  --line-soft: #EEF1F7;
  --bg:        #F6F8FC;
  --surface:   #FFFFFF;

  /* Accents (tints) */
  --navy-tint:   rgba(31, 52, 105, 0.07);
  --orange-tint: rgba(248, 149, 30, 0.12);
  --green-tint:  rgba(50, 120, 56, 0.10);

  /* Typography */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Radii + shadows */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(16, 27, 58, 0.06);
  --sh:    0 4px 16px rgba(16, 27, 58, 0.08);
  --sh-lg: 0 14px 40px rgba(16, 27, 58, 0.12);

  /* Layout */
  --maxw: 1180px;
  --gutter: 20px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- layout -- */
.ds-container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.ds-section { padding: 48px 0; }
.ds-section--tight { padding: 28px 0; }
@media (min-width: 768px) {
  .ds-section { padding: 76px 0; }
  :root { --gutter: 28px; }
}

.ds-grid { display: grid; gap: 18px; }
.ds-grid--2 { grid-template-columns: 1fr; }
.ds-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .ds-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .ds-grid--2 { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .ds-grid--3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

/* ------------------------------------------------------------ typography -- */
.ds-h1, .ds-h2, .ds-h3 { color: var(--ink); margin: 0 0 12px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.ds-h1 { font-size: 32px; }
.ds-h2 { font-size: 25px; }
.ds-h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
@media (min-width: 768px) {
  .ds-h1 { font-size: 46px; }
  .ds-h2 { font-size: 33px; }
  .ds-h3 { font-size: 20px; }
}
.ds-lead { font-size: 17px; color: var(--body); margin: 0 0 20px; }
@media (min-width: 768px) { .ds-lead { font-size: 19px; } }
.ds-p { color: var(--body); margin: 0 0 12px; }
.ds-small { font-size: 14px; color: var(--muted); }
.ds-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 10px;
}
.ds-center { text-align: center; }
.ds-measure { max-width: 62ch; }
.ds-measure-center { max-width: 62ch; margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------- buttons -- */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1;
  padding: 13px 22px; border-radius: var(--r-sm); border: 1.5px solid transparent;
  cursor: pointer; transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; white-space: nowrap;
}
.ds-btn:hover { text-decoration: none; }
.ds-btn:active { transform: translateY(1px); }
.ds-btn--primary { background: var(--navy); color: #fff; box-shadow: var(--sh-sm); }
.ds-btn--primary:hover { background: var(--navy-700); }
.ds-btn--accent { background: var(--orange); color: #fff; box-shadow: var(--sh-sm); }
.ds-btn--accent:hover { background: var(--orange-600); }
.ds-btn--ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.ds-btn--ghost:hover { border-color: var(--navy); }
.ds-btn--onDark { background: #fff; color: var(--navy); }
.ds-btn--onDarkGhost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.ds-btn--onDarkGhost:hover { border-color: #fff; }
.ds-btn--lg { padding: 15px 28px; font-size: 16px; }
.ds-btn--block { width: 100%; }
@media (max-width: 520px) { .ds-btn { width: 100%; } }

/* ----------------------------------------------------------------- cards -- */
.ds-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px; box-shadow: var(--sh-sm);
}
.ds-card--hover { transition: box-shadow .18s ease, transform .18s ease; }
.ds-card--hover:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.ds-card__icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-tint); margin-bottom: 14px;
}
.ds-card__icon svg { width: 22px; height: 22px; stroke: var(--navy); fill: none; stroke-width: 2; }
.ds-card__icon--accent { background: var(--orange-tint); }
.ds-card__icon--accent svg { stroke: var(--orange-600); }

/* --------------------------------------------------------------- badges --- */
.ds-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 5px 11px;
  border-radius: var(--r-pill); background: var(--navy-tint); color: var(--navy);
}
.ds-badge--accent { background: var(--orange-tint); color: #92580B; }
.ds-badge--ok { background: var(--green-tint); color: var(--green); }

/* ----------------------------------------------------------------- forms -- */
.ds-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.ds-input, .ds-select, .ds-textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 13px; transition: border-color .15s ease, box-shadow .15s ease;
}
.ds-input:focus, .ds-select:focus, .ds-textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-tint);
}
.ds-hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.ds-field { margin-bottom: 16px; }

/* ------------------------------------------------------------------ nav --- */
.ds-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.ds-nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.ds-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 18px; letter-spacing: -0.02em; }
.ds-brand__mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--orange), var(--red));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800;
}
/* Rooman logo lockup (mark + wordmark + tagline). Native 1531x364 (~4.2:1). */
.ds-logo { height: 32px; width: auto; display: block; }
@media (min-width: 768px) { .ds-logo { height: 38px; } }
/* The wordmark is navy, so on dark backgrounds sit it on a white chip. */
.ds-logo--onDark {
  background: #fff; padding: 7px 12px; border-radius: var(--r-sm);
  height: 46px; box-sizing: content-box;
}
.ds-nav__links { display: none; gap: 26px; align-items: center; }
.ds-nav__links a { color: var(--body); font-size: 15px; font-weight: 500; }
.ds-nav__links a:hover { color: var(--navy); text-decoration: none; }
.ds-nav__cta { display: flex; align-items: center; gap: 10px; }
.ds-nav__cta .ds-btn { width: auto; padding: 10px 18px; font-size: 14.5px; }
@media (min-width: 900px) { .ds-nav__links { display: flex; } }
/* hide secondary CTA on very small screens to protect the primary action */
@media (max-width: 560px) { .ds-nav__cta .ds-hide-xs { display: none; } }

/* ---------------------------------------------------------------- footer -- */
.ds-footer { background: var(--navy-900); color: #C7D0E4; padding: 40px 0 28px; }
.ds-footer a { color: #C7D0E4; font-size: 14.5px; }
.ds-footer a:hover { color: #fff; }
.ds-footer__grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .ds-footer__grid { grid-template-columns: 2fr 1fr 1fr; gap: 40px; } }
.ds-footer__title { color: #fff; font-weight: 700; font-size: 14px; margin: 0 0 12px; letter-spacing: .02em; }
.ds-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ds-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 18px;
  font-size: 13px; color: #8E9AB8; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

/* ------------------------------------------------------------- utilities -- */
.ds-stack > * + * { margin-top: 12px; }
.ds-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ds-hide-sm { display: none; }
@media (min-width: 768px) { .ds-hide-sm { display: block; } }
.ds-divider { height: 1px; background: var(--line); border: 0; margin: 28px 0; }

/* Accessibility: visible focus for keyboard users */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.ds-skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--navy); padding: 10px 16px; z-index: 100; border-radius: 0 0 var(--r-sm) 0;
}
.ds-skip:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
