/* Fonts: Cinzel for headings and dates, EB Garamond for body text */
@font-face { font-family: 'Cinzel'; src: url('fonts/cinzel-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('fonts/eb-garamond-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('fonts/eb-garamond-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('fonts/eb-garamond-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  background: #061e42;
  color: #fffaf0;
  font-family: 'EB Garamond', Garamond, Georgia, serif;
}

* { box-sizing: border-box; }
body { margin: 0; }

main {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: clip;
}

main::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, #061e42 15%, #061e42d9 45%, #061e42a6 75%, #061e4280),
    var(--bg-image) var(--bg-position) / cover no-repeat;
}

/* Background photo variations.
   Set the class on <body> to choose one: bg-saxophone or bg-trombone.
   --bg-position keeps the main subject in view when the photo is cropped. */
body.bg-trombone  { --bg-image: url("bg-trombone.webp");  --bg-position: 58% bottom; }

.festival {
  width: min(100%, 42rem);
  padding: 1.75rem clamp(1rem, 5vw, 2.5rem) 2.5rem;
  text-align: center;
}

/* Gold rule used for all decorative lines.
   Lines are thickest at the inner end (next to the text or logo)
   and thin out to nothing at the outer end. They are drawn with
   soft-edged gradients rather than a cut shape, so there are no
   hard slanted edges to show steps or ridges on any screen. */
.festival { --gold: #ffdc78; --gold-0: #ffdc7800; }
.festival-brand::before,
.festival-brand::after,
h2.flanked::before,
h2.flanked::after,
h2.ruled::before {
  content: "";
  height: 4px;
  background: radial-gradient(farthest-side at 50% 50%, var(--gold) 35%, var(--gold-0)) no-repeat;
}
/* Left-hand lines: thick at the right (inner) end */
.festival-brand::before,
h2.flanked::before {
  background-image: radial-gradient(farthest-side at 100% 50%, var(--gold) 35%, var(--gold-0));
}
/* Right-hand lines: thick at the left (inner) end */
.festival-brand::after,
h2.flanked::after {
  background-image: radial-gradient(farthest-side at 0 50%, var(--gold) 35%, var(--gold-0));
}

/* Logo with a line either side, level with the gap above "FESTIVAL" */
.festival-brand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(.75rem, 3vw, 1.25rem);
  margin: 0 auto 1rem;
}
.festival-brand::before,
.festival-brand::after {
  flex: 0 1 6.5rem;
  margin-bottom: 1.25rem;
}
.festival-logo { display: block; flex: none; width: 9rem; height: auto; }

h1, h2, .dates { font-family: Cinzel, 'Trajan Pro', Georgia, serif; }
h1 {
  margin: 0;
  font-size: clamp(1.4rem, 6.2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
  text-transform: uppercase;
}
h1 em, .dates, h2 { color: #ffdc78; }
p { margin: .85rem 0; font-size: 1.125rem; line-height: 1.45; }
h2 {
  margin: 1.6rem auto .6rem;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .23em;
  text-transform: uppercase;
}

/* "Save the dates": white heading with short lines either side */
h2.flanked {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #fffaf0;
  white-space: nowrap;
}
h2.flanked::before,
h2.flanked::after { flex: 0 1 5.5rem; }

/* "Keep in touch": one long line above the heading */
h2.ruled { max-width: 29rem; }
h2.ruled::before { display: block; margin-bottom: 1.1rem; }

.dates {
  margin: 0;
  font-size: clamp(1.35rem, 6vw, 2.3rem);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}
.email {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  max-width: 100%;
  padding: .65rem 1rem;
  border: 1px solid #ffdc78;
  border-radius: 1.5rem;
  background: #061e42e6;
  box-shadow: 0 4px 18px #00000059;
  color: inherit;
  font-size: clamp(.95rem, 4.4vw, 1.2rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.email:hover { background: #0b2b5c; }
.email-icon { flex: none; width: 1.35em; height: auto; color: #ffdc78; }
a:focus-visible { outline: 3px solid #ffdc78; outline-offset: 4px; }
