/* =========================================================
   Shubham Raut — AI Governance & ISO Implementation
   Shared stylesheet
   ========================================================= */

:root {
  /* Role-based tokens: flip between light/dark below.
     --charcoal   = primary text / "ink" accent elements
     --off-white  = page background
     --white      = elevated surface (cards)
     --slate      = secondary text
     --border     = hairlines, card borders */
  --charcoal: #1C1C1E;
  --off-white: #F7F5F1;
  --coral: #FF5436;
  --slate: #5C5C5C;
  --border: #E4E1DB;
  --white: #FFFFFF;

  /* Fixed tokens: same in both themes, used where a role token would
     invert incorrectly (e.g. white text sitting on a coral button, or
     the always-dark footer/CTA panels). */
  --ink: #1C1C1E;
  --ink-text: #F7F5F1;
  --ink-text-secondary: rgba(247, 245, 241, 0.72);
  --ink-text-tertiary: rgba(247, 245, 241, 0.5);
  --coral-text: #FFFFFF;
  --slate-solid: #5C5C5C;

  --header-bg: rgba(247, 245, 241, 0.92);
  --header-height: 76px;
  --radius: 10px;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
  --transition: 0.2s ease;
}

/* Dark theme overrides. data-theme is set on <html> by an inline
   head script (before first paint) based on saved preference or the
   OS setting, then flipped by the toggle button in main.js. */
:root[data-theme="dark"] {
  --charcoal: #ECEAE4;
  --off-white: #131315;
  --white: #1E1E21;
  --slate: #A6A39C;
  --border: #313134;

  --ink: #0B0B0C;
  --header-bg: rgba(19, 19, 21, 0.85);
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body, .site-header, .card, .profile-card, .status-tile, .doc-group,
.doc-row, .credential-tile, .lead-capture, .coming-soon, .timeline-step,
.tile, .pill-outline, .filter-btn, .lead-form input, .site-nav,
.theme-toggle, .btn {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--off-white);
  color: var(--charcoal);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p {
  color: var(--slate);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--tight {
  padding: 56px 0;
}

.bg-offwhite { background-color: var(--off-white); }
.bg-white { background-color: var(--white); }
.bg-charcoal {
  background-color: var(--ink);
  color: var(--ink-text);
}
.bg-charcoal h1, .bg-charcoal h2, .bg-charcoal h3 { color: var(--ink-text); }
.bg-charcoal p { color: var(--ink-text-secondary); }

.text-center { text-align: center; }

.measure {
  max-width: 720px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--coral);
  margin-bottom: 16px;
}

.eyebrow--slate { color: var(--slate); }

.lede {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--slate);
  max-width: 640px;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: filter var(--transition), transform var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--coral);
  color: var(--coral-text);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--charcoal);
  border-color: var(--charcoal);
}

.btn-secondary:hover {
  background-color: var(--charcoal);
  color: var(--white);
}

.btn-text {
  padding: 0;
  border-radius: 0;
  color: var(--coral);
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-text:hover {
  opacity: 0.75;
}

.btn-outline-coral {
  background-color: transparent;
  color: var(--coral);
  border-color: var(--coral);
  padding: 10px 20px;
  font-size: 0.88rem;
}

.btn-outline-coral:hover {
  background-color: var(--coral);
  color: var(--coral-text);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--charcoal);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--charcoal);
}

.theme-toggle:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

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

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--charcoal);
  transition: color var(--transition);
}

.site-nav a:not(.nav-cta):hover {
  color: var(--coral);
}

.site-nav a.active {
  color: var(--coral);
}

.nav-cta {
  background-color: var(--coral);
  color: var(--coral-text) !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius);
  transition: filter var(--transition), transform var(--transition);
}

.nav-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--charcoal);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--off-white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 24px 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav.open {
    max-height: 400px;
  }

  .site-nav a {
    width: 100%;
    padding: 12px 0;
  }

  .nav-cta {
    margin-top: 8px;
    text-align: center;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }
}

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

.site-footer {
  background-color: var(--ink);
  color: var(--ink-text);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-text);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a, .footer-contact a {
  color: var(--ink-text-secondary);
  font-size: 0.92rem;
  transition: color var(--transition);
}

.footer-nav a:hover, .footer-contact a:hover {
  color: var(--coral);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.footer-copy {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-text-tertiary);
  border-top: 1px solid rgba(247, 245, 241, 0.12);
  padding-top: 24px;
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

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

.hero {
  padding: 96px 0 88px;
  text-align: center;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero .lede {
  margin: 0 auto 40px;
}

.hero .btn-group {
  justify-content: center;
}

/* ---------- Icon badges ---------- */

.icon-badge {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--charcoal);
}

/* ---------- Card grid (three-up) ---------- */

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

.card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 32px;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
}

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

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

/* ---------- Framework tiles strip ---------- */

.tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
  background-color: transparent;
}

/* ---------- Status pill badges ---------- */

.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-coral {
  background-color: var(--coral);
  color: var(--coral-text);
}

.pill-slate {
  background-color: var(--slate-solid);
  color: var(--coral-text);
}

.pill-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--slate);
}

/* ---------- Section heading block ---------- */

.section-heading {
  margin-bottom: 48px;
}

.section-heading.text-center {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   Reference Build page
   ========================================================= */

.profile-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 8px 32px;
}

.profile-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-field {
  font-weight: 600;
  color: var(--charcoal);
  font-size: 0.92rem;
}

.profile-value {
  color: var(--slate);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .profile-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

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

.status-tile {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-tile-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--charcoal);
}

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

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

/* Document groups (collapsible) */

.doc-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--white);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 16px;
}

.doc-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: none;
  border: none;
  text-align: left;
}

.doc-group-header h3 {
  font-size: 1.05rem;
}

.doc-group-count {
  font-size: 0.82rem;
  color: var(--slate);
  font-weight: 500;
  margin-right: auto;
  margin-left: 12px;
}

.doc-group-chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--slate);
  border-bottom: 2px solid var(--slate);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.doc-group.open .doc-group-chevron {
  transform: rotate(-135deg);
}

.doc-group-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.doc-group.open .doc-group-body {
  max-height: 2400px;
}

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
}

.doc-row-text {
  flex: 1;
}

.doc-row-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.doc-row-desc {
  font-size: 0.88rem;
  color: var(--slate);
}

.doc-row-action {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.doc-row-action.available {
  color: var(--coral);
}

.doc-row-action.pending {
  color: var(--slate);
}

@media (max-width: 600px) {
  .doc-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* =========================================================
   Templates page
   ========================================================= */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--charcoal);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.filter-btn:hover {
  border-color: var(--coral);
}

.filter-btn.active {
  background-color: var(--coral);
  border-color: var(--coral);
  color: var(--coral-text);
}

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

.template-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tag-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--coral);
  border: 1px solid var(--coral);
  border-radius: 999px;
  padding: 4px 12px;
}

.template-card p {
  font-size: 0.92rem;
  flex: 1;
}

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

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

/* Lead capture */

.lead-capture {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 48px;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}

.lead-form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.lead-form input[type="email"] {
  flex: 1;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  background-color: var(--off-white);
  color: var(--charcoal);
}

.lead-form input[type="email"]:focus {
  outline: none;
  border-color: var(--coral);
}

@media (max-width: 500px) {
  .lead-form {
    flex-direction: column;
  }
  .lead-capture {
    padding: 32px 24px;
  }
}

/* =========================================================
   Playbooks page
   ========================================================= */

.playbook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.playbook-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.playbook-card p {
  font-size: 0.95rem;
}

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

.timeline {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.timeline-step {
  flex: 1;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-week {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--coral);
}

.timeline-bar {
  height: 6px;
  border-radius: 3px;
  background-color: var(--charcoal);
}

.timeline-phase {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--slate);
}

@media (max-width: 900px) {
  .timeline {
    flex-direction: column;
  }
}

/* =========================================================
   Wizard page
   ========================================================= */

.feature-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.feature-point {
  text-align: left;
}

.feature-marker {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--coral);
  margin-bottom: 16px;
}

.feature-point h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.feature-point p {
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .feature-points { grid-template-columns: 1fr; }
}

.coming-soon {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 56px 40px;
  text-align: center;
  max-width: 620px;
  margin: 56px auto 0;
}

.coming-soon p {
  max-width: 460px;
  margin: 16px auto 28px;
}

/* =========================================================
   About page
   ========================================================= */

.bio p {
  margin-bottom: 20px;
  font-size: 1rem;
}

.credentials-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.credential-tile {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
}

.credential-tile.emphasis {
  border-left: 3px solid var(--coral);
  color: var(--coral);
}

@media (max-width: 900px) {
  .credentials-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .credentials-strip { grid-template-columns: 1fr; }
}

.contact-block {
  text-align: center;
}

.contact-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 32px;
}

.contact-items a:not(.btn) {
  font-weight: 600;
  color: var(--ink-text);
  border-bottom: 1px solid rgba(247, 245, 241, 0.4);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}

.contact-items a:not(.btn):hover {
  color: var(--coral);
  border-color: var(--coral);
}

/* ---------- Responsive base overrides ---------- */

@media (max-width: 720px) {
  .section { padding: 48px 0; }
  .section--tight { padding: 40px 0; }
  .hero { padding: 56px 0 48px; }
  .profile-card { padding: 4px 24px; }
}
