/* ==========================================================================
   Tito Yulianto — Shared Base Styles (Sketchbook / Editorial Ballpoint Theme)
   ========================================================================== */

:root {
  --paper: #fbfaf7;
  --paper-card: #fffefb;
  --paper-warm: #f5f2ea;
  --ink: #20242b;
  --ink-soft: #45494f;
  --blue: #27589b;
  --blue-soft: #eef3fa;
  --red: #bd4942;
  --red-soft: #fbefee;
  --green: #226f54;
  --green-soft: #ebf5f0;
  --amber: #9a5b13;
  --amber-soft: #fdf4e7;
  --muted: #656b71;
  --line: #d6d2c9;
  --line-strong: #b8b3a8;
  --shadow: #e4e0d6;
  --max: 1160px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Subtle dot-grid paper texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(#b3ac9a 0.5px, transparent 0.5px);
  background-size: 10px 10px;
  z-index: 0;
}

.wrapper {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

button {
  font: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  color: var(--ink);
  z-index: 100;
  padding: 10px 14px;
  border: 2px solid var(--ink);
}

/* Top Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 16px 0;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px dashed var(--line-strong);
}

.topinner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.8px;
  white-space: nowrap;
}

.brand span {
  color: var(--red);
}

.brand small {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topnav a {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s ease;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  color: var(--red);
}

.mini-cta {
  padding: 7px 14px;
  border: 1.8px solid var(--ink);
  border-radius: 16px 13px 17px 12px;
  box-shadow: 3px 3px 0 var(--shadow);
  background: var(--paper-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mini-cta:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 #d5d0c7;
  color: var(--blue) !important;
}

/* Buttons */
.drawn-btn {
  background: var(--paper-card);
  border: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 18px 14px 20px 14px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.drawn-btn:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 #d4cfc5;
}

.drawn-btn.blue {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.drawn-btn.blue:hover {
  background: #1f4a85;
}

.drawn-btn.red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.drawn-btn.sm {
  padding: 8px 14px;
  font-size: 13px;
  box-shadow: 3px 3px 0 var(--shadow);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.live {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.dev {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-badge.established {
  color: var(--blue);
  background: var(--blue-soft);
}

/* Shared Dividers & Tags */
.paper-divider {
  height: 16px;
  border-top: 2px dashed var(--line-strong);
  transform: rotate(-0.25deg);
}

.scribble-tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1.5px solid var(--red);
  border-radius: 13px 7px 10px 6px;
  color: var(--red);
  transform: rotate(-2deg);
  font-size: 11.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.label {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.hint {
  font-size: 13px;
  color: var(--muted);
}

/* Footer */
.footer {
  padding: 40px 0 56px;
  margin-top: 24px;
  border-top: 1.5px dashed var(--line-strong);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.footer strong {
  color: var(--ink);
  font-size: 15px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.footer-links a[aria-current="page"] {
  color: var(--red);
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Responsive Base */
@media (max-width: 720px) {
  .wrapper {
    width: min(calc(100% - 28px), var(--max));
  }

  .topbar {
    position: static;
    padding: 14px 0;
  }

  .topinner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .topnav {
    gap: 12px 14px;
  }

  .topnav a {
    font-size: 13px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
