/* ============================================================
   citaria.space — cozy lo-fi design system
   Tokens, reset, base typography, app shell (header/nav/footer)
   ============================================================ */

:root {
  /* Warm, sandy paper palette */
  --bg:          #f0e7d6;   /* page background — warm cream */
  --bg-deep:     #e8ddc8;   /* slightly deeper cream for bands */
  --paper:       #faf4e8;   /* cards / raised surfaces */
  --ink:         #3c322a;   /* primary text — warm dark brown */
  --ink-soft:    #6f6256;   /* secondary text */
  --ink-faint:   #a4978688; /* hints, dividers */

  /* Accents */
  --accent:      #c06a4d;   /* dusty terracotta */
  --accent-deep: #a4543a;
  --sage:        #8a9a7b;   /* calm secondary */

  /* Wood shelf */
  --wood:        #cdab80;
  --wood-edge:   #b48f63;
  --wood-shadow: #8c6a45;

  /* Shadows — warm tinted, soft */
  --shadow-sm: 0 2px 6px rgba(80, 56, 34, 0.10);
  --shadow-md: 0 10px 24px rgba(80, 56, 34, 0.16);
  --shadow-lg: 0 22px 48px rgba(80, 56, 34, 0.24);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-script:  "Caveat", cursive;

  --radius:   14px;
  --radius-sm: 9px;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain overlay for the lo-fi feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body > * { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  font-optical-sizing: auto;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

/* ---------- Layout shell ---------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 28px 18px;
}

.brand {
  font-family: var(--font-script);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  transition: transform 0.4s var(--ease), color 0.3s var(--ease);
}
.brand:hover { transform: rotate(-2deg); color: var(--accent); }

.nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
.nav a {
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--ink); }

.site-footer {
  max-width: var(--maxw);
  margin: 80px auto 0;
  padding: 28px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: center;
}

/* ---------- Page header (centered title block) ---------- */

.page-head {
  text-align: center;
  padding: 46px 20px 10px;
}
.page-head h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin: 0 0 6px;
}
.page-head .subtitle {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 18px;
}
.page-head .divider {
  width: 54px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--ink-faint);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff7ef;
  box-shadow: 0 6px 16px rgba(160, 84, 58, 0.30);
}
.btn-primary:hover { background: var(--accent-deep); color: #fff7ef; }

.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--ink-soft);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ---------- Flash ---------- */

.flash {
  max-width: var(--maxw);
  margin: 14px auto 0;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: #e6efe1;
  color: #45603c;
  border: 1px solid #cde0c4;
  font-size: 0.92rem;
}
