/* global.css
   Site tokens, base reset, typography, layout primitives, and accessibility defaults.
   Source: assets/css/ss.css migration split. */

/* =========================
   Sensei Sandy Design System
========================= */

/* =========================
   0) TOKENS
========================= */
:root {
  --ss-orange: #E05500;
  --ss-teal: #289FA1;
  --ss-cyan: #00DDE0;
  --ss-brown: #8B522E;
  --ss-slate: #306061;
  --ss-ink: #362B24;

  --ss-bg: #FBFAF8;
  --ss-surface: #FFFFFF;
  --ss-surface2: #F4F1ED;
  --ss-text: #1F1712;
  --ss-muted: #4F433C;
  --ss-border: rgba(54, 43, 36, 0.14);

  --ss-radius: 18px;
  --ss-radius-sm: 12px;
  --ss-radius-lg: 24px;
  --ss-radius-1: 14px;
  --ss-radius-2: 20px;
  --ss-shadow: 0 12px 30px rgba(31, 23, 18, 0.10);
  --ss-shadow-soft: 0 8px 22px rgba(31, 23, 18, 0.08);
  --ss-shadow-1: 0 10px 30px rgba(31, 23, 18, 0.08);
  --ss-shadow-2: 0 18px 55px rgba(31, 23, 18, 0.10);
  --ss-ring: 0 0 0 4px rgba(0, 221, 224, 0.22);

  --ss-max: 1040px;
  --ss-pad: clamp(16px, 3vw, 28px);
  --ss-pad-x: var(--ss-pad);
  --ss-pad-y: clamp(24px, 4vw, 56px);
  --ss-s1: 8px;
  --ss-s2: 16px;
  --ss-s3: 24px;
  --ss-s4: 32px;
  --ss-stack: clamp(12px, 2.2vw, 20px);
  --ss-prose: 68ch;
  --ss-text-max: var(--ss-prose);

  --ss-cta: var(--ss-teal);
  --ss-cta-hover: var(--ss-slate);
  --ss-focus: rgba(0, 221, 224, 0.45);
}

/* Sensei Sandy BJJ global logo system */
:root {
  --ss-logo-nav-size: 52px;
  --ss-logo-nav-size-mobile: 44px;
  --ss-logo-footer-size: 72px;
}

.ss-nav .ssbjj-brand,
.ss-footer .ssbjj-footer-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 0.625rem;
  color: var(--ss-text, var(--ss-ink, #362B24));
  text-decoration: none;
  text-align: left;
}

.ss-nav .ssbjj-brand:hover,
.ss-footer .ssbjj-footer-brand:hover {
  color: var(--ss-teal, #289FA1);
  text-decoration: none;
}

.ss-nav .ssbjj-brand picture {
  display: inline-flex;
  flex: 0 0 auto;
}

.ss-nav .ssbjj-brand__logo,
.ss-footer .ssbjj-footer-brand__logo {
  object-fit: contain;
  flex: 0 0 auto;
  margin: 0;
}

.ss-nav .ssbjj-brand__logo {
  width: var(--ss-logo-nav-size);
  height: var(--ss-logo-nav-size);
}

.ssbjj-brand__name {
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.05;
}

.ss-footer .ssbjj-footer-brand__logo {
  width: var(--ss-logo-footer-size);
  height: var(--ss-logo-footer-size);
}

.ss-footer .ssbjj-footer-brand {
  margin-bottom: 0.75rem;
}

@media (max-width: 767.98px) {
  .ss-nav .ssbjj-brand {
    gap: 0.5rem;
    width: auto;
    max-width: 100%;
  }

  .ss-nav .ssbjj-brand__logo {
    width: var(--ss-logo-nav-size-mobile);
    height: var(--ss-logo-nav-size-mobile);
  }

  .ss-nav .ssbjj-brand__name {
    max-width: 11rem;
    font-size: 0.95rem;
  }
}

/* =========================
   1) BASE / RESET
========================= */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ss-bg);
  color: var(--ss-text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
p {
  color: var(--ss-muted);
  line-height: 1.65;
  margin-bottom: 0.9rem;
  max-width: var(--ss-prose);
}
h1, h2, h3, h4, h5, h6 { color: var(--ss-text); letter-spacing: -0.015em; }
h1 { line-height: 1.12; margin-bottom: 0.7rem; }
h2 { line-height: 1.18; margin-bottom: 0.65rem; }
ul, ol { margin-bottom: 0.9rem; }
li { margin-bottom: 0.35rem; }
img { max-width: 100%; height: auto; }
a { color: var(--ss-teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ss-slate); }
hr { border-color: var(--ss-border); opacity: 1; }
:focus-visible {
  outline: 3px solid var(--ss-focus);
  outline-offset: 2px;
}

/* =========================
   2) LAYOUT PRIMITIVES
========================= */
.ss-container {
  max-width: var(--ss-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--ss-pad);
  padding-right: var(--ss-pad);
  width: 100%;
}
.ss-section { padding-block: var(--ss-s4, var(--ss-pad-y)); }
.ss-stack > * + * { margin-top: var(--ss-s2); }
.ss-prose { max-width: var(--ss-text-max); }
@media (min-width: 900px) {
  .ss-stack > * + * { margin-top: var(--ss-s3); }
}
.ss-prose h1,
.ss-prose h2,
.ss-prose h3 { margin-top: 1.6em; }
.ss-prose h1 + *,
.ss-prose h2 + *,
.ss-prose h3 + * { margin-top: 0.6em; }

/* =========================
   3) EXTENDED ORDER UTILITIES
   Bootstrap 5 only provides order-0 … order-5.
   These extend the set so flex-ordered page sections work beyond 5.
========================= */
.order-6 { order: 6 !important; }
.order-7 { order: 7 !important; }
.order-8 { order: 8 !important; }

/* =========================
   Global Final CTA + Footer
========================= */

.ss-global-final-cta {
  padding: clamp(2rem, 4vw, 3rem) 0;
  background: var(--ss-bg);
}

.ss-global-final-cta__card {
  border: 1px solid var(--ss-border);
  border-radius: 1.5rem;
  background: var(--ss-surface);
  box-shadow: 0 18px 44px rgba(54, 43, 36, 0.08);
  padding: clamp(1.25rem, 4vw, 2.25rem);
}

.ss-global-final-cta__eyebrow {
  margin: 0 0 0.45rem;
  color: var(--ss-orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ss-global-final-cta__card h2 {
  max-width: 48rem;
  margin: 0;
  color: var(--ss-ink);
  font-size: clamp(1.65rem, 4vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.ss-global-final-cta__copy {
  max-width: 42rem;
  margin: 0.85rem 0 0;
  color: var(--ss-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.ss-global-final-cta__actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.ss-global-btn {
  min-height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.ss-global-btn--primary {
  background: var(--ss-orange);
  border: 1px solid var(--ss-orange);
  color: #fff;
}

.ss-global-btn--primary:hover,
.ss-global-btn--primary:focus-visible {
  background: #c94c00;
  border-color: #c94c00;
  color: #fff;
}

.ss-global-btn--soft {
  background: #fff;
  border: 1px solid var(--ss-border);
  color: var(--ss-ink);
}

.ss-global-btn--soft:hover,
.ss-global-btn--soft:focus-visible {
  background: var(--ss-surface2);
  color: var(--ss-orange);
}

.ss-global-btn--link {
  color: var(--ss-ink);
}

.ss-global-btn--link:hover,
.ss-global-btn--link:focus-visible {
  color: var(--ss-orange);
}

.ss-site-footer {
  background: linear-gradient(180deg, var(--ss-bg), var(--ss-surface2));
  border-top: 1px solid var(--ss-border);
  padding: 2rem 0 6.25rem;
  padding-bottom: calc(6.25rem + env(safe-area-inset-bottom));
}

.ss-footer-card {
  display: grid;
  gap: 1rem;
}

.ss-footer-brand,
.ss-footer-group {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--ss-border);
  border-radius: 1.25rem;
  box-shadow: 0 12px 30px rgba(54, 43, 36, 0.06);
}

.ss-footer-brand {
  padding: 1.2rem;
}

.ss-footer-logo {
  display: inline-flex;
  color: var(--ss-ink);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.ss-footer-logo:hover,
.ss-footer-logo:focus-visible {
  color: var(--ss-orange);
}

.ss-footer-tagline {
  max-width: 34rem;
  margin: 0.55rem 0 0;
  color: var(--ss-text);
  font-weight: 800;
  line-height: 1.35;
}

.ss-footer-address {
  margin: 0.85rem 0 0;
  color: var(--ss-muted);
  font-style: normal;
  line-height: 1.45;
}

.ss-footer-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.ss-footer-proof span {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  background: var(--ss-surface2);
  color: var(--ss-ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.ss-footer-nav {
  display: grid;
  gap: 0.75rem;
}

.ss-footer-group {
  padding: 0.15rem 1rem;
}

.ss-footer-group summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ss-ink);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.ss-footer-group summary::-webkit-details-marker {
  display: none;
}

.ss-footer-group summary::after {
  content: "+";
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-left: 0.75rem;
  border-radius: 999px;
  background: var(--ss-surface2);
  color: var(--ss-orange);
  font-weight: 900;
}

.ss-footer-group[open] summary::after {
  content: "-";
}

.ss-footer-group ul {
  display: grid;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0.85rem;
}

.ss-footer-group a {
  min-height: 42px;
  display: flex;
  align-items: center;
  border-radius: 0.75rem;
  color: var(--ss-muted);
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.ss-footer-group a:hover,
.ss-footer-group a:focus-visible {
  color: var(--ss-orange);
}

.ss-footer-bottom {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
  color: var(--ss-muted);
  font-size: 0.92rem;
}

.ss-footer-bottom p {
  margin: 0;
}

.ss-footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.ss-footer-contact a {
  color: var(--ss-ink);
  font-weight: 900;
  text-decoration: none;
}

.ss-footer-contact a:hover,
.ss-footer-contact a:focus-visible {
  color: var(--ss-orange);
}

.ss-mobile-actionbar {
  position: fixed;
  z-index: 1050;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.65rem;
  inset-block-end: calc(0.65rem + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 0.95fr;
  gap: 0.45rem;
  padding: 0.45rem;
  border: 1px solid rgba(54, 43, 36, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(31, 23, 18, 0.18);
  backdrop-filter: blur(14px);
}

.ss-mobile-actionbar a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ss-ink);
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.ss-mobile-actionbar .ss-action-primary {
  background: var(--ss-orange);
  color: #fff;
}

.ss-global-btn:focus-visible,
.ss-footer-logo:focus-visible,
.ss-footer-group summary:focus-visible,
.ss-footer-group a:focus-visible,
.ss-footer-contact a:focus-visible,
.ss-mobile-actionbar a:focus-visible {
  outline: 3px solid rgba(0, 221, 224, 0.7);
  outline-offset: 3px;
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: 76px;
    padding-block-end: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 576px) {
  .ss-global-final-cta__actions {
    grid-template-columns: auto auto auto;
    justify-content: start;
    align-items: center;
  }
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
    padding-block-end: 0;
  }

  .ss-site-footer {
    padding: 3rem 0 1.5rem;
  }

  .ss-footer-card {
    grid-template-columns: 1.1fr 1.6fr;
    align-items: stretch;
  }

  .ss-footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .ss-footer-group {
    padding: 1rem;
  }

  .ss-footer-group summary {
    min-height: auto;
    margin-bottom: 0.75rem;
    cursor: default;
    pointer-events: none;
  }

  .ss-footer-group summary::after {
    display: none;
  }

  .ss-footer-group ul {
    padding-bottom: 0;
  }

  .ss-footer-bottom {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .ss-mobile-actionbar {
    display: none;
  }
}

@media (min-width: 1100px) {
  .ss-footer-card {
    grid-template-columns: 0.9fr 2fr;
  }

  .ss-footer-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ss-footer-brand {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ss-mobile-actionbar,
  .ss-footer-brand,
  .ss-footer-group,
  .ss-global-final-cta__card {
    transition: none;
  }
}

@media print {
  .ss-mobile-actionbar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* Contextual internal link styling */
.ss-context-link {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background-color: var(--ss-surface2, #f4f1ed);
  border-left: 4px solid var(--ss-orange, #e05500);
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ss-muted, #4f433c);
  text-align: left;
}

.ss-context-link a {
  color: var(--ss-teal, #289fa1);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.ss-context-link a:hover,
.ss-context-link a:focus-visible {
  color: var(--ss-orange, #e05500);
}
