/*
 * ============================================================
 *  sumit-brand.css
 *  Sensory App House / SumIt — Shared Brand Styles
 *  Version 1.0 (modelled on readablebrand.css, boards style)
 *
 *  HOW TO USE:
 *  1. Add the Poppins font link in your <head> BEFORE this stylesheet:
 *     <link rel="preconnect" href="https://fonts.googleapis.com">
 *     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 *     <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
 *
 *  2. Link this file:
 *     <link rel="stylesheet" href="sumit-brand.css">
 *
 *  3. Add a page-specific <style> block for unique elements
 *     (hero gradients, page-specific layouts, etc.)
 * ============================================================
 */

/* ---------- 1. CSS Variables (brand tokens) ---------- */
:root {
  /* Brand palette — matches sensoryreadable.com & boards.sensoryapphouse.com */
  --brand-indigo:   #6e68ca;   /* Nav background, accents, eyebrow */
  --title-indigo:   #3d31be;   /* Headings, CTAs, step numbers */
  --brand-sky:      #b8ddff;   /* Section backgrounds, card borders, trust strip */
  --brand-lavender: #e3c7ff;   /* Footer background, soft accents */

  /* Supporting tones */
  --indigo-tint:    #f4f3ff;   /* Very pale lavender wash */
  --sky-pale:       #eaf4ff;   /* Very pale sky wash */
  --surface:        #ffffff;
  --surface-alt:    #f7f9fc;
  --border-soft:    #e6ecf4;
  --border-card:    #d9e6f7;
  --body-text:      #1d1d1f;
  --muted:          #5b6275;

  /* Layout */
  --radius-sm:      8px;
  --radius:         12px;
  --radius-lg:      18px;
  --shadow-sm:      0 2px 8px rgba(61, 49, 190, 0.06);
  --shadow:         0 8px 24px rgba(61, 49, 190, 0.08);
  --shadow-lg:      0 20px 48px rgba(61, 49, 190, 0.12);

  --container:      1140px;
  --container-text: 800px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--body-text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--title-indigo);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--brand-indigo); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--title-indigo);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- 3. Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--title-indigo);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  text-decoration: none;
  z-index: 1000;
}
.skip-link:focus {
  top: 0;
  color: #fff;
  text-decoration: none;
}

/* ---------- 4. Sticky nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.site-nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--title-indigo);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-indigo), var(--title-indigo));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.brand-name { line-height: 1.1; }
.brand-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.nav-links a {
  display: inline-block;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: var(--body-text);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-links a:hover { background: var(--indigo-tint); color: var(--title-indigo); text-decoration: none; }
.nav-links .nav-cta {
  background: var(--title-indigo);
  color: #fff;
  font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--brand-indigo); color: #fff; }

@media (max-width: 720px) {
  .nav-links a { padding: 0.5rem 0.65rem; font-size: 0.9rem; }
  .brand-sub { display: none; }
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  min-height: 44px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--title-indigo);
  color: #fff;
  box-shadow: 0 4px 12px rgba(61, 49, 190, 0.25);
}
.btn-primary:hover { background: var(--brand-indigo); color: #fff; box-shadow: 0 8px 20px rgba(61, 49, 190, 0.32); }
.btn-secondary {
  background: var(--surface);
  color: var(--title-indigo);
  border-color: var(--brand-sky);
}
.btn-secondary:hover { background: var(--sky-pale); color: var(--title-indigo); border-color: var(--brand-indigo); }
.btn-ghost {
  background: transparent;
  color: var(--title-indigo);
  border-color: transparent;
  padding: 0.6rem 1rem;
}
.btn-ghost:hover { background: var(--indigo-tint); color: var(--title-indigo); }

/* ---------- 6. Layout containers ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-text {
  max-width: var(--container-text);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- 7. Section pattern ---------- */
.section {
  padding: 4.5rem 0;
}
.section-tinted { background: var(--sky-pale); }
.section-soft   { background: var(--indigo-tint); }
.section-alt    { background: var(--surface-alt); }

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-indigo);
  margin: 0 0 0.65rem;
  padding: 0.3rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--brand-sky);
  border-radius: 99px;
}
.section-tinted .section-eyebrow { background: var(--surface); }

h1, h2, h3, h4 {
  color: var(--title-indigo);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

.section-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 2.5rem;
}

/* ---------- 8. Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--brand-indigo);
}
.card h3 { color: var(--title-indigo); margin-top: 0; }
.card p { color: var(--muted); margin: 0.4rem 0 0; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--indigo-tint);
  border: 1px solid var(--brand-sky);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.9rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ---------- 9. Trust strip (under hero) ---------- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}
.trust-strip li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--title-indigo);
  font-weight: 500;
  font-size: 0.95rem;
}
.trust-strip li::before {
  content: '✓';
  color: var(--brand-indigo);
  font-weight: 800;
}

/* ---------- 10. Step list ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  position: relative;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-indigo), var(--title-indigo));
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.steps h3 { margin-top: 0; }
.steps p { margin: 0.3rem 0 0; color: var(--muted); }

/* ---------- 11. Code & keyboard ---------- */
code {
  background: var(--indigo-tint);
  border: 1px solid var(--border-soft);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  color: var(--title-indigo);
}
.kbd {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.1em 0.5em;
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--title-indigo);
}

/* ---------- 12. Tables ---------- */
table.brand-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
table.brand-table th,
table.brand-table td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
  vertical-align: top;
}
table.brand-table tr:last-child td { border-bottom: 0; }
table.brand-table th {
  background: var(--indigo-tint);
  color: var(--title-indigo);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

/* ---------- 13. Figure ---------- */
.brand-figure {
  margin: 1.25rem 0;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  background: var(--sky-pale);
  padding: 0.6rem;
  box-shadow: var(--shadow-sm);
}
.brand-figure img {
  display: block;
  width: 100%;
  border-radius: 8px;
  background: var(--surface);
}
.brand-figure figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.5rem 0.4rem 0.2rem;
  text-align: center;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--brand-lavender);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  color: var(--body-text);
}
.site-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 720px) {
  .site-footer-inner {
    grid-template-columns: auto 1fr auto;
    text-align: left;
    align-items: center;
  }
}
.site-footer .brand-name { color: var(--title-indigo); font-weight: 800; font-size: 1.15rem; }
.site-footer p { margin: 0.3rem 0; }
.site-footer a { color: var(--title-indigo); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; justify-content: center; }
@media (min-width: 720px) { .footer-links { justify-content: flex-end; } }
.footer-copy {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(61, 49, 190, 0.12);
  padding-top: 1rem;
}

/* ---------- 15. Back link (used on sub-pages) ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  color: var(--title-indigo);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.back-link:hover { background: var(--sky-pale); border-color: var(--brand-indigo); text-decoration: none; }

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

/* ---------- 17. Universal access icon ---------- */
/* Inline SVG via data-url. Scales with parent font-size, coloured brand-indigo. */
/* Replaces the wheelchair (♿) symbol with the broader "person in circle" icon  */
/* used by Apple/Google/Microsoft for general accessibility settings.            */
.icon-access {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e68ca' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='7' r='1.4' fill='%236e68ca'/%3E%3Cpath d='M7 11h10'/%3E%3Cpath d='M12 11v3.5'/%3E%3Cpath d='M12 14.5l-3 4.5'/%3E%3Cpath d='M12 14.5l3 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
