/* ============================================================
   Rozana design system
   Cream paper, ink type, sparing accent. Two display fonts +
   Instrument Serif for editorial moments. Spec: README PART 13.
   ============================================================ */

:root {
  /* Editorial Daily palette per design Dir-A */
  --paper:        #F5EFE3;
  --paper-2:      #ECE4D2;
  --paper-3:      #E0D5BC;
  --ink:          #1A1410;
  --ink-soft:     rgba(26, 20, 16, 0.7);
  --ink-mid:      rgba(26, 20, 16, 0.55);
  --ink-faint:    rgba(26, 20, 16, 0.4);
  --line:         rgba(26, 20, 16, 0.18);
  --line-strong:  rgba(26, 20, 16, 0.30);
  --line-soft:    rgba(26, 20, 16, 0.08);

  --accent:       #D8590E;
  --accent-soft:  #ED7D3C;
  --gold:         #BC8E1A;

  /* Game accents */
  --c-yes:        #E8B73A;
  --c-no:         #3F7CC9;
  --c-chain:      #9C6BB8;
  --c-hue:    #7AA15A;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  /* Editorial dot-grid — denser, slightly darker, single layer at 14px */
  background-image: radial-gradient(rgba(26,20,16,0.09) 1px, transparent 1px);
  background-size: 14px 14px;
  background-position: 0 0;
}

.serif { font-family: 'Newsreader', Georgia, serif; }
.mono  { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.italic { font-style: italic; }

/* ============ Layout ============ */
.page  { max-width: 720px; margin: 0 auto; padding: 28px 22px 80px; }
.page--narrow { max-width: 600px; }
.page--wide   { max-width: 920px; }

/* ============ Editorial header (Dir-A) ============ */
header.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mark { display: flex; }  /* SVG mark slot */
.brand .name {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px; line-height: 1; letter-spacing: -0.01em;
  font-weight: 400; color: var(--ink); text-decoration: none;
}
.brand .divider {
  width: 1px; height: 14px;
  background: var(--line);
  margin-left: 4px;
}
.brand .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; letter-spacing: 0.12em;
  color: var(--ink-soft); text-transform: uppercase;
}

.nav { display: flex; gap: 4px; align-items: center; }
.nav a, .nav button {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mid); background: transparent;
  border: none; cursor: pointer;
  padding: 7px 11px; border-radius: 999px;
  text-decoration: none; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover, .nav button:hover { background: rgba(26,20,16,0.06); color: var(--ink); }
.nav .streak { background: var(--ink); color: var(--paper); padding: 7px 12px; letter-spacing: 0.1em; }

/* ============ Edition / meta strip ============ */
.edition, .meta-strip {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0;
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.12em;
  color: var(--ink-soft); text-transform: uppercase;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 14px 0 28px;
}

/* ============ Footer ============ */
footer.foot {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mid);
}
footer.foot a {
  color: var(--ink-mid); text-decoration: none;
  margin-right: 14px; transition: color 0.15s;
}
footer.foot a:hover { color: var(--ink); }
footer.foot .by { color: var(--ink-faint); }

/* ============ Buttons ============ */
.btn {
  font: inherit; font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  letter-spacing: 0.05em;
  font-size: 14px;
}
.btn--primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--secondary { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn--accent { background: var(--accent); color: white; }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
}
.btn:active { transform: translateY(1px); }

/* ============ Cookie banner ============ */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  max-width: 480px; margin: 0 auto;
  background: var(--ink); color: var(--paper);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  font-size: 13px;
  z-index: 100;
  display: none;
  align-items: center; gap: 14px;
  animation: slideUp 0.4s ease-out;
}
.cookie-banner.shown { display: flex; }
.cookie-banner .text { flex: 1; line-height: 1.45; }
.cookie-banner a { color: var(--c-yes); text-decoration: none; }
.cookie-banner a:hover { text-decoration: underline; }
.cookie-banner button {
  background: var(--paper); color: var(--ink);
  border: none; border-radius: 999px;
  padding: 8px 16px;
  font: inherit; font-weight: 600; font-size: 12px;
  cursor: pointer; flex-shrink: 0;
}

/* ============ Toast ============ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 11px 22px; border-radius: 999px;
  font-family: 'JetBrains Mono'; font-size: 11px; letter-spacing: 0.1em;
  z-index: 1200; font-weight: 600;
  animation: slideUp 0.3s, fadeOut 0.3s 2.4s forwards;
}

/* ============ Animations ============ */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes pulse   { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ============ Focus visibility (accessibility) ============ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ Mobile ============ */
@media (max-width: 480px) {
  .page { padding: 22px 18px 60px; }
}
