@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #163b54;
  --muted: #5f7480;
  --paper: #fbfbf7;
  --paper-deep: #e8f2f5;
  --green: #0d4d70;
  --green-light: #a9dce8;
  --coral: #d96e52;
  --sea: #55aec4;
  --line: rgba(22, 59, 84, 0.16);
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 42px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.brand em { color: var(--coral); font-style: normal; }

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--paper);
  background: var(--green);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

nav { display: flex; gap: 28px; color: var(--muted); font-size: 12px; font-weight: 700; }
nav a:hover, .text-link:hover { color: var(--coral); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  min-height: 570px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 78px 42px 92px;
  overflow: hidden;
  color: var(--paper);
  background-image: linear-gradient(90deg, rgba(13, 77, 112, 0.98) 0%, rgba(13, 77, 112, 0.9) 37%, rgba(13, 77, 112, 0.52) 68%, rgba(13, 77, 112, 0.15) 100%), url('assets/cargese-institute.jpg');
  background-position: center;
  background-size: cover;
  border-radius: 0 0 28px 28px;
}

.hero-copy { position: relative; z-index: 1; max-width: 680px; }
.eyebrow { margin: 0 0 20px; color: var(--coral); font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; }

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 26px; font-size: clamp(3.2rem, 7vw, 6.4rem); font-weight: 600; letter-spacing: -0.075em; line-height: 0.98; }
h2 { margin-bottom: 16px; font-size: clamp(2.1rem, 4vw, 4rem); font-weight: 600; letter-spacing: -0.065em; line-height: 1.03; }

.hero-text { max-width: 520px; margin-bottom: 34px; color: rgba(244, 242, 235, 0.82); font-size: 16px; }
.button { display: inline-flex; align-items: center; gap: 26px; padding: 14px 17px 14px 20px; border: 1px solid transparent; border-radius: 100px; font-size: 12px; font-weight: 800; transition: transform 180ms ease, background 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-light { color: var(--green); background: var(--paper); }

.hero-orbit { position: absolute; inset: -80px -50px -80px auto; width: min(56vw, 620px); min-width: 380px; opacity: 0.72; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(169, 220, 232, 0.56); border-radius: 50%; transform: translate(-50%, -50%) rotate(-27deg); }
.orbit-one { width: 96%; height: 38%; }
.orbit-two { width: 74%; height: 55%; transform: translate(-50%, -50%) rotate(56deg); }
.orbit-three { width: 55%; height: 78%; transform: translate(-50%, -50%) rotate(123deg); }
.orbit-dot { position: absolute; width: 13px; height: 13px; background: var(--coral); border: 3px solid var(--green); border-radius: 50%; box-shadow: 0 0 0 1px rgba(217, 110, 82, 0.7); }
.dot-one { top: 30%; left: 25%; }
.dot-two { top: 66%; left: 72%; background: var(--green-light); }
.dot-three { top: 18%; left: 67%; }
.hero-year { position: absolute; top: 45%; left: 49%; color: var(--green-light); font-family: var(--mono); font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -0.1em; opacity: 0.75; transform: rotate(-8deg); }

.editions, .about { max-width: 1240px; margin: 0 auto; padding: 124px 42px; }
.section-heading { display: grid; grid-template-columns: 1fr 1.5fr; column-gap: 42px; align-items: end; margin-bottom: 55px; }
.section-heading .eyebrow { grid-column: 1 / -1; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p:last-child { max-width: 360px; margin-bottom: 3px; color: var(--muted); font-size: 14px; }
.edition-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.edition-card { display: flex; min-height: 365px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.18); transition: background 180ms ease, transform 180ms ease; }
.edition-card:hover { background: #fffdf6; transform: translateY(-5px); }
.edition-card-next { color: var(--paper); background: var(--green); border-color: var(--green); }
.edition-card-next:hover { background: #214c40; }
.card-topline { display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.edition-card-next .card-topline { color: var(--green-light); }
.card-year { margin: 52px 0 12px; color: var(--coral); font-family: var(--mono); font-size: 13px; }
.edition-card h3 { margin-bottom: 14px; font-size: 21px; font-weight: 600; letter-spacing: -0.045em; line-height: 1.12; }
.card-description { margin-bottom: 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.edition-card-next .card-description { color: rgba(244, 242, 235, 0.66); }
.card-link { display: inline-flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); color: var(--green); font-size: 12px; font-weight: 800; }
.edition-card-next .card-link { color: var(--green-light); border-color: rgba(169, 210, 160, 0.24); }

.photo-band { position: relative; display: grid; grid-template-columns: 1.45fr 0.55fr; max-width: 1240px; min-height: 365px; margin: 0 auto; overflow: hidden; color: var(--paper); background: var(--green); border-radius: 20px; }
.photo-band img { width: 100%; height: 100%; min-height: 365px; object-fit: cover; }
.photo-caption { display: flex; flex-direction: column; justify-content: center; padding: 38px; background: var(--green); }
.photo-caption .eyebrow { margin-bottom: 22px; }
.photo-title { margin-bottom: 28px; color: var(--paper); font-size: clamp(1.45rem, 2.3vw, 2.2rem); font-weight: 600; letter-spacing: -0.055em; line-height: 1.08; }
.photo-meta { margin-bottom: 0; color: rgba(244, 242, 235, 0.6); font-family: var(--mono); font-size: 10px; line-height: 1.6; text-transform: uppercase; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 10%; padding-top: 40px; padding-bottom: 120px; border-top: 1px solid var(--line); }
.about h2 { max-width: 500px; }
.about-copy { max-width: 420px; padding-top: 30px; color: var(--muted); font-size: 17px; }
.text-link { display: inline-block; margin-top: 12px; color: var(--ink); font-size: 12px; font-weight: 800; }

.site-footer { display: flex; justify-content: space-between; max-width: 1240px; margin: 0 auto; padding: 25px 42px 38px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; }

.gallery, .organisers { max-width: 1240px; margin: 0 auto; padding: 120px 42px; }
.gallery { border-top: 1px solid var(--line); }
.gallery-page { max-width: 1240px; margin: 0 auto; padding: 70px 0 110px; }
.gallery-page-intro { max-width: 720px; padding: 0 42px 70px; }
.gallery-page-intro h1 { margin-bottom: 20px; font-size: clamp(3rem, 7vw, 6rem); }
.gallery-page-intro > p:not(.eyebrow) { max-width: 560px; margin-bottom: 24px; color: var(--muted); }
.gallery-page-section { padding-top: 80px; padding-bottom: 0; }
.gallery-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: -22px 0 28px; }
.gallery-filter { padding: 9px 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 100px; cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; transition: background 180ms ease, border-color 180ms ease, color 180ms ease; }
.gallery-filter:hover, .gallery-filter.is-active { color: var(--paper); background: var(--green); border-color: var(--green); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gallery-card, .gallery-card-large, .gallery-card-wide { position: relative; grid-column: auto; height: 230px; min-height: 0; margin: 0; overflow: hidden; background: var(--green); border-radius: 16px; }
.gallery-card img { display: block; width: 100%; height: 230px; max-height: 230px; min-height: 0; object-fit: cover; transition: transform 400ms ease; }
.gallery-card:hover img { transform: scale(1.035); }
.gallery-card::after { position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, rgba(7, 42, 63, 0.88)); content: ''; pointer-events: none; }
.gallery-card figcaption { position: absolute; right: 24px; bottom: 22px; left: 24px; z-index: 1; color: var(--paper); }
.gallery-card figcaption span { display: block; margin-bottom: 7px; color: var(--green-light); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.gallery-card figcaption strong { display: block; max-width: 480px; font-size: clamp(1.1rem, 2vw, 1.65rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.gallery-card.is-hidden { display: none; }
.gallery-actions { display: flex; justify-content: center; padding-top: 30px; }

.organisers { border-top: 1px solid var(--line); }
.organiser-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.organiser-card { display: grid; grid-template-columns: 180px 1fr; gap: 26px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.32); }
.organiser-photo { min-height: 230px; overflow: hidden; background: linear-gradient(145deg, var(--green), var(--sea)); border-radius: 11px; }
.organiser-photo img { display: block; width: 100%; height: 100%; min-height: 230px; object-fit: cover; }
.organiser-photo-florent img { object-position: center 38%; }
.organiser-copy { align-self: center; }
.organiser-copy .eyebrow { margin-bottom: 12px; }
.organiser-copy h3 { margin-bottom: 12px; font-size: 25px; font-weight: 600; letter-spacing: -0.05em; }
.organiser-copy p:not(.eyebrow):not(.organiser-note) { color: var(--muted); font-size: 14px; }
.organiser-note { margin: 18px 0 0; color: var(--muted); font-family: var(--mono); font-size: 9px; line-height: 1.5; }
.organiser-note a { color: var(--green); text-decoration: underline; text-decoration-color: var(--green-light); text-underline-offset: 3px; }
code { color: var(--green); font-family: inherit; }

.archive-page { max-width: 1240px; margin: 0 auto; padding: 72px 42px 120px; }
.archive-intro { max-width: 850px; margin-bottom: 58px; }
.archive-intro h1 { margin-bottom: 24px; color: var(--green); font-size: clamp(3rem, 6vw, 6rem); }
.archive-date { margin-bottom: 0; color: var(--coral); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.archive-feature { display: grid; grid-template-columns: 1.35fr 0.65fr; overflow: hidden; color: var(--paper); background: var(--green); border-radius: 20px; }
.archive-feature img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; object-position: center; }
.archive-feature-copy { display: flex; flex-direction: column; justify-content: center; padding: 48px; }
.archive-feature-copy .eyebrow { margin-bottom: 24px; }
.archive-feature-copy p:not(.eyebrow) { color: rgba(244, 242, 235, 0.74); font-size: 15px; }
.archive-details { display: grid; grid-template-columns: 1fr 0.7fr; gap: 12%; padding-top: 96px; }
.archive-details h2 { max-width: 560px; }
.archive-details p:not(.eyebrow) { max-width: 610px; color: var(--muted); }
.archive-actions { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 24px; }
.button-dark { color: var(--paper); background: var(--green); }
.button-dark:hover { background: #214c40; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 620px; }
  .hero-orbit { right: -220px; bottom: -120px; top: auto; width: 640px; height: 420px; }
  .edition-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-band { grid-template-columns: 1fr 0.65fr; }
  .archive-feature, .archive-details { grid-template-columns: 1fr; }
  .archive-feature-copy { padding: 36px; }
  .archive-actions { padding-top: 10px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-card, .gallery-card-large, .gallery-card-wide { grid-column: auto; }
  .organiser-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header, .hero, .editions, .about, .gallery, .organisers, .site-footer { padding-left: 22px; padding-right: 22px; }
  .site-header { padding-top: 22px; }
  nav { gap: 15px; }
  .hero { min-height: 680px; padding-top: 64px; border-radius: 0 0 20px 20px; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .hero-orbit { right: -230px; bottom: -80px; }
  .editions, .about { padding-top: 80px; padding-bottom: 80px; }
  .gallery-page { padding-top: 50px; }
  .gallery-page-intro { padding-right: 22px; padding-bottom: 50px; padding-left: 22px; }
  .section-heading, .about { display: block; }
  .section-heading > p:last-child { margin-top: 22px; }
  .edition-grid { grid-template-columns: 1fr; }
  .edition-card { min-height: 320px; }
  .photo-band { display: block; }
  .photo-band img { display: block; min-height: 280px; height: 280px; }
  .photo-caption { min-height: 250px; padding: 30px 24px; }
  .about-copy { padding-top: 10px; }
  .archive-page { padding-top: 50px; }
  .archive-intro h1 { font-size: clamp(2.8rem, 14vw, 5rem); }
  .archive-feature img { min-height: 240px; height: 240px; }
  .archive-feature-copy { padding: 30px 24px; }
  .gallery, .organisers { padding-top: 80px; padding-bottom: 80px; }
  .gallery-grid { display: block; }
  .gallery-card, .gallery-card-large, .gallery-card-wide { height: 290px; min-height: 0; margin-bottom: 14px; }
  .gallery-card img { height: 290px; max-height: 290px; }
  .organiser-card { display: block; }
  .organiser-photo { min-height: 250px; margin-bottom: 22px; }
  .site-footer { display: block; line-height: 2; }
  .site-footer span { display: block; }
}
