/* ============================================================
   Concorso Leoncavallo — main.css
   Mobile-first. Vanilla CSS with custom properties + nesting.
   ============================================================ */

/* --- 0. Fonts ---------------------------------------------------- */

@font-face {
  font-family: "Bruney";
  src: url("/assets/fonts/Bruney.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("/assets/fonts/HelveticaNeueLight.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/assets/fonts/HelveticaNeue.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/assets/fonts/HelveticaNeueItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/assets/fonts/HelveticaNeueMedium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/assets/fonts/HelveticaNeueBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- 1. Tokens --------------------------------------------------- */

:root {
  /* colors */
  --c-bg-cream:    #d4cbba;
  --c-bg-dark:     #2f2f2f;
  --c-bg-darkest:  #000000;
  --c-bg-mid:      #444444;
  --c-bg-light:    #ffffff;

  --c-text-dark:    #2f2f2f;
  --c-text-cream:   #d4cbba;
  --c-text-light:   #ffffff;
  --c-text-muted:   #6e6e6e;
  --c-placeholder:  #d9d9d9;
  --c-border:       rgba(47, 47, 47, 0.18);

  --f-display: "Bruney", "Cormorant Garamond", Georgia, serif;
  --f-body:    "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* fluid type scale: clamp(min, preferred, max) */
  --fs-hero:        clamp(2.75rem, 4.5vw + 1rem, 6.25rem);   /* ~44 → 100px */
  --fs-section:     clamp(2.25rem, 3.4vw + 1rem, 5rem);      /* ~36 → 80px  */
  --fs-card-title:  clamp(1.375rem, 0.647vw + 1.223rem, 2rem); /* 22px → 32px @ 1920px */
  --fs-jury-name:   clamp(1.375rem, 1.4vw + 0.9rem, 2.25rem);
  --fs-body-lg:     clamp(1.0625rem, 0.5vw + 0.95rem, 1.5rem); /* ~17 → 24px */
  --fs-body:        clamp(1rem, 0.2vw + 0.9rem, 1.125rem);
  --fs-small:       0.875rem;
  --fs-meta:        0.75rem;

  /* spacing — 8 px scale */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.5rem;
  --sp-6:  2rem;
  --sp-7:  3rem;
  --sp-8:  4rem;
  --sp-9:  6rem;
  --sp-10: 8rem;

  /* radius */
  --r-pill: 999px;
  --r-card: 1.25rem;

  /* layout */
  --container-pad: clamp(1.25rem, 3vw, 2.5rem);
  --container-max: 90rem; /* ~1440px */

  /* misc */
  --line: 1px solid var(--c-border);

  /* line-heights */
  --lh-extratight: 1.05;
  --lh-tight: 1.1;
  --lh-normal: 1.4;

}

/* --- 2. Reset / base ------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg-dark);
  color: var(--c-text-dark);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }
svg { display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease;
}
a:hover { opacity: 0.7; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  line-height: var(--lh-extratight);
  letter-spacing: -0.005em;
  font-family: var(--f-display);
}

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--c-text-dark); color: var(--c-bg-cream); }

/* --- 3. Layout primitives -------------------------------------- */

.container {
  width: 100%;
  /* max-width: var(--container-max); */
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* --- Framed title / framed meta-block (reusable) --------------- */

.framed {
  display: grid;
  gap: var(--sp-4);
  width: 100%;
  margin-bottom: var(--sp-7);
}

.framed__line {
  position: relative;
  display: block;
  height: 1px;
  background: currentColor;
  width: 100%;
}

.framed__title {
  font-family: var(--f-display);
  font-size: var(--fs-section);
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
  text-align: center;
  line-height: 1;
}

.framed--rombi .framed__line::before,
.framed--rombi .framed__line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.framed--rombi .framed__line::before { left: 0; }
.framed--rombi .framed__line::after  { right: 0; }

/* standalone divider — same look as .framed__line, usable anywhere */
.divider {
  position: relative;
  display: block;
  height: 1px;
  background: currentColor;
  width: 100%;
}
.divider--rombi::before,
.divider--rombi::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.divider--rombi::before { left: 0; }
.divider--rombi::after  { right: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.95rem 1.75rem;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: clamp(1rem, 0.4vw + 0.95rem, 1.25rem);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }

.btn--primary {
  background: var(--c-bg-cream);
  color: var(--c-text-dark);
}
.btn--primary:hover { background: #c2b89e; }

.btn--outline {
  background: transparent;
  color: var(--c-text-dark);
  border-color: var(--c-text-dark);
}
.btn--outline:hover { background: var(--c-text-dark); color: var(--c-bg-cream); }

/* --- 4. Site header -------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-bg-darkest);
  color: var(--c-text-cream);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr 0.07fr auto;
  align-items: center;
  gap: var(--sp-5);
  min-height: 64px;
  padding-block: var(--sp-3);
}

.site-header__brand {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-header__contact {
  font-family: var(--f-body);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lang-switcher {
  display: inline-flex;
  gap: var(--sp-3);
  align-items: center;
  font-family: var(--f-body);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lang-switcher__item {
  opacity: 0.6;
  font-weight: 400;
}
.lang-switcher__item.is-active {
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- 5. Hero --------------------------------------------------- */

.hero {
  background: var(--c-bg-dark);
  color: var(--c-text-cream);
  padding-block: clamp(3.5rem, 3vw, 3rem) clamp(2rem, 4vw, 3.5rem);
}

.hero__inner {
  display: grid;
  gap: var(--sp-6);
  text-align: center;
  justify-items: center;
}

.hero__title {
  font-family: var(--f-display);
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: var(--lh-extratight);
  letter-spacing: -0.005em;
  margin: 0 0 var(--sp-10);
  width: 100%;
}

/* hero meta uses .framed.framed--rombi but with no bottom margin */
.hero__meta.framed {
  margin-bottom: 0;
  margin-block: var(--sp-2);
  gap: var(--sp-3);
}

.hero__meta-items {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: var(--fs-meta);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.hero__meta-items li { padding: 0 var(--sp-2); }

.hero__subtitle {
  font-style: italic;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 1.5vw + 1rem, 2.5rem);
  margin: 0;
}

.hero__body {
  font-family: var(--f-body);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-normal);
  width: 100%;
  max-width: none;
  text-align: left;
}

/* --- 6. Intro boxes -------------------------------------------- */

.intro-boxes {
  background: var(--c-bg-dark);
  color: var(--c-text-cream);
  padding-block: clamp(2rem, 5vw, 4rem);
}

.intro-boxes__list {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}

.intro-boxes__item {
  position: relative;
  border-top: 1px solid currentColor;
  padding-top: var(--sp-4);
}
.intro-boxes__item::before,
.intro-boxes__item::after {
  content: "";
  position: absolute;
  top: 0;
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.intro-boxes__item::before { left: 0; }
.intro-boxes__item::after  { right: 0; }

.intro-boxes__title {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: var(--fs-card-title);
  margin-bottom: var(--sp-3);
  line-height: 1.15;
}

.intro-boxes__text {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: rgba(212, 203, 186, 0.85);
}

@media (min-width: 720px) {
  .intro-boxes__list { grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); }
}

/* --- 6b. CTA block (after intro boxes) ------------------------ */

.cta {
  background: var(--c-bg-dark);
  color: var(--c-text-cream);
  padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem);
  text-align: center;
}
.cta .container { display: flex; justify-content: center; }

/* --- 7. Jury --------------------------------------------------- */

.jury {
  background: var(--c-bg-cream);
  color: var(--c-text-dark);
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.jury__grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}

.jury-card { display: flex; flex-direction: column; gap: var(--sp-4); }

.jury-card__media {
  margin: 0;
  aspect-ratio: 1 / 1.21;
  background: rgba(47, 47, 47, 0.08);
  overflow: hidden;
  
}
.jury-card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1); }
.jury-card__media--empty {}

.jury-card__name {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: var(--fs-jury-name);
  margin-bottom: var(--sp-3);
}
.jury-card__bio {
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--c-text-dark);
}

@media (min-width: 600px) {
  .jury__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-7); }
}
@media (min-width: 980px) {
  .jury__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .jury__grid { grid-template-columns: repeat(5, 1fr); gap: var(--sp-6); }
}

/* --- 8. Prizes ------------------------------------------------- */

.prizes {
  background: var(--c-bg-darkest);
  color: var(--c-text-cream);
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.prizes__grid {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

.prize-card {
  border-top: 1px solid var(--c-text-cream);
  padding-block: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* .prize-card:last-child { border-bottom: 1px solid var(--c-text-cream); } */

.prize-card__label {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: clamp(1.25rem, 1vw + 0.95rem, 1.875rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.prize-card__amount {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: clamp(1.125rem, 0.6vw + 0.95rem, 1.5rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.prize-card__note {
  font-size: var(--fs-body);
  color: rgba(212, 203, 186, 0.75);
  margin: var(--sp-2) 0 0;
  max-width: 28ch;
  line-height: 1.5;
}

@media (min-width: 720px) {
  .prizes__grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--sp-7);
  }
  .prize-card:nth-child(-n+2):last-child,
  .prize-card { border-bottom: 0; }
}
@media (min-width: 1080px) {
  .prizes__grid { grid-template-columns: repeat(4, 1fr); column-gap: var(--sp-6); }
}

/* --- 9. Program ------------------------------------------------ */

.program {
  background: var(--c-bg-mid);
  color: var(--c-text-light);
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.program .section-title { color: var(--c-text-light); }

.program__grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
  counter-reset: step;
}

.program-card {
  border: 1px solid var(--c-text-light);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: transparent;
}

.program-card__title {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: var(--fs-card-title);
  line-height: 1.2;
  margin: 0;
}

.program-card__body {
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: rgba(255, 255, 255, 0.85);
}

.program-card__body p { white-space: pre-line; }

@media (min-width: 720px) {
  .program__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
}
@media (min-width: 1080px) {
  .program__grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- 10. Regulations ------------------------------------------- */

.regulations {
  background: var(--c-bg-cream);
  color: var(--c-text-dark);
  padding-block: clamp(3.5rem, 8vw, 7rem);
  position: relative;
  overflow: hidden;
}

.regulations__bg {
  position: absolute;
  right: 0;
  top: 0;
  transform: translateX(10%);
  width: clamp(20rem, 90vw, 60rem);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.regulations .container { position: relative; z-index: 1; }

.regulations__intro {
  max-width: 70ch;
  margin: 0 0 var(--sp-8);
  font-size: var(--fs-body-lg);
  line-height: 1.45;
}
.regulations__intro p:first-child strong {
  display: block;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: var(--fs-body-lg);
  letter-spacing: 0;
  margin-bottom: var(--sp-2);
}

.regulations__list {
  margin-bottom: var(--sp-7);
  max-width: 60%;
}

.regulations__article {
  border-bottom: 1px solid var(--c-text-dark);
}
.regulations__article:first-child {
  border-top: 1px solid var(--c-text-dark);
}

.regulations__summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-4);
  font-size: var(--fs-body);
  transition: background-color .2s ease;
}
.regulations__summary::-webkit-details-marker { display: none; }
.regulations__summary::marker { content: ""; }
.regulations__summary:hover { background: rgba(47, 47, 47, 0.06); }

.regulations__num {
  font-weight: 400;
  letter-spacing: 0.04em;
}

.regulations__title-art { font-weight: 500; }

.regulations__arrow {
  position: relative;
  width: 2rem; height: 2rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: transform .25s ease;
  user-select: none;
}
.regulations__arrow::before,
.regulations__arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.regulations__arrow::before {
  width: 0.85rem;
  height: 1px;
}
.regulations__arrow::after {
  width: 1px;
  height: 0.85rem;
}
.regulations__article[open] .regulations__arrow {
  transform: rotate(45deg);
}

.regulations__body {
  padding: var(--sp-3) var(--sp-5) var(--sp-6) calc(4rem + var(--sp-3));
  font-size: var(--fs-body);
  line-height: 1.6;
}
.regulations__body p { margin: 0 0 var(--sp-4); }
.regulations__body p:last-child { margin-bottom: 0; }
.regulations__body ul, .regulations__body ol { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); list-style: revert; }
.regulations__body ul li, .regulations__body ol li { margin-bottom: var(--sp-2); }
.regulations__body h2, .regulations__body h3, .regulations__body h4 { font-family: var(--f-body); font-weight: 700; font-size: var(--fs-body-lg); margin: var(--sp-5) 0 var(--sp-3); letter-spacing: 0; line-height: 1.3; }
.regulations__body a { text-decoration: underline; }
.jury-card__bio ul, .jury-card__bio ol { margin: 0 0 1em; padding-left: 1.25em; list-style: revert; }
.jury-card__bio a { text-decoration: underline; }
.intro-boxes__text ul, .intro-boxes__text ol { margin: 0 0 0.5em; padding-left: 1.25em; list-style: revert; }
.program-card__body ul, .program-card__body ol { margin: 0 0 1em; padding-left: 1.25em; list-style: revert; }

.regulations__actions { text-align: center; margin-top: var(--sp-7); }

.regulations__signoff {
  margin-top: var(--sp-8);
  font-size: var(--fs-small);
  text-align: center;
  opacity: 0.7;
  line-height: 1.6;
  max-width: 60%;
}

@media (max-width: 720px) {
  .regulations__list { max-width: 100%; }
  .regulations__signoff { max-width: 100%; }
}

@media (min-width: 720px) {
  .regulations__summary {
    grid-template-columns: 7rem 1fr auto;
    padding-block: var(--sp-5);
    font-size: var(--fs-body-lg);
  }
  .regulations__body {
    padding: var(--sp-4) var(--sp-6) var(--sp-7) calc(7rem + var(--sp-3));
  }
}

/* --- 11. Sponsors ---------------------------------------------- */

.sponsors {
  background: var(--c-bg-light);
  color: var(--c-text-dark);
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.sponsors__grid {
  display: grid;
  column-gap: var(--sp-5);
  row-gap: var(--sp-3);
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
}

.sponsors__item {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 1;
}
.sponsors__item img { max-width: 80%; max-height: 70%; object-fit: contain; transform: scale(var(--logo-scale, 1)); transform-origin: center; }

.sponsors__item:nth-child(1)  img { --logo-scale: 1; }
.sponsors__item:nth-child(2)  img { --logo-scale: 0.6; }
.sponsors__item:nth-child(3)  img { --logo-scale: 1.3; }
.sponsors__item:nth-child(4)  img { --logo-scale: 0.6; }
.sponsors__item:nth-child(5)  img { --logo-scale: 2.3; }
.sponsors__item:nth-child(6)  img { --logo-scale: 1; }
.sponsors__item:nth-child(7)  img { --logo-scale: 1; }
.sponsors__item:nth-child(9)  img { --logo-scale: 1; }
.sponsors__item:nth-child(10) img { --logo-scale: 1; }
.sponsors__item:nth-child(12) img { --logo-scale: 1; }
.sponsors__item:nth-child(13) img { --logo-scale: 1; }
.sponsors__item:nth-child(14) img { --logo-scale: 1; }
.sponsors__item:nth-child(15) img { --logo-scale: 1; }
.sponsors__name { font-size: 0.95rem; font-weight: 500; text-align: center; padding: 0.5rem; line-height: 1.3; opacity: 0.85; }
.sponsors__item--placeholder {
  background: var(--c-placeholder);
  border-radius: 4px;
}

@media (min-width: 600px) { .sponsors__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) {
	.sponsors__grid {
		grid-template-columns: repeat(5, 1fr);
		column-gap: var(--sp-5);
		row-gap: var(--sp-3);
	}
}
/* --- 12. Footer ------------------------------------------------ */

.site-footer {
  background: var(--c-bg-darkest);
  color: var(--c-text-cream);
  padding-block: var(--sp-6);
  font-size: var(--fs-body);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: flex-start;
  justify-content: space-between;
}

.site-footer__copy { margin: 0; opacity: 0.85; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.site-footer__social { display: flex; gap: var(--sp-4); align-items: center; }
.site-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--c-text-cream); border: 1px solid rgba(212, 203, 186, 0.35); transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.site-footer__social a:hover { background: var(--c-text-cream); color: var(--c-bg-darkest); border-color: var(--c-text-cream); opacity: 1; }

@media (min-width: 720px) {
  .site-footer__inner { flex-direction: row; align-items: center; }
}

/* --- 13. Print-friendliness / a11y ----------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}
