/* ================================================================
   Kirk's Elite Karate — Utility CSS
   Replaces cdn.tailwindcss.com (sovereignty: self-hosted).
   All class names and values derived from Tailwind CSS v3 spec.
   ================================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { line-height: 1.5; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
iframe { border: none; }

/* ── Custom Properties ── */
:root {
  --red-600:    #dc2626;
  --slate-50:   #f8fafc;
  --slate-100:  #f1f5f9;
  --slate-200:  #e2e8f0;
  --slate-400:  #94a3b8;
  --slate-500:  #64748b;
  --slate-600:  #475569;
  --slate-700:  #334155;
  --slate-900:  #0f172a;
}

/* ── Display ── */
.block        { display: block; }
.inline-block { display: inline-block; }
.flex         { display: flex; }
.grid         { display: grid; }
.hidden       { display: none; }
.table        { display: table; }

/* ── Position ── */
.relative { position: relative; }
.sticky   { position: sticky; }
.top-0    { top: 0; }
.z-50     { z-index: 50; }

/* ── Overflow ── */
.overflow-hidden { overflow: hidden; }

/* ── Layout — Container ── */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: 1280px;
}
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Flex helpers ── */
.flex-wrap      { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-start   { justify-content: flex-start; }
.items-center    { align-items: center; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-8 > * + * { margin-left: 2rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }

/* ── Grid helpers ── */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* ── Ordering ── */
.order-1 { order: 1; }
.order-2 { order: 2; }

/* ── Sizing ── */
.w-full  { width: 100%; }
.h-full  { height: 100%; }
.h-auto  { height: auto; }
.w-6     { width: 1.5rem; }
.h-6     { height: 1.5rem; }
.w-14    { width: 3.5rem; }
.h-14    { height: 3.5rem; }
.h-80    { height: 20rem; }
.h-96    { height: 24rem; }

.max-w-sm  { max-width: 24rem; }
.max-w-lg  { max-width: 32rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }

/* ── Padding ── */
.p-2  { padding: 0.5rem; }
.p-8  { padding: 2rem; }
.px-4  { padding-left: 1rem;  padding-right: 1rem; }
.px-6  { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8  { padding-left: 2rem;  padding-right: 2rem; }
.px-12 { padding-left: 3rem;  padding-right: 3rem; }
.py-2  { padding-top: 0.5rem;  padding-bottom: 0.5rem; }
.py-4  { padding-top: 1rem;    padding-bottom: 1rem; }
.py-5  { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-12 { padding-top: 3rem;    padding-bottom: 3rem; }
.py-24 { padding-top: 6rem;    padding-bottom: 6rem; }
.pt-2  { padding-top: 0.5rem; }
.pt-10 { padding-top: 2.5rem; }
.pb-4  { padding-bottom: 1rem; }
.pb-20 { padding-bottom: 5rem; }

/* ── Margin ── */
.mb-2  { margin-bottom: 0.5rem; }
.mb-3  { margin-bottom: 0.75rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-4  { margin-top: 1rem; }

/* ── Typography — sizes ── */
.text-\[9px\]  { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-xs   { font-size: 0.75rem;  line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem;     line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem;  line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem;  line-height: 2.5rem; }
.text-5xl  { font-size: 3rem;     line-height: 1; }
.text-6xl  { font-size: 3.75rem;  line-height: 1; }
.text-8xl  { font-size: 6rem;     line-height: 1; }

/* ── Typography — style ── */
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }
.italic      { font-style: italic; }
.uppercase   { text-transform: uppercase; }
.text-left   { text-align: left; }
.text-center { text-align: center; }
.break-all   { word-break: break-all; }

/* ── Leading ── */
.leading-none     { line-height: 1; }
.leading-relaxed  { line-height: 1.625; }
.leading-\[0\.85\] { line-height: 0.85; }

/* ── Tracking ── */
.tracking-tighter   { letter-spacing: -0.05em; }
.tracking-tight     { letter-spacing: -0.025em; }
.tracking-wide      { letter-spacing: 0.025em; }
.tracking-widest    { letter-spacing: 0.1em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.3em\] { letter-spacing: 0.3em; }
.tracking-\[0\.5em\] { letter-spacing: 0.5em; }
.tracking-\[0\.6em\] { letter-spacing: 0.6em; }

/* ── Underline ── */
.underline            { text-decoration-line: underline; }
.decoration-slate-200 { text-decoration-color: var(--slate-200); }
.underline-offset-8   { text-underline-offset: 8px; }

/* ── Text colours ── */
.text-white    { color: #fff; }
.text-red-600  { color: var(--red-600); }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.text-slate-900 { color: var(--slate-900); }

/* ── Background colours ── */
.bg-white    { background-color: #fff; }
.bg-black    { background-color: #000; }
.bg-red-600  { background-color: var(--red-600); }
.bg-slate-50  { background-color: var(--slate-50); }
.bg-slate-100 { background-color: var(--slate-100); }
.bg-slate-900 { background-color: var(--slate-900); }

/* ── Borders ── */
.border   { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-8 { border-width: 8px; border-style: solid; }
.border-\[12px\] { border-width: 12px; border-style: solid; }

.border-white    { border-color: #fff; }
.border-red-600  { border-color: var(--red-600); }
.border-slate-100 { border-color: var(--slate-100); }
.border-slate-200 { border-color: var(--slate-200); }

/* ── Ring (subtle outline shadow) ── */
.ring-1 { box-shadow: 0 0 0 1px var(--ring-color, rgba(0,0,0,0.05)); }
.ring-slate-200 { --ring-color: var(--slate-200); }

/* Combine ring with drop shadow when both present */
.shadow-2xl.ring-1 {
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25), 0 0 0 1px var(--ring-color, rgba(0,0,0,0.05));
}

/* ── Border radius ── */
.rounded       { border-radius: 0.25rem; }
.rounded-full  { border-radius: 9999px; }
.rounded-2xl   { border-radius: 1rem; }
.rounded-3xl   { border-radius: 1.5rem; }
.rounded-\[3rem\] { border-radius: 3rem; }

/* ── Shadows ── */
.shadow-sm   { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-lg   { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-2xl  { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); }

/* ── Object fit ── */
.object-cover { object-fit: cover; }
.object-top   { object-position: top; }

/* ── SVG helpers ── */
.fill-none { fill: none; }

/* ── Transitions ── */
.transition {
  transition-property: color, background-color, border-color, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ── Hover states ── */
.hover\:text-red-600:hover   { color: var(--red-600); }
.hover\:text-slate-400:hover { color: var(--slate-400); }
.hover\:bg-slate-900:hover   { background-color: var(--slate-900); }
.hover\:shadow-lg:hover      { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.hover\:opacity-80:hover     { opacity: 0.8; }
.hover\:underline:hover      { text-decoration-line: underline; }

/* ── Skip link (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--slate-900);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 0.25rem 0.25rem;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Responsive — sm ≥640px ── */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Responsive — md ≥768px ── */
@media (min-width: 768px) {
  .md\:flex    { display: flex; }
  .md\:hidden  { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:text-left   { text-align: left; }
  .md\:text-8xl    { font-size: 6rem; line-height: 1; }
  .md\:order-1     { order: 1; }
  .md\:order-2     { order: 2; }
  .md\:justify-start { justify-content: flex-start; }
}
