:root {
  --forest: #06120b;
  --forest-deep: #020704;
  --surface: #0a1710;
  --green: #9bdc28;
  --lime: #d8ff9a;
  --white: #f8fbf8;
  --muted: #b7c7ba;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
  --ease: cubic-bezier(0.22, 0.72, 0.18, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--forest-deep);
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(120, 182, 75, 0.19), transparent 38%),
    linear-gradient(155deg, #06120b 0%, #020704 52%, #07130c 100%);
  color: var(--white);
  font-family: "Arial Nova", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image:
    repeating-radial-gradient(
      ellipse at 12% 4%,
      transparent 0 36px,
      rgba(183, 216, 141, 0.055) 37px,
      transparent 38px 72px
    ),
    repeating-radial-gradient(
      ellipse at 92% 18%,
      transparent 0 48px,
      rgba(183, 216, 141, 0.04) 49px,
      transparent 50px 96px
    );
  content: "";
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000, transparent 68%);
}

body::after {
  position: fixed;
  z-index: 20;
  inset: 0;
  border: 1px solid rgba(216, 255, 154, 0.08);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

.ambient {
  position: fixed;
  z-index: 0;
  top: -16rem;
  left: 50%;
  width: min(88vw, 78rem);
  height: 34rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(131, 197, 79, 0.11);
  filter: blur(100px);
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1380px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 3vw, 42px)
    max(13px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
  gap: 2px;
  min-height: 70px;
  opacity: 0;
  transform: translateY(-12px);
  animation: enter 0.75s var(--ease) 0.05s forwards;
}

.brand-mark {
  position: relative;
  display: block;
  width: 66px;
  height: 66px;
  overflow: hidden;
  border: 1px solid rgba(216, 255, 154, 0.36);
  border-radius: 50%;
  background: #030804;
  box-shadow:
    0 0 0 5px rgba(216, 255, 154, 0.04),
    0 14px 32px rgba(0, 0, 0, 0.42);
}

.brand-mark img {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 140px;
  max-width: none;
  transform: translateX(-50%);
}

.brand-mark::after {
  position: absolute;
  inset: auto 0 0;
  height: 13px;
  background: linear-gradient(to bottom, transparent, #030804 74%);
  content: "";
  pointer-events: none;
}

.brand-name {
  margin-left: 10px;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 800;
  letter-spacing: -0.055em;
}

.brand-name strong {
  color: var(--green);
}

.intro {
  flex: 0 0 auto;
  margin: clamp(16px, 2.2vh, 26px) auto clamp(20px, 3vh, 34px);
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  animation: enter 0.85s var(--ease) 0.12s forwards;
}

.intro h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 850;
  line-height: 0.96;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.intro h1 span {
  color: var(--green);
}

.intro p {
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.5;
  text-wrap: balance;
}

.regions {
  display: flex;
  flex: 1 1 auto;
  gap: clamp(10px, 1vw, 16px);
  min-height: 390px;
  max-height: 560px;
}

.region-card {
  --accent: var(--green);
  --x: 0px;
  --y: 0px;
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 28%);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.25);
  color: var(--white);
  text-decoration: none;
  isolation: isolate;
  opacity: 0;
  transform: translateY(22px);
  transition:
    flex 0.65s var(--ease),
    transform 0.35s var(--ease),
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    opacity 0.35s ease;
  animation: card-enter 0.8s var(--ease) forwards;
}

.region-card:nth-child(1) { animation-delay: 0.18s; }
.region-card:nth-child(2) { animation-delay: 0.25s; }
.region-card:nth-child(3) { animation-delay: 0.32s; }
.region-card:nth-child(4) { animation-delay: 0.39s; }

.region-lorient { --accent: #9bdc28; }
.region-saint-nazaire { --accent: #55d1ff; }
.region-perpignan { --accent: #f26c42; }
.region-belgique { --accent: #d6b73d; }

.region-card > img {
  position: absolute;
  z-index: -3;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  transform: translate3d(var(--x), var(--y), 0) scale(1.025);
  filter: saturate(0.9) contrast(1.07);
  transition:
    transform 1.1s var(--ease),
    filter 0.6s ease;
}

.card-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 7, 4, 0.03) 15%, rgba(2, 7, 4, 0.28) 50%, rgba(2, 7, 4, 0.96) 100%),
    linear-gradient(105deg, rgba(2, 7, 4, 0.62), transparent 70%);
}

.region-card::after {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(to top, color-mix(in srgb, var(--accent), transparent 92%), transparent);
  content: "";
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.region-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 2.4vw, 32px);
}

.region-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: var(--accent);
}

.region-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.region-copy {
  display: flex;
  flex-direction: column;
}

.region-copy strong {
  font-size: clamp(23px, 2.2vw, 32px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.region-copy small {
  margin-top: 7px;
  color: var(--accent);
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 750;
  line-height: 1.2;
}

.region-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  font-weight: 750;
}

.region-action svg {
  width: 43px;
  height: 43px;
  padding: 10px;
  flex: 0 0 auto;
  border: 1px solid var(--accent);
  border-radius: 50%;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    transform 0.35s var(--ease),
    color 0.35s ease,
    background-color 0.35s ease;
}

.region-card:hover,
.region-card:focus-visible {
  flex: 1.12 1 0;
  border-color: var(--accent);
  box-shadow:
    0 28px 74px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--accent), transparent 50%);
  outline: none;
  transform: translateY(-5px);
}

.region-card:hover > img,
.region-card:focus-visible > img {
  transform: translate3d(var(--x), var(--y), 0) scale(1.09);
  filter: saturate(1.08) contrast(1.04);
}

.region-card:hover::after,
.region-card:focus-visible::after {
  opacity: 1;
}

.region-card:hover .region-action svg,
.region-card:focus-visible .region-action svg {
  transform: translateX(4px);
  background: var(--accent);
  color: var(--forest-deep);
}

.region-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 58%);
}

footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  color: rgba(183, 199, 186, 0.7);
  font-size: 12px;
  letter-spacing: 0.015em;
  opacity: 0;
  animation: enter 0.7s var(--ease) 0.52s forwards;
}

footer svg {
  width: 18px;
  height: 18px;
  stroke: var(--green);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

footer i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.8;
}

body.is-leaving .region-card:not(.is-selected) {
  opacity: 0.34;
  filter: saturate(0.35);
  transform: scale(0.985);
}

body.is-leaving .region-card.is-selected {
  transform: scale(1.015);
}

@keyframes enter {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes card-enter {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .page-shell {
    height: auto;
  }

  .regions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: none;
    min-height: 0;
    max-height: none;
  }

  .region-card {
    min-height: 270px;
  }

  .region-card:hover,
  .region-card:focus-visible {
    transform: translateY(-3px);
  }
}

@media (max-width: 620px) {
  :root {
    --radius: 17px;
  }

  body::before {
    opacity: 0.72;
  }

  .page-shell {
    display: block;
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand {
    justify-content: center;
    min-height: 55px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
  }

  .brand-mark img {
    width: 110px;
  }

  .brand-name {
    margin-left: 8px;
    font-size: 20px;
  }

  .intro {
    margin: 13px auto 19px;
  }

  .intro h1 {
    font-size: clamp(39px, 11.7vw, 51px);
  }

  .intro h1 span {
    display: block;
  }

  .intro p {
    max-width: 310px;
    margin-top: 9px;
    font-size: 14px;
  }

  .regions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .region-card {
    min-height: clamp(112px, 29vw, 126px);
  }

  .region-card > img {
    inset: -4% -2%;
    width: 104%;
    height: 108%;
    object-position: center;
  }

  .region-lorient > img { object-position: center 58%; }
  .region-saint-nazaire > img { object-position: center 55%; }
  .region-perpignan > img { object-position: center 58%; }
  .region-belgique > img { object-position: center 52%; }

  .card-shade {
    background:
      linear-gradient(90deg, rgba(2, 7, 4, 0.91) 0%, rgba(2, 7, 4, 0.51) 54%, rgba(2, 7, 4, 0.17) 100%),
      linear-gradient(0deg, rgba(2, 7, 4, 0.58), transparent 72%);
  }

  .region-card::after {
    width: 64%;
    height: 100%;
    background: linear-gradient(to right, color-mix(in srgb, var(--accent), transparent 91%), transparent);
  }

  .region-content {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 10px;
    padding: 13px 12px 13px 14px;
  }

  .region-icon {
    width: 30px;
    height: 30px;
    margin: 0;
  }

  .region-copy {
    align-self: center;
    min-width: 0;
  }

  .region-copy strong {
    font-size: clamp(19px, 5.4vw, 23px);
    letter-spacing: -0.045em;
  }

  .region-copy small {
    max-width: 180px;
    margin-top: 4px;
    font-size: 11.5px;
  }

  .region-action {
    align-self: center;
    margin: 0;
    padding: 0;
    border: 0;
  }

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

  .region-action svg {
    width: 42px;
    height: 42px;
    padding: 10px;
    background: rgba(2, 7, 4, 0.5);
    backdrop-filter: blur(8px);
  }

  footer {
    margin-top: 5px;
    min-height: 41px;
    gap: 7px;
    color: rgba(202, 216, 205, 0.76);
    font-size: 10.5px;
  }

  footer svg {
    display: none;
  }
}

@media (max-width: 355px) {
  .region-copy strong {
    font-size: 18px;
  }

  .region-copy small {
    font-size: 10.5px;
  }

  .region-action svg {
    width: 38px;
    height: 38px;
  }

  footer {
    gap: 5px;
    font-size: 9.5px;
  }
}

@media (min-width: 1180px) and (max-height: 760px) {
  .brand {
    min-height: 58px;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
  }

  .brand-mark img {
    width: 94px;
  }

  .intro {
    margin: 10px auto 20px;
  }

  .intro h1 {
    font-size: 54px;
  }

  .regions {
    min-height: 350px;
  }

  footer {
    min-height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
