/* ==========================================================================
   REALSME.IN — Version 1
   REALSME Solutions Pvt Ltd — The Thinking Layer
   Pure HTML + CSS implementation per Developer-Ready Specification V1
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --realsme-orange: #B7642D;
  --realsme-charcoal: #2F3133;
  --surface-warm: #F6F2EB;
  --surface-ivory: #FBF8F2;
  --text-mid: #62676B;
  --line-soft: #D9CDBE;
  /* WCAG AA text-safe variants of the brand orange (graphics keep #B7642D) */
  --orange-text: #A0561F;      /* on light surfaces */
  --orange-text-dark: #E8A16B; /* on dark surfaces */

  --font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-label: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Source Sans 3", "Aptos", "Segoe UI", Arial, sans-serif;

  --container: 1200px;
  --section-y: 104px;
  --section-y-mobile: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--realsme-charcoal);
  background: var(--surface-ivory);
}

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

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; margin: 0 0 0.6em; }

h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -0.005em; max-width: 22ch; }
h3 { font-family: var(--font-label); font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--orange-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--realsme-orange);
  outline-offset: 3px;
  border-radius: 2px;
}

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

@media (min-width: 900px) {
  .container { padding-inline: 56px; }
}

/* Long-form measure */
.col-main p { max-width: 62ch; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--realsme-charcoal);
  color: #fff;
  padding: 10px 18px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Shared pieces ---------- */
.eyebrow {
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-text);
  margin-bottom: 14px;
}

.statement {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--realsme-charcoal);
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 1.6em;
}
.statement.centered { justify-content: center; margin-top: 2.5em; }

.dash {
  display: inline-block;
  width: 34px;
  height: 3px;
  background: var(--realsme-orange);
  flex: none;
  transform: translateY(-4px);
}

.side-note {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--realsme-charcoal);
}
.side-note .dash { display: block; margin-top: 12px; }

.vertical-rule { border-left: 2px solid var(--line-soft); padding-left: 22px; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn::after { content: "\2192"; margin-left: 10px; }

.btn-primary {
  background: var(--orange-text);
  color: #fff;
  border: 1.5px solid var(--orange-text);
}
.btn-primary:hover { background: #8A4817; border-color: #8A4817; }

.btn-quiet {
  color: var(--realsme-charcoal);
  padding: 13px 8px;
  border-radius: 0;
  border-bottom: 2px solid var(--realsme-orange);
}
.btn-quiet::after { content: ""; margin: 0; }
.btn-quiet:hover { color: var(--orange-text); }

.btn-outline-light {
  color: var(--surface-ivory);
  border: 1.5px solid var(--realsme-orange);
  background: transparent;
}
.btn-outline-light:hover { background: var(--realsme-orange); color: #fff; }

/* ---------- 01 Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-ivory);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { width: 150px; height: auto; display: block; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-family: var(--font-label);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--realsme-charcoal);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--orange-text);
  border-bottom-color: var(--realsme-orange);
}

.header-motto {
  display: none;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-mid);
  margin: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line-soft);
  flex: none;
}

/* Hamburger (pure CSS, checkbox is the focusable control) */
.nav-toggle {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
  margin: 0 0 0 auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 60;
}
.nav-toggle-icon {
  display: none;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  pointer-events: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.nav-toggle-icon span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--realsme-charcoal);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

@media (min-width: 981px) {
  .header-inner { min-height: 86px; }
  .header-motto { display: block; }
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-toggle-icon { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-ivory);
    border-bottom: 1px solid var(--line-soft);
    display: none;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .site-nav li + li { border-top: 1px solid var(--line-soft); }
  .site-nav a {
    display: block;
    padding: 14px 2px;
    font-size: 0.95rem;
    border-bottom: none;
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .nav-toggle:checked + .nav-toggle-icon span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-icon span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-toggle-icon span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
}

/* ---------- Sections (shared) ---------- */
.section { padding-block: var(--section-y-mobile); }
@media (min-width: 900px) { .section { padding-block: var(--section-y); } }

.band-warm { background: var(--surface-warm); }

.band-dark {
  background: var(--realsme-charcoal);
  color: var(--surface-ivory);
}
.band-dark .eyebrow { color: var(--orange-text-dark); }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark p { color: #E4E0D8; }
.band-dark a { color: #E8A16B; }

.two-col { display: grid; gap: 44px; }
@media (min-width: 900px) {
  .two-col {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 80px;
    align-items: start;
  }
}

.section-head { margin-bottom: 40px; }
.section-head-narrow { max-width: 640px; margin-bottom: 48px; }

/* ---------- 02 Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--surface-ivory) 0%, var(--surface-warm) 100%);
  padding-block: 56px 72px;
}
@media (min-width: 900px) { .hero { padding-block: 88px 112px; } }

.hero-inner { display: grid; gap: 48px; }
@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 72px;
    align-items: center;
  }
}

.hero-copy p { max-width: 56ch; }
.hero-emphasis {
  font-weight: 600;
  color: var(--realsme-charcoal);
  border-left: 3px solid var(--realsme-orange);
  padding-left: 16px;
  margin-top: 1.4em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  margin-top: 34px;
}

.hero-visual { text-align: center; }
.hero-visual svg { width: min(100%, 400px); height: auto; }
.hero-note {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--realsme-charcoal);
  margin-top: 8px;
}
.hero-note::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--realsme-orange);
  margin: 14px auto 0;
}

/* ---------- 03 Thinking Layer ---------- */
.diagnostic svg { width: 100%; max-width: 300px; height: auto; }
.diagnostic { margin: 0 0 20px; }

#thinking-layer .col-side {
  border-left: none;
}
@media (min-width: 900px) {
  #thinking-layer .col-side {
    border-left: 1px solid var(--line-soft);
    padding-left: 48px;
    padding-top: 12px;
  }
}

/* ---------- 04 The Individual First ---------- */
.roles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 36px 0;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .roles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .roles { grid-template-columns: repeat(4, 1fr); } }

.roles li {
  text-align: center;
  padding: 8px 26px 0;
}
@media (min-width: 560px) {
  .roles li { border-left: 1px solid var(--line-soft); }
  .roles li:first-child { border-left: none; }
}
@media (min-width: 560px) and (max-width: 979px) {
  .roles li:nth-child(3) { border-left: none; }
}

.role-icon { display: inline-block; width: 52px; height: 52px; margin-bottom: 12px; }
.role-icon svg { width: 100%; height: 100%; }

.roles h3 { margin-bottom: 8px; }
.roles p { font-size: 0.95rem; color: var(--text-mid); }

.roles-footnote {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-mid);
  max-width: 70ch;
}

/* ---------- 05 How We Think ---------- */
.think-sequence {
  list-style: none;
  counter-reset: think;
  margin: 0 0 26px;
  padding: 0;
}
.think-sequence li {
  counter-increment: think;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  padding: 14px 0 14px 54px;
  position: relative;
  border-bottom: 1px solid var(--line-soft);
}
.think-sequence li:last-child { border-bottom: none; }
.think-sequence li::before {
  content: counter(think, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--orange-text);
}
#how-we-think .side-note { font-size: 1rem; color: var(--text-mid); }

/* ---------- 06 Method ---------- */
.method-motif { text-align: center; }
.method-motif svg { width: min(100%, 300px); height: auto; }
.band-dark .btn { margin-top: 10px; }

/* ---------- 07 Situations ---------- */
.situations {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 64px;
}
@media (min-width: 820px) { .situations { grid-template-columns: 1fr 1fr; } }

.situations li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}
.sit-icon { flex: none; width: 30px; height: 30px; margin-top: 2px; }
.sit-icon svg { width: 100%; height: 100%; }

.situations-footnote {
  margin-top: 36px;
  color: var(--text-mid);
  font-style: italic;
  max-width: 70ch;
}

/* ---------- 08 Thinking and Doing ---------- */
.layers-compare {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .layers-compare { grid-template-columns: 1fr 1fr; gap: 40px; } }

.layer-card {
  background: var(--surface-ivory);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--line-soft);
  padding: 34px 34px 30px;
}
.layer-card.layer-thinking { border-top-color: var(--realsme-orange); }

.layer-name {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.layer-name span { color: var(--orange-text); }
.layer-card:not(.layer-thinking) .layer-name span { color: var(--text-mid); }

.layer-role {
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 16px;
}
.layer-thinking .layer-role { color: var(--orange-text); }
.layer-card p:last-child { color: var(--text-mid); }

.compare-footnote { margin-top: 32px; max-width: 70ch; }

/* ---------- 09 Ecosystem ---------- */
.ecosystem {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 980px) {
  .ecosystem { grid-template-columns: repeat(5, 1fr); gap: 0; }
}

.ecosystem li { position: relative; }

.ecosystem a, .eco-inner {
  display: block;
  height: 100%;
  padding: 22px 20px 20px;
  border: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--realsme-charcoal);
  background: var(--surface-ivory);
  transition: background-color 0.2s ease;
}
@media (min-width: 980px) {
  .ecosystem li + li a, .ecosystem li + li .eco-inner { border-left: none; }
}
.ecosystem a:hover { background: var(--surface-warm); }

.eco-name {
  display: block;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.eco-role {
  display: block;
  font-size: 0.82rem;
  color: var(--text-mid);
}
.eco-current .eco-inner {
  background: var(--realsme-charcoal);
  border-color: var(--realsme-charcoal);
}
.eco-current .eco-name { color: #fff; }
.eco-current .eco-role { color: #D8D4CC; }
.eco-here {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-text-dark);
  border-top: 2px solid var(--realsme-orange);
  padding-top: 6px;
}

/* ---------- 10 Contact ---------- */
.contact .contact-details {
  border-left: none;
  padding-top: 8px;
}
@media (min-width: 900px) {
  .contact .contact-details {
    border-left: 1px solid rgba(251, 248, 242, 0.25);
    padding-left: 48px;
  }
}
.contact-org {
  font-family: var(--font-label);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}
.contact address { font-style: normal; margin-bottom: 18px; color: #E4E0D8; line-height: 1.7; }
.contact-line { color: #E4E0D8; }
.email-btn::after { content: ""; margin: 0; }

/* ---------- 11 Footer ---------- */
.site-footer {
  background: #26282A;
  color: #C9C5BD;
  font-size: 0.92rem;
}
.footer-inner {
  display: grid;
  gap: 40px;
  padding-block: 56px 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .footer-inner { grid-template-columns: 2fr 1.5fr 1fr; gap: 64px; }
}

.footer-name {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 2px;
}
.footer-tag {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-text-dark);
  margin-bottom: 16px;
}
.footer-motto { font-family: var(--font-heading); font-style: italic; color: #A8A49C; }

.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 6px 0; }
.footer-links a {
  color: #E4E0D8;
  text-decoration: none;
  font-family: var(--font-label);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.footer-links a span { color: #8E8A82; font-family: var(--font-body); letter-spacing: 0; }
.footer-links a:hover { color: var(--orange-text-dark); text-decoration: underline; text-underline-offset: 4px; }

.footer-legal {
  border-top: 1px solid rgba(251, 248, 242, 0.14);
  padding-block: 22px;
}
.footer-legal p { margin: 0; font-size: 0.85rem; color: #A8A49C; }
