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

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

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

:root {
  --color-stone: #dbe5e3;
  --color-stone-dark: #aebfbe;
  --color-ink: #132f3c;
  --color-blue: #17516b;
  --color-blue-dark: #0d3549;
  --color-blue-light: #5fa7bd;
  --color-gold: #edbd35;
  --color-gold-dark: #a66a16;
  --color-red: #bd3f3a;
  --color-paper: #fff9e9;
  --color-paper-shadow: #d6c78d;
  --font-display: "Vinque", Georgia, serif;
  --font-flavour: "Tiepolo", Georgia, serif;
  --font-body: "Tiepolo", Georgia, serif;
  --site-width: 1120px;
  --site-padding: clamp(1rem, 4vw, 2rem);
  --hard-shadow: 0 7px 0 rgba(13, 53, 73, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
  background-color: var(--color-stone);
  background-image:
    linear-gradient(rgba(219, 229, 227, 0.14), rgba(219, 229, 227, 0.14)),
    url("../images/fondpierre.jpg");
  background-size: auto, 815px auto;
  background-position: center;
  background-attachment: fixed;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 4px solid var(--color-gold);
  outline-offset: 4px;
}

.site-shell {
  width: min(100% - (var(--site-padding) * 2), var(--site-width));
  margin-inline: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible,
.no-js .reveal {
  opacity: 1;
  transform: none;
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 4px solid var(--color-blue-dark);
  background: rgba(239, 244, 241, 0.94);
  box-shadow: 0 4px 0 rgba(23, 81, 107, 0.24);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand img {
  width: 180px;
}

.header-download {
  padding: 0.55rem 1.2rem 0.65rem;
  border: 3px solid var(--color-blue-dark);
  border-radius: 0.65rem;
  color: var(--color-paper);
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-decoration: none;
  background: var(--color-red);
  box-shadow: 0 4px 0 var(--color-blue-dark);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.header-download:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--color-blue-dark);
}

/* Hero */
.hero {
  min-height: 700px;
  padding: clamp(3rem, 7vw, 6rem) 0 2rem;
  background:
    linear-gradient(180deg, rgba(221, 237, 239, 0.76), rgba(219, 229, 227, 0.08)),
    url("../images/Cielo.png") center top / cover no-repeat;
  border-bottom: 5px solid var(--color-blue-dark);
  overflow: hidden;
}

.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero__copy {
  position: relative;
  z-index: 4;
  min-width: 0;
}

.hero__logo {
  width: 100%;
  max-width: 560px;
  margin-bottom: 0.7rem;
  filter: drop-shadow(0 5px 0 rgba(255, 255, 255, 0.72));
}

.hero__credit {
  display: flex;
  flex-direction: column;
  margin-top: 1em;
  margin-bottom: 1.15rem;
  color: var(--color-blue-dark);
  font-family: var(--font-flavour);
  font-size: clamp(1.5rem, 1.7vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

.hero__lead {
  overflow-wrap: anywhere;
  max-width: 36rem;
  margin-bottom: 0.8rem;
  padding: 1rem 1.2rem;
  border: 3px solid var(--color-blue-dark);
  border-radius: 0.8rem;
  color: var(--color-ink);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  background: rgba(255, 249, 233, 0.92);
  box-shadow: var(--hard-shadow);
}

.hero__availability {
  margin: 1.35rem 0 1rem;
  color: var(--color-blue-dark);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.hero-cast {
  position: relative;
  min-height: 570px;
}

.hero-cast__portrait {
  width: min(95%, 540px);
  aspect-ratio: 1;
  position: absolute;
  left: 50%;
  bottom: 0;
  overflow: hidden;
  border: 5px solid var(--color-blue-dark);
  border-radius: 50%;
  background: rgba(255, 249, 233, 0.55);
  box-shadow: inset 0 0 0 8px rgba(237, 189, 53, 0.72), var(--hard-shadow);
  transform: translateX(-50%);
}

.hero-cast__character {
  position: absolute;
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0 9px 0 rgba(13, 53, 73, 0.2));
}

.hero-cast__character--architect {
  width: 67%;
  left: -2%;
  bottom: -1%;
  transform: rotate(-4deg);
}

.hero-cast__character--squire {
  z-index: 3;
  width: 68%;
  right: -5%;
  bottom: -1%;
  transform: rotate(3deg);
}

.hero-cast__character--baker {
  z-index: 1;
  width: 56%;
  left: 23%;
  top: 3%;
}

/* Store buttons */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.store-buttons--centered {
  justify-content: center;
}

.store-button {
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1.15rem;
  border: 4px solid var(--color-blue-dark);
  border-radius: 0.9rem;
  color: var(--color-paper);
  text-decoration: none;
  background: var(--color-blue);
  box-shadow:
    inset 0 0 0 3px var(--color-blue-light),
    0 6px 0 var(--color-gold-dark);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.store-button:nth-child(2) {
  background: var(--color-red);
  box-shadow:
    inset 0 0 0 3px #df7970,
    0 6px 0 var(--color-gold-dark);
}

.store-button:hover {
  transform: translateY(3px) rotate(-1deg);
  box-shadow:
    inset 0 0 0 3px var(--color-blue-light),
    0 3px 0 var(--color-gold-dark);
}

.store-button:nth-child(2):hover {
  box-shadow:
    inset 0 0 0 3px #df7970,
    0 3px 0 var(--color-gold-dark);
}

.store-button i {
  width: 2rem;
  font-size: 2rem;
  text-align: center;
}

.store-button span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-button small {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.store-button strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.15;
}

/* Shared parchment titles */
.scroll-heading {
  width: min(100%, 680px);
  min-height: 180px;
  display: grid;
  place-items: center;
  margin: 0 auto -2.3rem;
  margin-bottom: -12%;
  padding: 2.7rem 5rem 3.5rem;
  position: relative;
  z-index: 3;
  background: url("../images/title.png") center / 100% 100% no-repeat;
}

.scroll-heading h1,
.scroll-heading h2 {
  color: var(--color-blue-dark);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 0 #fff;
}

.scroll-heading--compact {
  width: min(100%, 560px);
  min-height: 145px;
  margin-bottom: -2rem;
  padding-block: 2.4rem 3.1rem;
}

/* Intro */
.intro-section {
  padding: 2.5rem 0 5rem;
}

.intro-card {
  min-height: 460px;
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem clamp(1.5rem, 5vw, 4rem) 2.5rem;
  border: 5px solid var(--color-blue-dark);
  border-radius: 1.3rem;
  background:
    linear-gradient(rgba(255, 249, 233, 0.82), rgba(255, 249, 233, 0.82)),
    url("../images/fondCarterappel.jpg") center / cover;
  box-shadow: var(--hard-shadow);
}

.intro-card__character {
  align-self: end;
  width: min(100%, 380px);
  margin-bottom: -3rem;
  margin-left: -11%;
  filter: drop-shadow(0 7px 0 rgba(13, 53, 73, 0.22));
}

.intro-card__copy {
  position: relative;
  z-index: 2;
  max-width: 38rem;
  padding: 1.4rem;
  border-left: 5px solid var(--color-red);
  font-size: 1.16rem;
  font-weight: 600;
  background: rgba(255, 249, 233, 0.74);
}

.flavour-copy {
  margin-bottom: 1rem;
  color: var(--color-red);
  font-family: var(--font-flavour);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
}

/* Modes */
.modes-section {
  padding: 1rem 0 6rem;
  border-block: 5px solid var(--color-blue-dark);
  background:
    linear-gradient(rgba(255, 249, 233, 0.18), rgba(255, 249, 233, 0.18)),
    url("../images/fondCarterappel.jpg") center / cover;
}

.modes-layout {
  display: grid;
  margin-top:4em;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: 3rem;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.mode-card {
  min-height: 230px;
  padding: 1.5rem;
  border: 4px solid var(--color-blue-dark);
  border-radius: 1rem;
  background: rgba(255, 249, 233, 0.94);
  box-shadow: var(--hard-shadow);
  transition: transform 0.2s ease;
}

.mode-card:nth-child(2),
.mode-card:nth-child(3) {
  border-color: var(--color-gold-dark);
}

.mode-card:hover {
  transform: translateY(-5px) rotate(-1deg);
}

.mode-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border: 3px solid var(--color-blue-dark);
  border-radius: 50%;
  color: var(--color-paper);
  font-size: 1.4rem;
  background: var(--color-red);
  box-shadow: 0 4px 0 var(--color-gold-dark);
}

.mode-card h3 {
  margin-bottom: 0.55rem;
  color: var(--color-blue-dark);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.1;
}

.mode-card p {
  font-weight: 600;
}

.screenshots {
  min-height: 600px;
  position: relative;
}

.phone-frame {
  width: 255px;
  aspect-ratio: 885 / 1788;
  position: absolute;
  overflow: hidden;
  border-radius: 13% / 6.5%;
  filter: drop-shadow(0 13px 0 rgba(13, 53, 73, 0.25));
}

.phone-frame__screen {
  width: 88.2%;
  height: 93.7%;
  position: absolute;
  top: 3.15%;
  left: 5.9%;
  z-index: 1;
  border-radius: 10.5% / 4.9%;
  object-fit: cover;
}

.phone-frame__device {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.phone-frame--back {
  top: 2rem;
  left: 0;
  transform: rotate(-5deg);
}

.phone-frame--front {
  z-index: 2;
  right: 0;
  bottom: 0;
  transform: rotate(4deg);
}

/* Download */
.download-section {
  padding: 7rem 0 5rem;
}

.download-card {
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr);
  align-items: end;
  position: relative;
  overflow: hidden;
  border: 5px solid var(--color-blue-dark);
  border-radius: 1.3rem;
  background:
    linear-gradient(rgba(13, 53, 73, 0.83), rgba(13, 53, 73, 0.9)),
    url("../images/fondbois.jpg") center / cover;
  box-shadow: var(--hard-shadow);
}

.download-card__character {
  width: min(100%, 370px);
  margin: 1rem 0 -2.5rem -1rem;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.2));
}

.download-card__content {
  align-self: center;
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem) 2.5rem 0;
  color: var(--color-paper);
  text-align: center;
}

.download-card__content > p {
  margin: 1.8rem 0 1.4rem;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Footer */
.site-footer {
  padding: 3rem 0;
  border-top: 5px solid var(--color-gold);
  color: rgba(255, 249, 233, 0.78);
  background: var(--color-blue-dark);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  text-align: center;
}

.footer-partners {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.footer-partners a {
  min-width: 130px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 0.8rem;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.footer-partners a:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 255, 255, 0.2);
}

.footer-partners img {
  max-width: 110px;
  max-height: 82px;
  object-fit: contain;
  filter: grayscale(100%) invert(1) brightness(0.9);
  opacity: 0.85;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.footer-partners a:hover img {
  filter: grayscale(0%) invert(0) brightness(1);
  opacity: 1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a,
.footer-links button {
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links button:hover {
  color: #fff;
  text-decoration: underline;
}

.copyright {
  max-width: 42rem;
  color: rgba(255, 249, 233, 0.45);
  font-size: 0.9rem;
}

/* Legal pages */
.legal-main {
  padding: clamp(3rem, 7vw, 6rem) 0;
  background:
    linear-gradient(180deg, rgba(221, 237, 239, 0.8), rgba(219, 229, 227, 0.3)),
    url("../images/Cielo.png") center top / cover fixed;
}

.legal-shell {
  max-width: 920px;
}

.legal-card {
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 4px solid var(--color-blue-dark);
  border-radius: 1rem;
  background: rgba(255, 249, 233, 0.96);
  box-shadow: var(--hard-shadow);
}

.legal-card h1,
.legal-card h2 {
  color: var(--color-blue-dark);
  font-family: var(--font-display);
  font-weight: 400;
}

.legal-card h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1;
}

.legal-card h2 {
  margin: 2.5rem 0 0.8rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid rgba(13, 53, 73, 0.2);
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.2;
  scroll-margin-top: 6rem;
}

.legal-card p,
.legal-card ul {
  margin-bottom: 1rem;
}

.legal-card ul {
  padding-left: 1.5rem;
}

.legal-card li + li {
  margin-top: 0.6rem;
}

.legal-card a {
  color: var(--color-blue);
  font-weight: 700;
  text-underline-offset: 0.15em;
}

.legal-card a:hover {
  color: var(--color-red);
}

.legal-eyebrow {
  margin-bottom: 0.5rem;
  color: var(--color-red);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.legal-updated {
  margin-bottom: 2rem;
  color: rgba(19, 47, 60, 0.7);
  font-style: italic;
}

/* Cookie banner */
.cookie-banner {
  width: min(calc(100% - 2rem), 32rem);
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  padding: 1.3rem;
  border: 4px solid var(--color-blue-dark);
  border-radius: 1rem;
  color: var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--hard-shadow);
}

.cookie-banner__title {
  margin-bottom: 0.4rem;
  color: var(--color-blue-dark);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.cookie-banner__text {
  font-size: 1rem;
}

.cookie-banner__text a {
  color: var(--color-blue);
  font-weight: 700;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cookie-banner__button {
  flex: 1;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border: 3px solid var(--color-blue-dark);
  border-radius: 0.6rem;
  font-family: var(--font-display);
  font-size: 1rem;
  cursor: pointer;
}

.cookie-banner__button--primary {
  color: var(--color-paper);
  background: var(--color-red);
}

.cookie-banner__button--secondary {
  color: var(--color-ink);
  background: var(--color-paper);
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
  }

  .hero__layout,
  .modes-layout {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    text-align: center;
  }

  .hero__logo,
  .hero__credit,
  .hero__lead {
    margin-inline: auto;
  }

  .store-buttons {
    justify-content: center;
  }

  .hero-cast {
    width: min(100%, 580px);
    min-height: 540px;
    margin-inline: auto;
  }

  .screenshots {
    width: min(100%, 500px);
    margin-inline: auto;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 1rem;
  }

  .site-header__inner {
    min-height: 4rem;
  }

  .site-brand img {
    width: 125px;
  }

  .header-download {
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero__logo {
    width: min(100%, 360px);
  }

  .hero__lead {
    width: 100%;
    padding-inline: 0.85rem;
  }

  .hero-cast {
    min-height: 420px;
  }

  .scroll-heading {
    min-height: 120px;
    margin-bottom: -1.5rem;
    padding: 1.8rem 3rem 2.4rem;
  }

  .scroll-heading h1,
  .scroll-heading h2 {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }

  .intro-card,
  .download-card {
    grid-template-columns: 1fr;
  }

  .intro-card {
    padding-top: 3rem;
  }

  .intro-card__copy {
    grid-row: 1;
  }

  .intro-card__character,
  .download-card__character {
    width: 260px;
    margin-inline: auto;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 0;
  }

  .screenshots {
    min-height: 480px;
  }

  .phone-frame {
    width: min(54vw, 210px);
  }

  .download-card__content {
    grid-row: 1;
    padding: 2rem 1rem 0;
  }

  .store-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .store-button {
    min-width: 0;
    justify-content: center;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .header-download {
    display: none;
  }

  .site-header__inner {
    justify-content: center;
  }

  .hero__logo {
    max-width: 320px;
  }

  .hero__credit {
    font-size: 0.95rem;
  }

  .hero__lead {
    font-size: 1.05rem;
  }

  .hero-cast {
    min-height: 360px;
  }

  .scroll-heading {
    padding-inline: 2.4rem;
  }

  .cookie-banner {
    padding: 1rem;
  }

  .cookie-banner__text {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .store-button,
  .mode-card,
  .header-download {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
