/* ============================================================
   Pirate Pots – base.css
   Fonts, reset, global defaults
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

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

/* ---- Modern reset ----------------------------------------- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.5em;
}

/* Remove default margins from block elements */
p, ul, ol, dl, figure, blockquote, pre {
  margin-top: 0;
}

/* Lists */
ul, ol {
  padding-left: 1.5em;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--color-accent, #d4a850);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Images */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements inherit font */
input, button, textarea, select {
  font: inherit;
}

/* Remove button default styles */
button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* Table */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* Details/summary */
details > summary {
  cursor: pointer;
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--color-border, #3a2218);
  margin: 2rem 0;
}

/* ---- Selection -------------------------------------------- */
::selection {
  background-color: var(--color-accent, #d4a850);
  color: #1a0f0a;
}

::-moz-selection {
  background-color: var(--color-accent, #d4a850);
  color: #1a0f0a;
}

/* ---- Scrollbar (webkit) ----------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg, #1a0f0a);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border, #3a2218);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent, #d4a850);
}

/* ---- Focus visible ---------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent, #d4a850);
  outline-offset: 3px;
}

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
