/* ==========================================================================
   URSONATE 原始奏鳴曲 — 第一屆台灣國際即興音樂節 (1st TIIMF), 2015–2016
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=Lato:wght@400;700&family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
  --accent: #ffc800;
  --accent-dark: #e6b400;
  --ink: #666;
  --ink-strong: #3b3b3b;
  --shell-bg: #222121;
  --paper: #fff;
  --line: #b2b2ad;
  --btn: #cccbc6;
  --btn-hover: #b2b2ad;

  --display: 'Fjalla One', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  --body: 'Lato', 'Noto Sans TC', -apple-system, 'Segoe UI',
    'Microsoft JhengHei', sans-serif;

  --shell: 960px;
  --header-h: 65px;
  --ease: 300ms ease;
}

/* --- Reset -------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--shell-bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

figure {
  margin: 0 0 10px;
}

figure.img-right {
  text-align: right;
}

figure.img-left {
  text-align: left;
}

/* Weebly's "medium" image border. */
figure.img-framed img {
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, .13);
}

figcaption {
  padding-top: 6px;
  font-size: 90%;
  text-align: center;
}

/* Weebly's explicit vertical spacers; the height rides on the element. */
.spacer {
  width: 100%;
}

hr {
  height: 0;
  margin: 30px 0;
  border: 0;
  border-top: 1px solid #e3e3e0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 500ms ease;
}

a:hover {
  color: var(--accent-dark);
}

h1,
h2,
.h2-like {
  margin: 0 0 15px;
  padding-bottom: 15px;
  color: var(--ink-strong);
  font-family: var(--display);
  font-size: 36px;
  font-weight: normal;
  line-height: 1.2;
}

h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: normal;
}

/* Weebly authors wrote body copy inside <h2>. `.h2-like` keeps that look on a
   <p> so the heading outline stays honest. */
.h2-like {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

p {
  margin: 0 0 20px;
  line-height: 1.5;
}

/* The theme's container is a flat 960px with vertical padding only; the 20px
   gutter appears at the 992px breakpoint below. */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
}

.ta-center {
  text-align: center;
}

.ta-right {
  text-align: right;
}

.ta-justify {
  text-align: justify;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  width: 100%;
  background: rgba(0, 0, 0, .9);
  border-top: 5px solid var(--accent);
}

.site-header .shell {
  display: flex;
  align-items: center;
  gap: 25px;
  max-width: none;
  padding: 0 40px;
}

.brand {
  color: #fff;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.1;
}

.brand:hover {
  color: #fff;
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 22px 20px;
  color: #fff;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  line-height: normal;
  transition: background 500ms ease;
}

.nav a:hover,
.nav [aria-current='page'] {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
}

/* --- Banner ------------------------------------------------------------- */
.banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 55px 0;
  background: #fff 50% 50% / cover no-repeat;
  text-align: center;
}

.banner::before {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .1);
  content: '';
}

/* 40px vertical matches the theme's .container inside the header section. */
.banner-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 20px;
}

.banner h1,
.banner h2 {
  margin: 0 0 30px;
  padding: 0;
  color: #fff;
  word-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--display);
  font-size: 65px;
  line-height: 1.1;
}

.banner p {
  margin: 0 0 40px;
  color: #fff;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-size: 24px;
  line-height: 1.4;
}

.banner .btn {
  margin-bottom: 0;
}

/* The home page banner fills the viewport and gets the scroll cue. */
.banner-hero {
  min-height: calc(100vh - var(--header-h));
}

.banner-hero h1 {
  font-size: 100px;
}

.scroll-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 55px;
  z-index: 2;
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  padding: 0;
  background: none;
  border: 3px solid #fff;
  border-radius: 100%;
  opacity: .5;
  cursor: pointer;
  transition: opacity 500ms ease;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  opacity: 1;
}

.scroll-cue::before,
.scroll-cue::after {
  position: absolute;
  display: block;
  width: 4px;
  height: 16px;
  background: #fff;
  content: '';
}

.scroll-cue::before {
  top: 8px;
  left: 12px;
  transform: rotate(-45deg);
}

.scroll-cue::after {
  top: 8px;
  left: 21px;
  transform: rotate(45deg);
}

/* --- Main --------------------------------------------------------------- */
.main {
  background: var(--paper);
  padding: 40px 0;
}

.main>.shell>*:last-child {
  margin-bottom: 0;
}

/* --- Columns ------------------------------------------------------------ */
.cols {
  --col-pad: 15px;
  display: flex;
  flex-wrap: nowrap;
  gap: 0 calc(2 * var(--col-pad));
  margin-bottom: 20px;
}

.cols>.col {
  flex: 1 1 auto;
  min-width: 0;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--btn);
  color: #333;
  border-radius: 4px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  transition: all 500ms ease;
}

.btn:hover {
  background: var(--btn-hover);
  color: #333;
}

.btn-lg {
  padding: 16px 24px;
  border-radius: 6px;
  font-size: 16px;
}

.btn-sm {
  padding: 10px 14px;
  font-size: 13px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.banner .btn {
  background: var(--accent);
  color: #fff;
}

.banner .btn:hover {
  background: var(--accent-dark);
}

/* --- Social ------------------------------------------------------------- */
.social {
  display: inline-flex;
  gap: 10px;
}

.social a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink-strong);
  color: #fff;
  font-size: 15px;
  transition: background var(--ease);
}

.social a:hover {
  background: var(--accent);
  color: #fff;
}

.social a::before {
  font-family: var(--body);
  font-weight: 700;
}

.social-facebook::before {
  content: 'f';
}

.social-mail::before {
  content: '\2709';
  font-size: 17px;
}

.social-twitter::before {
  content: 't';
}

/* --- Artist gallery ----------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 20px;
  padding: 5px;
  list-style: none;
}

.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #000;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.gallery-item::after {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .2);
  content: '';
  transition: background var(--ease);
}

.gallery-item:hover::after,
.gallery-item:focus-visible::after {
  background: rgba(230, 180, 0, .8);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-caption {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px;
  color: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
}

/* --- Slideshow ---------------------------------------------------------- */
.slideshow {
  margin-bottom: 20px;
}

.slideshow-stage {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #111;
}

.slideshow-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 500ms ease;
}

.slideshow-stage img.is-active {
  opacity: 1;
}

.slideshow-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .45);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background var(--ease);
}

.slideshow-btn:hover {
  background: var(--accent);
}

.slideshow-prev {
  left: 0;
}

.slideshow-next {
  right: 0;
}

.slideshow-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.slideshow-thumbs button {
  width: 56px;
  height: 42px;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
}

.slideshow-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slideshow-thumbs [aria-current='true'] {
  border-color: var(--accent);
}

.slideshow-caption {
  padding-top: 8px;
  font-size: 14px;
  text-align: center;
}

/* --- Lightbox ----------------------------------------------------------- */
/* Scoped to [open]: an unscoped `display` here would beat the UA's
   `dialog:not([open]) { display: none }` and leave the closed dialog covering
   the page. */
.lightbox[open] {
  display: grid;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  place-items: center;
  padding: 40px 60px;
  background: rgba(0, 0, 0, .9);
  border: 0;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, .9);
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  padding-top: 14px;
  color: #fff;
  text-align: center;
  font-size: 15px;
  line-height: 1.4;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 45px;
  line-height: .75;
  transition: color var(--ease);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  color: var(--accent);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

/* --- Video -------------------------------------------------------------- */
.video {
  margin: 10px 0 20px;
}

.video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* --- Contact / subscribe ------------------------------------------------ */
.mailto-block {
  margin-bottom: 20px;
  padding: 20px;
  background: #faf9f6;
  border: 1px solid #e3e3e0;
}

.mailto-block p {
  margin-bottom: 12px;
  font-size: 15px;
}

.mailto-block .btn {
  margin-bottom: 0;
}

/* Subscribe field — the label, input and button sizing follow the original
   form; submitting hands the address to the visitor's mail client. */
.field-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-strong);
  font-size: 15px;
}

.req {
  color: #da4444;
}

.field-input {
  width: 100%;
  max-width: 370px;
  margin-bottom: 10px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--body);
  font-size: 15px;
  transition: border-color var(--ease);
}

.field-input:focus {
  border-color: var(--accent);
  outline: none;
}

.subscribe .btn {
  margin-bottom: 0;
  border: 0;
  cursor: pointer;
  font-family: var(--body);
}

.subscribe-note {
  margin: 10px 0 0;
  font-size: 13px;
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  width: 100%;
  padding: 35px 0 25px;
  background: var(--shell-bg);
  color: #fff;
  font-size: 13px;
}

.site-footer p {
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover {
  color: var(--accent-dark);
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1200px) {

  .banner h1,
  .banner h2 {
    font-size: 80px;
  }

  .banner-hero h1 {
    font-size: 80px;
  }
}

@media (max-width: 992px) {

  /* The theme's small-screen header: 5px accent border over a 51px bar, the
     hamburger on the left of the logo, and the menu as a full-width overlay
     of centred accent-coloured links. */
  :root {
    --header-h: 56px;
  }

  .shell {
    padding: 0 20px;
  }

  .site-header .shell {
    padding: 10px 0;
    gap: 11px;
  }

  .nav-toggle-label {
    display: block;
    position: relative;
    order: -1;
    /* hamburger sits before the logo, as on the original */
    flex: 0 0 auto;
    width: 50px;
    /* the original's hamburger cell */
    height: 31px;
    cursor: pointer;
  }

  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    position: absolute;
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    content: '';
    transition: all var(--ease);
  }

  .nav-toggle-label span {
    top: 15px;
    left: 14px;
  }

  .nav-toggle-label span::before {
    top: -8px;
  }

  .nav-toggle-label span::after {
    top: 8px;
  }

  .nav {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    margin-left: 0;
    padding: 0;
    background: rgba(0, 0, 0, .9);
    opacity: 0;
    transition: all 400ms ease;
  }

  .nav ul {
    display: block;
  }

  .nav a {
    padding: 10px 0;
    color: var(--accent);
    text-align: center;
    font-size: 15px;
  }

  /* No highlight bar on small screens — the original leaves every link,
     including the current page's, in the accent colour. */
  .nav a:hover,
  .nav [aria-current='page'] {
    background: none;
    color: var(--accent);
  }

  .nav-toggle:checked~.nav {
    max-height: calc(100vh - 56px);
    padding: 10px 0;
    opacity: 1;
    overflow-y: auto;
  }

  .nav-toggle:checked~.nav-toggle-label span {
    background: transparent;
  }

  .nav-toggle:checked~.nav-toggle-label span::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle:checked~.nav-toggle-label span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .banner {
    min-height: 340px;
  }

  .banner h1,
  .banner h2,
  .banner-hero h1 {
    font-size: 52px;
  }

  .banner p {
    font-size: 19px;
  }

  .cols {
    display: block;
  }

  .cols>.col {
    width: auto !important;
    flex-basis: auto !important;
    margin-bottom: 25px;
  }

  .cols>.col:last-child {
    margin-bottom: 0;
  }

  figure.img-right,
  figure.img-left {
    text-align: center;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .banner-hero {
    min-height: calc(100vh - var(--header-h));
  }

  .banner h1,
  .banner h2,
  .banner-hero h1 {
    font-size: 34px;
  }

  .banner p {
    font-size: 16px;
  }

  h1,
  h2,
  .h2-like {
    font-size: 26px;
  }

  /* The original keeps the logo at 24px right down to phone widths. */
  .lightbox {
    padding: 20px 12px;
  }

  .lightbox-nav {
    font-size: 32px;
  }

  .gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {

  .site-header,
  .scroll-cue,
  .site-footer,
  .slideshow-btn {
    display: none;
  }

  body {
    background: #fff;
  }
}