/* Angel's Garden — shared styles
   The page has two moods. "sweet" is a pale orchid daytime garden,
   "chaos" is a deep plum night garden. The mood follows whatever piece
   or section you're looking at. */

:root {
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gold: #e3b04b;
  --radius: 4px;
  --wrap: 1180px;
}

:root[data-mood="sweet"] {
  --bg: #f6e9f3;
  --bg-deep: #ebd4e6;
  --ink: #2b1537;
  --muted: #6a4878;
  --accent: #a82c68;
  --on-accent: #ffffff;
  --line: #d6b3cf;
}

:root[data-mood="chaos"] {
  --bg: #191029;
  --bg-deep: #26173d;
  --ink: #f2eafb;
  --muted: #b6a5cf;
  --accent: #e3b04b;
  --on-accent: #1a1026;
  --line: #43305f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  transition: background-color 0.6s ease, color 0.6s ease;
}

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

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--on-accent);
  padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem;
  align-items: baseline; justify-content: space-between;
  padding-block: 1.5rem;
}
.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  padding-block: 0.25rem; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Type */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }

/* Buttons */
.btn {
  display: inline-block;
  font: inherit; font-weight: 600;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  background: var(--accent); color: var(--on-accent);
  text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent); color: var(--on-accent); filter: none; }

/* Home: spotlight */
.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding-block: 1rem 4rem;
}
.spot-frame {
  margin: 0;
  background: var(--bg-deep);
  padding: clamp(0.6rem, 1.6vw, 1.1rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--gold);
  transition: background-color 0.6s ease, border-color 0.6s ease;
  display: grid; place-items: center;
  min-height: 280px;
}
.spot-frame button {
  all: unset; cursor: zoom-in; display: block; max-width: 100%;
}
.spot-frame button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.spot-frame img {
  width: auto; height: auto;
  max-height: min(74vh, 760px);
  margin-inline: auto;
  transition: opacity 0.35s ease;
}
.spot-frame img.swap { opacity: 0; }

.spot-caption {
  margin-top: 2.2rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.spot-caption h2 { margin-bottom: 0.2em; }
.spot-caption .meta { margin: 0 0 1.2rem; color: var(--muted); }
.spot-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Home: two doors */
.doors { display: grid; grid-template-columns: 1fr 1fr; }
.door {
  position: relative; display: flex; flex-direction: column;
  justify-content: flex-end; min-height: 340px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  text-decoration: none; overflow: hidden;
}
.door::before {
  content: ""; position: absolute; inset: 0;
  background: var(--door-img) center / cover no-repeat;
  opacity: 0.32; transition: opacity 0.3s ease, transform 0.6s ease;
}
.door:hover::before, .door:focus-visible::before { opacity: 0.5; transform: scale(1.03); }
.door::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--scrim) 0%, transparent 70%);
}
.door > * { position: relative; z-index: 1; }
.door h2 { margin-bottom: 0.25em; }
.door p { margin: 0; max-width: 32ch; }
.door-sweet { background: #f6e9f3; color: #2b1537; --scrim: rgba(246, 233, 243, 0.92); }
.door-sweet h2 { color: #8f2057; }
.door-chaos { background: #191029; color: #f2eafb; --scrim: rgba(25, 16, 41, 0.92); }
.door-chaos h2 { color: var(--gold); }
.door:focus-visible { outline-offset: -6px; outline-color: currentColor; }

/* Home: about */
.about { padding-block: 5rem; }
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 5vw, 5rem);
}
.about p { max-width: 62ch; margin-top: 0; }

/* Gallery */
.page-head { padding-block: 1.5rem 2rem; }
.page-head p { color: var(--muted); max-width: 52ch; margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 2rem; }
.filters button {
  font: inherit; font-weight: 500; cursor: pointer;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink);
}
.filters button:hover { border-color: var(--accent); }
.filters button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}

.grid { columns: 3 280px; column-gap: 1.25rem; padding-bottom: 5rem; }
.tile {
  break-inside: avoid; margin: 0 0 1.25rem;
  display: block; width: 100%;
}
.tile button {
  all: unset; display: block; width: 100%; cursor: zoom-in;
  background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tile button:hover { border-color: var(--gold); transform: translateY(-2px); }
.tile button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.tile img { width: 100%; height: auto; }
.tile figcaption { padding: 0.65rem 0.85rem 0.8rem; }
.tile .t { display: block; font-family: var(--serif); font-size: 1.05rem; line-height: 1.25; }
.tile .m { display: block; font-size: 0.875rem; color: var(--muted); }
.tile[hidden] { display: none; }

/* Lightbox */
dialog.lightbox {
  border: 0; padding: 0; background: transparent; color: #f2eafb;
  width: min(100vw, 1100px); max-width: 100vw; max-height: 100vh;
}
dialog.lightbox::backdrop { background: rgba(14, 8, 24, 0.92); }
.lb-inner { display: grid; gap: 1rem; padding: 1rem; justify-items: center; }
.lb-inner img { max-height: 68vh; width: auto; max-width: 100%; border-radius: var(--radius); }
.lb-info { text-align: center; }
.lb-info h2 { color: #fff; margin-bottom: 0.1em; font-size: 1.5rem; }
.lb-info p { margin: 0; color: #cdbfe3; }
.lb-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.lb-bar button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.55rem 1.1rem; border-radius: var(--radius);
  border: 2px solid #e3b04b; background: transparent; color: #e3b04b;
}
.lb-bar button:hover { background: #e3b04b; color: #1a1026; }
.lb-bar button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Blog */
.post-list { list-style: none; margin: 0; padding: 0 0 5rem; display: grid; gap: 2.5rem; max-width: 70ch; }
.post-list h2 { margin-bottom: 0.15em; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list time, .post time { color: var(--muted); font-size: 0.95rem; }
.post-list p { margin: 0.4rem 0 0; }
.post { max-width: 68ch; padding-bottom: 5rem; }
.post h1 { margin-top: 0.4rem; }
.post p { margin: 0 0 1.2em; }
.post .back { display: inline-block; margin-bottom: 1rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 3rem; color: var(--muted); font-size: 0.95rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }

/* Opening moment: the spotlight piece slides into its frame once */
@keyframes arrive {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.spot-frame.arrive { animation: arrive 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* Small screens */
@media (max-width: 820px) {
  .spotlight { grid-template-columns: 1fr; padding-bottom: 3rem; }
  .spot-frame img { max-height: 62vh; }
  .doors { grid-template-columns: 1fr; }
  .door { min-height: 240px; }
  .about-grid { grid-template-columns: 1fr; }
  .about { padding-block: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
