/* War Dove — shared styles
   Palette and register drawn from the crowned-dove device:
   aged vellum ground, manuscript-ink text, heraldic blue / oxblood / gold accents. */

:root {
  --vellum:        #f2ead2;   /* page ground — pale aged parchment */
  --vellum-deep:   #e8ddbf;   /* vignette / recessed tone */
  --ink:           #2a2015;   /* manuscript ink — primary text */
  --ink-soft:      #6b5942;   /* faded ink — secondary text */
  --blue:          #223a5e;   /* the dove's plumage */
  --oxblood:       #7c2530;   /* the breast red */
  --oxblood-soft:  #8a4a44;   /* softened breast red — tagline */
  --gold:          #b0842a;   /* crown & sword */
  --gold-bright:   #caa233;   /* gilt highlight */
  --hairline:      rgba(42, 32, 21, 0.20);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background-color: var(--vellum);
  /* soft aged vignette — atmosphere without texture noise */
  background-image: radial-gradient(
      120% 90% at 50% 18%,
      #faf4e4 0%,
      var(--vellum) 45%,
      var(--vellum-deep) 100%);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* ---- shared page shell ---- */
.page {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 2.5rem);
  flex: 1 0 auto;
}

/* ---- home masthead: logo left, name + tagline right ---- */
.masthead {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2.75rem);
}

.masthead__logo {
  width: clamp(120px, 20vw, 168px);
  height: auto;
  flex-shrink: 0;
  /* faint gilt-leaf shadow so the device sits on the page, not above it */
  filter: drop-shadow(0 3px 5px rgba(42, 32, 21, 0.28));
}

/* clean vertical gilt line dividing the device from the wordmark */
.masthead__rule {
  align-self: stretch;
  width: 2px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(
      to bottom,
      transparent 0%,
      var(--gold) 14%,
      var(--gold-bright) 50%,
      var(--gold) 86%,
      transparent 100%);
}

.brand-name {
  font-family: "UnifrakturMaguntia", "EB Garamond", serif;
  font-weight: 400;
  font-size: clamp(3.1rem, 11vw, 5.6rem);
  line-height: 0.92;
  margin: 0;
  color: var(--blue);
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-family: "MedievalSharp", "UnifrakturMaguntia", serif;
  font-size: clamp(1.2rem, 3.3vw, 1.6rem);
  color: var(--oxblood-soft);
  margin: 0.55rem 0 0;
  letter-spacing: 0.01em;
}

/* ---- heraldic divider: hairline with a central lozenge ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: clamp(2.25rem, 6vw, 3.5rem) 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
      to var(--dir, right),
      transparent,
      var(--gold) 40%,
      var(--gold-bright));
}
.divider::after { --dir: left; }
.divider__lozenge {
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px var(--vellum), 0 0 0 4px rgba(176, 132, 42, 0.35);
  flex-shrink: 0;
}

/* ---- projects menu ---- */
.projects__label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--oxblood);
  margin: 0 0 0.9rem;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.9rem 0.85rem 0.4rem;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--ink);
  transition: color 160ms ease, background-color 160ms ease, padding-left 160ms ease;
}
.project-link:first-child { border-top: 1px solid var(--hairline); }

.project-link__name {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  color: var(--blue);
  transition: color 160ms ease;
}
.project-link__meta {
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin-left: auto;
  padding-right: 1rem;
  white-space: nowrap;
}
.project-link__arrow {
  color: var(--gold);
  font-size: 1.2rem;
  transition: transform 160ms ease;
  flex-shrink: 0;
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--oxblood);
  background-color: rgba(176, 132, 42, 0.10);
  padding-left: 0.9rem;
  outline: none;
}
.project-link:hover .project-link__arrow,
.project-link:focus-visible .project-link__arrow {
  transform: translateX(4px);
}
.project-link:hover .project-link__name,
.project-link:focus-visible .project-link__name {
  color: var(--oxblood);
}
.project-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---- project page ---- */
/* the full brand cluster doubles as the home link on interior pages */
.masthead--link {
  text-decoration: none;
  color: inherit;
}
.masthead--link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
  border-radius: 3px;
}

.backlink {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  transition: color 160ms ease, border-color 160ms ease;
}
.backlink:hover,
.backlink:focus-visible {
  color: var(--oxblood);
  border-color: var(--oxblood);
  outline: none;
}
.backlink:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.project-title {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 0.4rem;
  color: var(--ink);
  font-weight: 600;
}
.project-kicker {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--oxblood);
  margin: 0 0 1rem;
}
.project-lede {
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  color: var(--ink);
  max-width: 62ch;
}
.project-lede .drop {
  font-family: "UnifrakturMaguntia", serif;
  font-size: 3.2em;
  line-height: 0.7;
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--oxblood);
}
.prose { max-width: 62ch; }
.prose p { font-size: 1.12rem; }
.prose a { color: var(--blue); text-underline-offset: 3px; }

/* empty-state where results will live */
.results-slot {
  margin-top: clamp(2rem, 6vw, 3rem);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--gold);
  background: rgba(176, 132, 42, 0.07);
  padding: 1.5rem 1.6rem;
  border-radius: 2px;
}
.results-slot h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--ink);
}
.results-slot p { margin: 0; color: var(--ink-soft); }

/* ---- footer ---- */
.foot {
  flex-shrink: 0;
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
}

/* ---- responsive: stack the masthead on narrow screens ---- */
@media (max-width: 560px) {
  .masthead {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
  .brand-tagline { margin-top: 0.35rem; }
  .masthead__rule {
    align-self: center;
    width: 64px;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent, var(--gold) 30%, var(--gold-bright), var(--gold) 70%, transparent);
  }
}

/* ---- respect reduced-motion preference ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .project-link:hover .project-link__arrow { transform: none; }
}
