@font-face {
  font-family: "Glorious";
  src:
    local("Glorious"),
    url("../fonts/Glorious.woff2") format("woff2"),
    url("../fonts/Glorious.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8f3e8;
  --panel: rgba(254, 255, 221, 0.35);
  --text: #111;
  --muted: #555;
  --line: rgba(0, 0, 0, 0.2);

  /* shared UI tokens */
  --surface-paper: rgba(255, 245, 227, 0.72);
  --surface-paper-strong: rgba(255, 250, 236, 0.88);
  --surface-line: rgba(55, 34, 17, 0.18);
  --surface-shadow: 0 10px 30px rgba(40, 24, 12, 0.08);
  --ink-main: #23170e;
  --ink-soft: #564236;
  --accent-main: #3b2a1b;
  --accent-strong: #6b4429;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg) url("../img/bg.jpg") repeat;
  font-family: "Almendra", serif;
}

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

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1040px, 100% - 2rem);
  margin-inline: auto;
}

/* reusable UI primitives */
.parchment-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0.05)), var(--surface-paper);
  border: 1px solid var(--surface-line);
  border-radius: 18px;
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(2px);
}

.paper-input,
.links-output {
  width: 100%;
  border: 1px solid rgba(49, 33, 18, 0.22);
  background: var(--surface-paper-strong);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink-main);
  font: inherit;
}

.paper-input:focus,
.links-output:focus {
  outline: 2px solid rgba(60, 38, 19, 0.18);
  outline-offset: 1px;
}

.exp-btn,
.icon-btn {
  border: 1px solid rgba(49, 33, 18, 0.28);
  background: linear-gradient(180deg, #443122, #2c1e13);
  color: #fff9ef;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, border-color .15s ease;
}

.exp-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.exp-btn-secondary,
.icon-btn-light {
  background: linear-gradient(180deg, #f3e7d6, #e3d3bc);
  color: var(--ink-main);
}

.icon-btn-light {
  min-width: 38px;
  min-height: 38px;
  padding: 8px;
}

.mini-muted {
  color: var(--ink-soft);
  font-size: 14px;
}

.state-box {
  padding: 16px;
  border: 1px dashed rgba(55, 34, 17, .20);
  border-radius: 14px;
  background: rgba(255, 250, 240, .6);
}

.state-error {
  border-color: rgba(145, 52, 40, .28);
  color: #7b2e24;
}

.img-h1 {
  height: 70px;
  width: auto;
}

.site-header {
  padding: 0.75rem 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.nav-group {
  display: flex;
  gap: 1.25rem;
}

.nav-link {
  font-family: "Glorious", "Rye", serif;
  font-size: 35px;
  text-transform: uppercase;
}

.text-line {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  transition: opacity 0.2s ease;
}

.text-line:hover,
.nav-link:hover {
  opacity: 0.7;
}

.mobile-nav {
  display: none;
}

.mobile-nav-toggle {
  border: 1px solid var(--line);
  background: #fff8;
  border-radius: 0.45rem;
  padding: 0.35rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.mobile-menu.is-open {
  display: flex;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .img-h1 {
    height: 56px;
  }

  .nav-link {
    font-size: 1.5rem;
  }
}
