:root {
  --navy: #0f2f5c;
  --blue: #2a63b0;
  --gold: #d9a22b;
  --terracotta: #c8532e;
  --green: #2c7a4a;
  --cream: #fffaf0;
  --ink: #3b2c22;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #e8e2d6;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

button,
input,
select {
  font: inherit;
}

.page {
  position: relative;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: radial-gradient(circle at 90% 14%, #fff3cf, transparent 40%), var(--cream);
  box-shadow: 0 0 40px #3b2c2220;
}

.colorbar {
  height: 13px;
  background: linear-gradient(90deg, #14398a 0 25%, #e0a62b 25% 50%, #a93a1c 50% 75%, #1f6a39 75%);
}

/* Barra lingua */
.topbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 2px solid #ead7ad;
  background: #fffdf8;
}

.topbar-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--navy);
}

.search {
  position: relative;
  min-width: 0;
}

.search input {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: #f1eee9;
  font-family: system-ui, sans-serif;
  font-size: 15px;
  outline: none;
}

.search input:focus-visible,
.lang-select:focus-visible {
  outline: 3px solid #d9a22b88;
  outline-offset: 2px;
}

.search svg {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: var(--navy);
  pointer-events: none;
}

.lang-select {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  background: #fffdf8;
  font: 700 14px system-ui, sans-serif;
  text-overflow: ellipsis;
}

/* Intestazione */
.hero {
  position: relative;
  min-height: 280px;
  padding: 40px 24px 26px;
}

.corner-lemon {
  position: absolute;
  top: 0;
  right: 0;
  width: 170px;
  height: 295px;
  pointer-events: none;
}

.eyebrow {
  position: relative;
  margin: 0 0 22px;
  padding-bottom: 12px;
  color: #b17b13;
  font: 700 12px/1 system-ui, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 84px;
  height: 3px;
  background: var(--gold);
}

h1 {
  position: relative;
  max-width: min(82%, 310px);
  margin: 0;
  color: var(--navy);
  font-size: clamp(38px, 11vw, 52px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.status {
  position: relative;
  max-width: 70%;
  margin: 16px 0 0;
  color: #7a6a58;
  font: italic 14px/1.4 system-ui, sans-serif;
}

/* Foto */
.photo-block {
  margin: 0 16px 20px;
}

.photo {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #d7cdbd;
  box-shadow: 0 14px 30px #3b2c2233;
}

.photo img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.thumb {
  flex: none;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 10px;
  background: #d7cdbd;
  cursor: pointer;
}

.thumb[aria-current="true"] {
  border-color: var(--gold);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Schede */
.cards {
  display: grid;
  gap: 14px;
  padding: 0 16px 24px;
}

.card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px 20px 20px 16px;
  border: 1px solid #0000000d;
  border-left-width: 7px;
  border-radius: 14px;
  box-shadow: 0 6px 16px #3b2c2214;
}

.card h2 {
  margin: 2px 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
}

.badge svg {
  width: 28px;
  height: 28px;
}

.card.video {
  display: block;
  border-left-color: var(--navy);
  background: #eaeff7;
}

.card.video h2 {
  margin-bottom: 12px;
  color: var(--navy);
}

#productVideo {
  display: block;
  width: 100%;
  max-height: 420px;
  border-radius: 10px;
  background: #000;
}

.card.short {
  border-left-color: var(--terracotta);
  background: #fdeee8;
}

.card.short h2 {
  color: #b8431f;
}

.card.short .badge {
  color: #b8431f;
  background: #f6d5c8;
}

.card.long {
  border-left-color: var(--blue);
  background: #e8f2fd;
}

.card.long h2 {
  color: #0f2a8a;
}

.card.long .badge {
  color: #0f2a8a;
  background: #cfe2f8;
}

.card.story {
  border-left-color: var(--gold);
  background: #fff6dc;
}

.card.story h2 {
  color: #a97813;
}

.card.story .badge {
  color: #a97813;
  background: #fae6ae;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pair .card {
  grid-template-columns: 1fr;
  align-content: start;
  padding: 16px 14px;
}

.pair .head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pair .badge {
  width: 46px;
  height: 46px;
  flex: none;
}

.pair .badge svg {
  width: 24px;
  height: 24px;
}

.pair h2 {
  margin: 0;
  font-size: 21px;
}

.pair p {
  font-size: 15px;
  line-height: 1.45;
}

.card.ing {
  border-left-color: var(--green);
  background: #eef6f0;
}

.card.ing h2 {
  color: #1f6a39;
}

.card.ing .badge {
  color: #1f6a39;
  background: #d3e8d9;
}

.card.all {
  border-left-color: var(--terracotta);
  background: #fdeee8;
}

.card.all h2 {
  color: #b8431f;
}

.card.all .badge {
  color: #b8431f;
  background: #f6d5c8;
}

/* Chiusura */
.footer {
  position: relative;
  margin-top: 4px;
  padding: 30px 84px 34px;
  overflow: hidden;
  text-align: center;
  color: #fff6e0;
  background: var(--navy);
}

.footer .corner {
  position: absolute;
  bottom: 0;
  width: 96px;
  height: 130px;
}

.footer .corner.left {
  left: 0;
  transform: scaleX(-1);
}

.footer .corner.right {
  right: 0;
}

.footer .rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer .rule i {
  display: block;
  width: 36px;
  height: 2px;
  background: var(--gold);
}

.footer p {
  margin: 0;
  font-size: 19px;
  font-style: italic;
  line-height: 1.35;
}

.closing {
  padding: 22px 24px 26px;
  text-align: center;
  border-top: 4px solid var(--gold);
  background: #0a2447;
}

.closing .motto {
  margin: 0;
  color: var(--gold);
  font: 800 12px/1.4 system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.closing .credits {
  max-width: 340px;
  margin: 14px auto 0;
  padding-top: 14px;
  border-top: 1px solid #ffffff26;
  color: #c9d4e6;
  font: 13px/1.55 system-ui, sans-serif;
}

.closing .credits strong {
  color: #fff6e0;
  font-weight: 700;
}

@media (max-width: 430px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding-inline: 12px;
  }

  .topbar-icon {
    display: none;
  }
}

@media (max-width: 380px) {
  .pair {
    grid-template-columns: 1fr;
  }
}
