/* ============================================
   Kupi's Nook — design tokens
   ============================================ */
:root {
  /* palette */
  --cream:        #F7F1E4;
  --cream-deep:   #EFE6D2;
  --moss:         #6E7F55;
  --moss-dark:    #445039;
  --moss-deeper:  #384432;
  --bark:         #6B4A34;
  --accent:       #B8613F;   /* rust-berry — Kupi's signature */
  --accent-2:     #E3B23C;   /* honey gold */
  --ink:          #3C3630;
  --paper:        #FFFCF5;
  --shadow:       #2E3524;

  /* character */
  --skin:   #F2C9A0;
  --hair:   #6B4A34;
  --blush:  #E28B6D;
  --collar: #F7F1E4;
  --jar-glass: #CFE0BE;

  /* type */
  --font-display: 'Fraunces', serif;
  --font-body: 'Nunito Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
}

a { color: inherit; text-decoration: none; }

/* ============================================
   Layout shell
   ============================================ */
.page {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  flex: 0 0 260px;
  width: 260px;
}

.main {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 860px) {
  .page { flex-direction: column; }
  .sidebar { width: auto; }
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  background: linear-gradient(180deg, var(--moss-dark), var(--moss-deeper));
  color: var(--cream);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
}

.sidebar-top { text-align: center; }

.kupi-portrait {
  width: 130px;
  height: 130px;
  margin: 0 auto 10px;
  background: var(--cream);
  border-radius: 50%;
  border: 3px solid var(--accent-2);
  padding: 6px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.15);
}
.kupi-svg { width: 100%; height: 100%; }

.site-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 4px 0 0;
  letter-spacing: 0.01em;
}

.site-sub {
  margin: 2px 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
  font-style: italic;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--cream);
  opacity: 0.82;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.nav-link:hover { background: rgba(255,255,255,0.08); opacity: 1; }
.nav-link.active {
  background: var(--cream);
  color: var(--moss-deeper);
  opacity: 1;
}
.nav-icon { width: 1.1em; text-align: center; }

.tip-bubble {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  position: relative;
  box-shadow: 0 3px 0 rgba(0,0,0,0.12);
}
.tip-bubble::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 24px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent var(--paper) transparent;
}
.tip-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 4px;
  font-weight: 700;
}
.tip-text { margin: 0; font-size: 0.88rem; line-height: 1.4; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.25);
  text-align: center;
}

.counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--shadow);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.counter-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  opacity: 0.7;
}
.counter-digits {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  font-size: 0.85rem;
}

.best-viewed {
  font-size: 0.68rem;
  opacity: 0.6;
  font-style: italic;
  margin: 0;
}

/* ============================================
   Main
   ============================================ */
.main {
  padding: 32px 40px 60px;
  max-width: 980px;
}

@media (max-width: 600px) {
  .main { padding: 24px 18px 40px; }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.greeting h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0;
  color: var(--moss-deeper);
}

.subtle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--bark);
  opacity: 0.75;
  font-family: var(--font-mono);
}

.weather-chip {
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--moss-dark);
  box-shadow: 0 2px 0 rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- cards, generally ---- */
.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 3px 0 rgba(60,54,48,0.08), 0 1px 0 rgba(60,54,48,0.04);
  border: 1px solid var(--cream-deep);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.card-head h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  color: var(--moss-deeper);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-icon { color: var(--accent); }

.card-desc {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--bark);
  opacity: 0.8;
}

.see-all {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

/* ---- banner ---- */
.banner-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--paper), var(--cream-deep));
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 6px;
}
.banner-text h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--moss-deeper);
  max-width: 22ch;
}
.banner-text p:last-child {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink);
  max-width: 40ch;
  line-height: 1.5;
}
.banner-deco { flex-shrink: 0; width: 150px; }
.jar-svg { width: 100%; height: auto; }

@media (max-width: 700px) {
  .banner-card { flex-direction: column; text-align: center; }
  .banner-text p:last-child { margin: 0 auto; }
}

/* ---- grid of cards ---- */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.grid > * {
  flex: 1 1 calc(50% - 9px);
  min-width: 260px;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gallery-thumb {
  flex: 1 1 calc(50% - 5px);
  aspect-ratio: 1;
  min-height: 130px;
  border-radius: var(--radius-sm);
  background: var(--cream-deep);
}
.thumb-1 { background: linear-gradient(135deg, #E3B23C, #B8613F); }
.thumb-2 { background: linear-gradient(135deg, #8FA883, #445039); }
.thumb-3 { background: linear-gradient(135deg, #E28B6D, #E3B23C); }
.thumb-4 { background: linear-gradient(135deg, #445039, #6B4A34); }

.specimen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.9rem;
}
.specimen-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--cream-deep);
  color: var(--moss-dark);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
}

.link-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.link-tag {
  background: var(--moss-dark);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.link-tag:hover { background: var(--accent); transform: translateY(-1px); }

.guestbook-entry {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.gb-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0 0 4px;
  font-weight: 700;
}
.gb-msg { margin: 0; font-size: 0.85rem; }

.sign-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  transition: filter 0.15s ease;
}
.sign-btn:hover { filter: brightness(1.08); }

.page-footer {
  text-align: center;
  margin-top: 30px;
  font-size: 0.75rem;
  color: var(--bark);
  opacity: 0.6;
  font-family: var(--font-mono);
}

/* ---- clickable preview cards on home ---- */
.preview-card {
  display: block;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(60,54,48,0.1), 0 1px 0 rgba(60,54,48,0.04);
}

/* ---- full standalone pages ---- */
.full-card {
  padding: 28px;
}
.hint-text {
  font-size: 0.78rem;
  color: var(--bark);
  opacity: 0.65;
  font-style: italic;
  margin-top: 16px;
}
.hint-text code {
  font-family: var(--font-mono);
  background: var(--cream-deep);
  padding: 1px 5px;
  border-radius: 4px;
}

.gallery-grid-mini { flex-wrap: wrap; }

.gallery-grid-full {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.gallery-thumb-lg {
  flex: 1 1 calc(25% - 11px);
  min-width: 140px;
  min-height: 140px;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
}

.specimen-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.specimen-card {
  flex: 1 1 calc(33.333% - 11px);
  min-width: 180px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.specimen-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 8px 0 6px;
  color: var(--moss-deeper);
}
.specimen-card p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--bark);
  opacity: 0.85;
  line-height: 1.4;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.link-row:hover { background: var(--cream-deep); }
.link-row-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: var(--moss-dark);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.link-row-body { flex: 1; display: flex; flex-direction: column; }
.link-row-title { font-weight: 700; font-size: 0.95rem; }
.link-row-sub { font-size: 0.78rem; opacity: 0.65; }
.link-row-arrow { color: var(--accent); font-weight: 700; }

.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.guestbook-entry-lg {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.site-title { text-decoration: none; }
.site-title a { color: inherit; text-decoration: none; }
.kupi-portrait { display: block; }

.thumb-1, .gallery-thumb-lg.thumb-1 { background: linear-gradient(135deg, #E3B23C, #B8613F); }
.thumb-2, .gallery-thumb-lg.thumb-2 { background: linear-gradient(135deg, #8FA883, #445039); }
.thumb-3, .gallery-thumb-lg.thumb-3 { background: linear-gradient(135deg, #E28B6D, #E3B23C); }
.thumb-4, .gallery-thumb-lg.thumb-4 { background: linear-gradient(135deg, #445039, #6B4A34); }

/* ---- reduced motion / focus ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
a:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
