/* Runecat — shared fonts, design tokens, and article typography.
   Loaded by both the public site and the admin panel. */

/* ---------------------------------------------------------------- fonts */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/outfit-latin-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/outfit-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------- tokens */
:root {
  /* Midnight & Tide brand palette */
  --navy: #101D30;
  --slate: #285574;
  --teal: #4B9FA8;
  --mist: #B5D8DE;
  --cloud: #F5F7F5;

  /* Derived tints & shades */
  --navy-deep: #0B1523;
  --navy-raised: #16263C;
  --teal-ink: #2E6E76;       /* teal dark enough for text on light backgrounds */
  --mist-tint: #E5F0F1;
  --mist-soft: #EEF5F5;
  --ink: #101D30;
  --ink-soft: #33435A;
  --ink-muted: #5A6A7E;
  --on-dark: #F5F7F5;
  --on-dark-soft: rgba(245, 247, 245, 0.78);
  --on-dark-muted: rgba(245, 247, 245, 0.6);
  --line: rgba(16, 29, 48, 0.1);
  --line-dark: rgba(181, 216, 222, 0.14);

  --font-display: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 29, 48, 0.06), 0 2px 8px rgba(16, 29, 48, 0.05);
  --shadow: 0 2px 4px rgba(16, 29, 48, 0.04), 0 12px 32px rgba(16, 29, 48, 0.08);
  --shadow-lg: 0 24px 64px rgba(6, 13, 24, 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------------------------------------------------------- prose (articles, markdown) */
.prose {
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose figure, .prose .embed, .prose .table-wrap { margin: 0 0 1.35em; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.01em;
  scroll-margin-top: 96px;
}
.prose h2 { font-size: 1.75rem; margin: 2.2em 0 0.7em; }
.prose h3 { font-size: 1.35rem; margin: 1.9em 0 0.6em; }
.prose h4 { font-size: 1.1rem; margin: 1.6em 0 0.5em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a {
  color: var(--slate);
  text-decoration: underline;
  text-decoration-color: rgba(75, 159, 168, 0.55);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.prose a:hover { color: var(--navy); text-decoration-color: var(--teal); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.35em 0; padding-left: 0.2em; }
.prose li::marker { color: var(--teal); }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: '';
  position: absolute;
  left: -1.1em;
  top: 0.62em;
  width: 7px;
  height: 11px;
  background: var(--teal);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.prose blockquote {
  margin-left: 0;
  padding: 0.2em 0 0.2em 1.3em;
  border-left: 3px solid var(--teal);
  color: var(--ink);
  font-size: 1.1em;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--mist-tint);
  color: var(--navy);
  padding: 0.15em 0.4em;
  border-radius: 6px;
}
.prose pre {
  background: var(--navy);
  color: var(--cloud);
  padding: 1.1em 1.3em;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }
.prose figure img { margin-inline: auto; }
.prose figcaption { text-align: center; color: var(--ink-muted); font-size: 0.9rem; margin-top: 0.7em; }
.prose hr {
  border: 0;
  height: 1px;
  margin: 2.8em auto;
  background: linear-gradient(90deg, transparent, var(--mist), transparent);
}
.prose .embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.prose .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 0.65em 0.9em; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { background: var(--mist-soft); color: var(--ink); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

.prose--lead { font-size: clamp(1.08rem, 0.9rem + 0.5vw, 1.25rem); line-height: 1.7; }
.prose--lead p:first-child { color: var(--ink); }
.prose--article { font-size: 1.0625rem; }

.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
