:root {
  --paper: #f6f1ec;
  --ink: #151515;
  --navy: #1b2f86;
  --line: #c8c3be;
  --shadow: 0 10px 28px rgba(19, 23, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  background: var(--paper);
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  padding: 1.5rem 2.25rem 0.5rem;
  color: var(--navy);
}

.header a {
  color: var(--navy);
  text-decoration: none;
}

.header-left {
  min-width: 0;
}

.header-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
  font-size: clamp(2.1rem, 4.8vw, 4.4rem);
  line-height: 0.9;
}

.header-subtitle {
  margin-top: 0.4rem;
  font-style: italic;
  letter-spacing: 0.16em;
  font-size: clamp(1.15rem, 2vw, 2.15rem);
}

.header-rule {
  width: min(11rem, 30vw);
  height: 3px;
  margin-top: 0.85rem;
  background: var(--navy);
}

.header-right {
  margin-left: auto;
  padding-top: 0.5rem;
}

.header-right-text {
  text-align: left;
  font-size: clamp(1rem, 1.85vw, 2.6rem);
  line-height: 1.2;
}

.page-main {
  display: flex;
  width: 100%;
  min-height: 0;
  padding: 0.25rem 2.25rem 0;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.stage {
  width: min(100%, 1100px);
  height: 100%;
  display: grid;
  grid-template-columns: minmax(5.5rem, 7.5rem) minmax(20rem, 45rem) minmax(
      8.5rem,
      12.5rem
    );
  grid-template-rows: minmax(0, 1fr);
  justify-content: center;
  align-items: stretch;
  column-gap: clamp(1rem, 2vw, 2.5rem);
  position: relative;
  margin: 0 auto;
}

.bite-card {
  --card-footer-height: 6rem;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  position: relative;
  perspective: 1600px;
  transform-style: preserve-3d;
  justify-self: stretch;
  align-self: stretch;
}

.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 3rem;
  padding-top: 2rem;
  background: var(--paper);
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-face--front {
  transform: rotateY(0deg);
  z-index: 2;
}

.card-face--back {
  transform: rotateY(180deg);
}

.bite-card.is-flipped .card-face--front {
  transform: rotateY(-180deg);
}

.bite-card.is-flipped .card-face--back {
  transform: rotateY(0deg);
}

.card-header {
  --balloon-size: clamp(0.8rem, 7vw, 3.5rem);
  max-height: 7rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--balloon-size);
  grid-template-rows: auto auto auto;
  column-gap: clamp(0.65rem, 1.2vw, 1.1rem);
  align-content: start;
}

.card-top-row {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-kicker {
  flex-shrink: 0;
  background: var(--navy);
  color: #ffffff;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(0.9rem, 1.45vw, 1.5rem);
  padding: 0.32rem 0.75rem 0.36rem;
  line-height: 1;
}

.card-top-line {
  height: 2px;
  background: var(--ink);
  margin-top: 0;
  width: 100%;
  opacity: 0.9;
}

.card-balloon {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: start;
  width: var(--balloon-size);
  height: auto;
  margin-top: 0;
  margin-left: 0;
}

.card-title {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  line-height: 1;
  font-size: clamp(1.35rem, 2vw, 2.45rem);
  font-weight: 500;
}

.card-line {
  grid-column: 1;
  grid-row: 3;
  width: clamp(3.8rem, 8vw, 5.3rem);
  height: 2px;
  background: var(--ink);
}

.card-main-copy {
  margin: 0 2rem 0 0;
  margin-top: clamp(0rem, 0.4vw, 1rem);
  padding: 0.75rem 0;
  max-width: 100%;
  min-width: 0;
  max-height: calc(100% - var(--card-footer-height));
  font-size: 2.25rem;
  line-height: 0.96;
  font-weight: 500;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.card-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--card-footer-height);
  z-index: 2;
}

.card-authors {
  position: absolute;
  left: clamp(1.2rem, 2vw, 2rem);
  top: auto;
  bottom: 3.7rem;
  color: #101010;
  z-index: 2;
}

.author-rule {
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 3px;
  height: clamp(0.8rem, 3vw, 3rem);
  background: #111111;
}

.card-authors p {
  margin: 0;
  padding-left: 1.45rem;
  text-transform: uppercase;
  font-family: "Cinzel", serif;
  letter-spacing: 0.14em;
  line-height: 1.2;
  font-size: 0.75rem;
  font-weight: 500;
}

.card-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4.9rem;
  z-index: 1;
  background-color: var(--card-wave-bg, transparent);
  background-image: url("assets/card-footer-hills.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

.nav-control {
  background: transparent;
  border: 0;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-transform: uppercase;
  cursor: pointer;
  font-family: "Cinzel", serif;
  letter-spacing: 0.14em;
}

.nav-circle {
  width: clamp(3.8rem, 4.7vw, 4.6rem);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 4vw, 4rem);
  line-height: 1;
  padding-bottom: 0.3rem;
}

.nav-label {
  font-size: clamp(1rem, 1.45vw, 1.45rem);
  font-weight: 600;
}

.nav-prev {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
}

.nav-next {
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  margin-bottom: 0;
}

.click-here {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  border: 2px solid var(--navy);
  border-radius: 1.25rem;
  background: rgba(253, 251, 249, 0.9);
  color: var(--navy);
  padding: 1rem 1.5rem;
  cursor: pointer;
  margin: 0 0 2rem 1rem;
  transform: none;
}

.click-here-icon {
  width: 2.9rem;
  height: 2.9rem;
  display: inline-flex;
}

.click-here-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.click-here-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.click-here-text strong {
  text-transform: uppercase;
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1;
}

.click-here-text small {
  font-size: clamp(1rem, 1.45vw, 1.35rem);
  line-height: 1.05;
}

.site-footer {
  margin: clamp(0.35rem, 1vh, 1rem) 2.25rem 0;
  padding-bottom: clamp(0.45rem, 1vh, 1rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(0.6rem, 1.2vh, 1.2rem);
}

.footer-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(8rem, 1fr));
  align-items: start;
  gap: clamp(0.3rem, 0.7vw, 0.85rem);
}

.filter-item {
  border: 0;
  background: transparent;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.1rem;
  cursor: pointer;
  margin-right: 1rem;
  margin-left: 1rem;
}

.filter-icon {
  width: clamp(2rem, 4.2vw, 3.4rem);
  height: clamp(2rem, 4.2vw, 3.4rem);
  display: inline-flex;
}

.filter-icon img,
.filter-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.filter-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter-label {
  font-size: clamp(0.75rem, 2vw, 1rem);
  line-height: 1.05;
  text-align: center;
  margin-bottom: 0.5rem;
}

.filter-item.is-active {
  background: var(--navy);
  color: var(--paper);
}

.site-signature {
  margin: 0.95rem 0 0;
  text-align: center;
  text-transform: uppercase;
  font-family: "Cinzel", serif;
  letter-spacing: 0.18em;
  color: var(--navy);
  font-size: clamp(0.9rem, 1.1vw, 1.15rem);
}

@media (max-width: 980px) {
  .header-right {
    margin-left: 0;
  }

  .stage {
    grid-template-columns: clamp(3.2rem, 11vw, 4.8rem) minmax(0, 1fr) minmax(
        8.5rem,
        10rem
      );
    grid-template-rows: minmax(0, 1fr);
    column-gap: clamp(0.4rem, 1.2vw, 0.85rem);
    margin-top: 0;
  }

  .bite-card {
    padding: 3rem;
    padding-right: 3rem;
  }

  .card-header {
    max-height: 6.5rem;
  }

  .card-title {
    font-size: clamp(1.25rem, 2vw, 2.45rem);
  }

  .card-main-copy {
    max-width: 100%;
    line-height: 1.04;
  }

  .nav-control {
    gap: 0.4rem;
  }

  .nav-circle {
    width: clamp(2.5rem, 6vw, 3.4rem);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    padding-bottom: 0.15rem;
  }

  .nav-label {
    font-size: clamp(0.68rem, 1.5vw, 1rem);
  }

  .card-authors {
    bottom: 3.5rem;
  }

  .click-here {
    gap: 0.65rem;
    padding: 0.55rem 0.8rem;
    border-radius: 1rem;
  }

  .click-here-icon {
    width: 2rem;
    height: 2rem;
  }

  .click-here-text strong {
    font-size: clamp(0.82rem, 1.5vw, 1.05rem);
  }

  .click-here-text small {
    font-size: clamp(0.74rem, 1.35vw, 0.96rem);
  }
}

@media (max-width: 700px) {
  .header,
  .page-main,
  .site-footer {
    margin: 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-footer {
    margin-top: 0.95rem;
  }

  .stage {
    grid-template-columns: clamp(2.35rem, 11vw, 3.5rem) minmax(0, 1fr) clamp(
        2.35rem,
        11vw,
        3.5rem
      );
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: clamp(0.25rem, 1vw, 0.6rem);
    row-gap: 0.45rem;
  }

  .bite-card {
    border-radius: 1rem;
    padding-left: 1.5rem;
    padding-right: 1.1rem;
  }

  .card-header {
    --balloon-size: clamp(2.5rem, 11vw, 3.5rem);
    max-height: 6rem;
    grid-template-columns: minmax(0, 1fr) var(--balloon-size);
    column-gap: 0.5rem;
  }

  .card-title {
    font-size: clamp(1.2rem, 2vw, 2.4rem);
    margin-top: 0.15rem;
  }

  .card-authors p {
    letter-spacing: 0.1em;
    font-size: 0.6rem;
  }

  .card-authors {
    bottom: 3rem;
  }

  .card-wave {
    background-size: auto 100%;
    background-position: left bottom;
  }

  .nav-circle {
    width: clamp(2.2rem, 10vw, 2.7rem);
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .nav-label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  .click-here {
    position: static;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.5rem;
    margin: 0 0.25rem 0 0;
    z-index: 1;
  }

  .click-here-icon {
    width: 1.65rem;
    height: 1.65rem;
  }

  .click-here-text {
    align-items: center;
    text-align: center;
    max-width: 4.5rem;
  }

  .click-here-text strong {
    font-size: 0.74rem;
    white-space: normal;
  }

  .click-here-text small {
    font-size: 0.68rem;
    white-space: normal;
    line-height: 1.1;
  }

  .footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0.3rem;
    row-gap: 0.4rem;
  }

  .filter-item {
    padding: 0.05rem;
  }
}

@media (max-width: 520px) {
  .header-title {
    font-size: clamp(1.75rem, 4.5vw, 3.2rem);
  }
  .header-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.5rem);
  }
  .header-right-text {
    font-size: clamp(0.8rem, 1.5vw, 1.3rem);
  }

  .card-header {
    --balloon-size: clamp(2rem, 7vw, 3rem);
  }
  .card-balloon {
    --balloon-size: clamp(2rem, 7vw, 3rem);
  }

  .card-title {
    font-size: clamp(0.7rem, 2vw, 2.2rem);
  }

  .card-face {
    padding: 2rem;
    padding-top: 1rem;
  }

  .card-main-copy {
    margin: 0;
  }
}

@media (max-width: 400px) {
  body {
    min-height: 650px;
  }

  .bite-card {
    padding: 1.5rem;
    padding-right: 1.5rem;
  }

  .card-balloon,
  .card-top-line {
    display: none;
  }

  .card-title {
    font-size: clamp(0.7rem, 2vw, 2.2rem);
    margin-bottom: 3px;
    white-space: nowrap;
  }

  .card-line {
    height: 1px;
  }

  .bite-card {
    --card-footer-height: 5rem;
  }

  .nav-label {
    font-size: clamp(0.5rem, 1.5vw, 0.9rem);
  }

  .card-authors p {
    font-size: 0.5rem;
  }
}
