/* =========================================================
   Endes Zettelkasten — shared base styles
   Palette echoes the two-ink print of Ende's novel
   (Bordeaux for the outer world, green for Phantásien)
   ========================================================= */

:root {
  --bordeaux:        #6f2329;
  --bordeaux-deep:   #561a1f;
  --green:           #2f5a47;
  --green-deep:      #1f4536;
  --cream:           #f6f1e6;
  --cream-soft:      #efe7d6;
  --paper:           #fbf8f1;
  --ink:             #2b2520;
  --ink-soft:        #5d544a;
  --line:            rgba(43, 37, 32, 0.16);

  --serif-display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --serif-body:    "EB Garamond", Georgia, "Times New Roman", serif;

  --maxw: 1080px;
  --space: clamp(1.5rem, 4vw, 4rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--serif-body);
  font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.2rem);
  line-height: 1.62;
  color: var(--ink);
  background: var(--cream);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space); }

/* ---------- Top bar / navigation ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 58px; height: auto; }
.brand .brand-name {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.brand .brand-sub {
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}
.nav a {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--bordeaux);
  border-color: var(--bordeaux);
  color: var(--paper);
}

/* ---------- Hero ---------- */
.hero { text-align: center; }
.hero .auryn { width: clamp(140px, 22vw, 230px); margin: 0 auto; }
.hero h1 {
  font-family: var(--serif-display);
  color: var(--bordeaux);
  font-weight: 600;
  letter-spacing: 0.015em;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.02;
  margin: 0.4em 0 0.15em;
}
.hero .subtitle {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  color: var(--green-deep);
  margin: 0;
}
.hero .subtitle em { font-style: italic; }
.hero .lede {
  max-width: 60ch;
  margin: 1.6rem auto 0;
  color: var(--ink-soft);
}
.kicker {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bordeaux);
  margin-bottom: 0.4rem;
}

/* decorative rule with center diamond */
.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  max-width: 220px;
  margin: 2.4rem auto;
  position: relative;
}
.rule::after {
  content: "❦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--cream);
  color: var(--bordeaux);
  padding: 0 0.6rem;
  font-size: 1rem;
}

/* ---------- Tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 2.5vw, 2.2rem);
}
.tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -18px rgba(43, 37, 32, 0.6);
}
.tile .thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--cream-soft);
}
.tile .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}
.tile:hover .thumb img { transform: scale(1.04); }
.tile .body { padding: 1.1rem 1.25rem 1.4rem; }
.tile .body h3 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 0.3rem;
  color: var(--bordeaux);
}
.tile .body p { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }
.tile .more {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
}

/* ---------- Footer ---------- */
.site-foot {
  margin-top: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
  background: var(--cream-soft);
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.site-foot .wrap { padding-block: 2rem; }
.site-foot .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
}
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--bordeaux); text-decoration: underline; }
.site-foot .sep { margin-left: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .nav { gap: 0.35rem; }
  .nav a { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
  .brand .brand-sub { display: none; }
}
