/* ------------------------------ 9-YEAR ANNIVERSARY (TEMPORARY) ------------------------------
   Styles for the anniversary popup, home page line and logo ribbon built by js/anniversary.js.
   Removing the anniversary: delete this file, js/anniversary.js, and the two lines that load
   them in each page's <head>. */

:root {
  --anniv-gold: #C4A05A;      /* taken from the new logo's rim */
  --anniv-gold-hi: #E8D199;
  --anniv-gold-lo: #9C7838;
  --anniv-deep: #1C0F0B;
  --anniv-paper: #F8F2E7;
  --anniv-mat: #E8DCC8;       /* beige, in the tone of the site's light sections */
  --anniv-ink: #2A1611;
  --anniv-maroon: #7A1F18;
}

/* ── Ribbon wrapped around the logo (inner pages) ──
   A satin band circles the round logo, tied at the bottom in a small gold knot carrying the 9,
   with two slim tails of slightly different lengths. Lives inside .topbar_logo, so it follows the logo. */
.topbar_logo { position: relative; }

.anniv_ring {
  position: absolute;
  inset: -5px;
  z-index: 1;
  padding: 3px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 210deg, #9C7838, #E8D199 12%, #C4A05A 28%, #8E6C30 45%, #D9BB7B 62%, #F0DFAE 72%, #B8934C 86%, #9C7838);
  /* show only a ring: cut the middle out */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.anniv_bow {
  position: absolute;
  left: 50%;
  top: calc(100% - 7px);
  z-index: 2;
  width: 44px;
  height: 60px;
  margin-left: -22px;
  opacity: 0;
  animation: annivBowIn 1s cubic-bezier(0.2, 0.8, 0.25, 1) 1.1s forwards;
}
.anniv_tail {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 12px;
  margin-left: -6px;
  transform-origin: 50% 0;
  background: linear-gradient(90deg, #8E6C30, #C4A05A 30%, #F0DFAE 52%, #C4A05A 72%, #8A672C);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 6px), 0 100%);   /* notched end */
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
  transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.anniv_tail--l { height: 43px; transform: rotate(15deg); }
.anniv_tail--r { height: 48px; transform: rotate(-10deg); }
.topbar_logo:hover .anniv_tail--l,
.topbar_logo:focus-visible .anniv_tail--l { transform: rotate(19deg); }
.topbar_logo:hover .anniv_tail--r,
.topbar_logo:focus-visible .anniv_tail--r { transform: rotate(-14deg); }

.anniv_knot {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #F0DFAE, #C4A05A 55%, #9C7838);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, 0.45),
    inset 0 0 0 2.5px rgba(156, 120, 56, 0.55),
    0 3px 6px rgba(0, 0, 0, 0.4);
  color: var(--anniv-deep);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 0.84rem;
  line-height: 1;
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum' 1;
}
@keyframes annivBowIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  .anniv_ring { inset: -3.5px; padding: 2px; }
  .anniv_bow { top: calc(100% - 6px); width: 34px; height: 46px; margin-left: -17px; }
  .anniv_knot {
    width: 16px; height: 16px; margin-left: -8px; font-size: 0.64rem;
    box-shadow: inset 0 0 0 1px rgba(255, 240, 200, 0.45), inset 0 0 0 2px rgba(156, 120, 56, 0.55), 0 2px 4px rgba(0, 0, 0, 0.4);
  }
  .anniv_tail { top: 6px; width: 9px; margin-left: -4.5px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 5px), 0 100%); }
  .anniv_tail--l { height: 32px; }
  .anniv_tail--r { height: 36px; }
}

/* ── Home page line under the title ── */
.anniv_home_line {
  background: none;
  border: 0;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.2rem 0 -0.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(0.68rem, 1.3vw, 0.92rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--anniv-gold-hi);
  opacity: 0;
  animation: fadeUp 1.2s ease-out 1.2s forwards;
}
.anniv_home_line i { display: block; width: clamp(24px, 4vw, 44px); height: 0.5px; background: rgba(196, 160, 90, 0.75); }
.anniv_home_line b { font-weight: 600; }
.anniv_home_line span { transition: color 0.3s ease; }
.anniv_home_line:hover span { color: #F4E4B8; }
.anniv_home_line:focus-visible { outline: 1px solid var(--anniv-gold); outline-offset: 4px; }

/* ── Popup ── */
.anniv_veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(18, 9, 6, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.anniv_veil.open { opacity: 1; pointer-events: auto; }
.anniv_veil[hidden] { display: none; }

.anniv_card {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 395px);
  padding: 2.3rem 2rem 1.8rem;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  background: var(--anniv-paper);
  color: var(--anniv-ink);
  /* beige mat around the card, edged with fine gold lines */
  box-shadow:
    0 0 0 1px rgba(196, 160, 90, 0.55),
    0 0 0 12px var(--anniv-mat),
    0 0 0 13px rgba(196, 160, 90, 0.35),
    0 20px 55px rgba(0, 0, 0, 0.4);
  transform: translateY(10px);
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.anniv_veil.open .anniv_card { transform: none; }
.anniv_card:focus { outline: none; }
.anniv_card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 0.5px solid rgba(196, 160, 90, 0.7);
  pointer-events: none;
}

.anniv_close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  background: none;
  border: 0;
  padding: 0.25rem 0.45rem;
  font-size: 1.45rem;
  line-height: 1;
  color: rgba(42, 22, 17, 0.7);
  cursor: pointer;
}
.anniv_eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--anniv-maroon);
}
.anniv_lockup { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 0.4rem; line-height: 1; }
.anniv_numeral {
  font-weight: 300;
  font-size: 6rem;
  line-height: 1;
  background: linear-gradient(160deg, var(--anniv-gold-lo) 10%, var(--anniv-gold-hi) 45%, var(--anniv-gold) 60%, var(--anniv-gold-lo) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.anniv_word { font-weight: 400; font-size: 2.15rem; letter-spacing: 0.02em; color: var(--anniv-ink); }
.anniv_tagline { margin: 0.2rem 0 1.05rem; font-style: italic; font-size: 1.35rem; color: var(--anniv-maroon); }
.anniv_rule { display: block; width: 34px; height: 0.5px; margin: 0 auto 0.9rem; background: rgba(196, 160, 90, 0.8); }
.anniv_body { margin: 0 auto 1.4rem; max-width: 31ch; font-size: 1.06rem; line-height: 1.55; color: rgba(42, 22, 17, 0.7); text-wrap: pretty; }
.anniv_gift { font-weight: 600; font-style: italic; color: var(--anniv-gold-lo); white-space: nowrap; }
.anniv_actions { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.anniv_btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.85rem 1.7rem;
  background: var(--anniv-maroon);
  border: 0.5px solid var(--anniv-maroon);
  color: var(--cream);
}
.anniv_later {
  background: none;
  border: 0;
  padding: 0.3rem 0.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: rgba(42, 22, 17, 0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.anniv_card button:focus-visible,
.anniv_card a:focus-visible { outline: 2px solid var(--anniv-gold); outline-offset: 3px; }

@media (max-width: 600px) {
  .anniv_card { width: min(100%, 340px); padding: 2rem 1.4rem 1.5rem; }
  .anniv_numeral { font-size: 4.8rem; }
  .anniv_word { font-size: 1.8rem; }
  .anniv_tagline { font-size: 1.2rem; }
  .anniv_btn { letter-spacing: 0.14em; padding: 0.85rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .anniv_veil, .anniv_card, .anniv_tail { transition: none; }
  .anniv_bow { animation: none; opacity: 1; }
}
