/* Composition 2: one certified check-in, taken apart. */
.v3-record-section {
  --rec-bg: #eff1f6;
  --rec-blue: #2540b0;
  --rec-icon: #4d62c4;
  --rec-green: #2f8f6b;
  --rec-green-bg: #dcefe6;
  margin: 0;
}

.v3-record-section .rec-defs {
  position: absolute;
}

.rec-lead {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--v3-copy);
  font-size: 16px;
  line-height: 1.6;
}

.rec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr);
  grid-template-areas:
    "left card right"
    "proof proof proof";
  gap: clamp(14px, 1.8vw, 22px);
  align-items: start;
  margin-top: 28px;
  padding: clamp(16px, 2.4vw, 28px);
  border-radius: 24px;
  background: var(--rec-bg);
}

.rec-col {
  display: grid;
  gap: clamp(12px, 1.6vw, 18px);
}

.rec-col--left { grid-area: left; }
.rec-col--right { grid-area: right; }
.rec-card { grid-area: card; }
.rec-proof { grid-area: proof; }

.rec h3 {
  margin: 0;
  font-family: var(--v3-font);
}

/* ---- The record itself ---- */
.rec-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(11, 40, 57, 0.12), 0 2px 6px rgba(11, 40, 57, 0.06);
}

.rec-photo {
  position: relative;
  aspect-ratio: 1 / 0.92;
  background: #d9dde6;
}

.rec-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.rec-photo::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, rgba(11, 40, 57, 0), rgba(11, 40, 57, 0.62));
}

.rec-photo-cap {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 40px;
  left: 18px;
  display: grid;
  gap: 2px;
  color: #fff;
}

.rec-photo-cap strong {
  font-size: 17px;
  font-weight: 700;
}

.rec-photo-cap time {
  font-size: 13px;
  opacity: 0.86;
}

.rec-place {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -24px 12px 0;
  padding: 13px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(11, 40, 57, 0.12);
}

.rec-place .country-flag-v3 {
  flex: 0 0 auto;
  width: 28px;
  height: 19px;
  border-radius: 3px;
}

.rec-place > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rec-place strong {
  overflow: hidden;
  color: var(--v3-ink);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-place time {
  color: var(--v3-tertiary);
  font-size: 13px;
}

.rec-seals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
  padding: 18px 10px 14px;
  list-style: none;
  text-align: center;
}

.rec-seals li {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--v3-copy);
  font-size: 11.5px;
  line-height: 1.25;
}

.rec-seals i {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--rec-green-bg);
}

.rec-seals svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--rec-green);
  stroke-width: 1.800;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rec-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 14px;
  padding: 13px 2px 15px;
  border-top: 1px solid #edeff3;
}

.rec-status span {
  color: var(--v3-tertiary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rec-status b {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--rec-green-bg);
  color: #1d6f52;
  font-size: 12.500px;
  font-weight: 650;
}

/* ---- Data panels ---- */
.rec-panel {
  padding: 16px 16px 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 40, 57, 0.05);
}

.rec-panel h3 {
  padding-bottom: 10px;
  border-bottom: 1px solid #edeff3;
  color: var(--v3-tertiary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.rec-panel dl {
  margin: 0;
}

.rec-panel dl > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 11px;
  padding: 10px 0;
}

.rec-panel dl > div + div {
  border-top: 1px solid #f3f4f7;
}

.rec-panel dt {
  display: contents;
  color: var(--v3-tertiary);
  font-size: 10.500px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rec-panel dt i {
  display: grid;
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: var(--rec-icon);
}

.rec-panel dt svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.800;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rec-panel dd {
  grid-column: 2;
  margin: 1px 0 0;
  overflow-wrap: anywhere;
  color: var(--v3-ink);
  font-size: 14.500px;
  line-height: 1.35;
}

.rec-panel dd.is-mono {
  font-family: var(--v3-mono);
  font-size: 13px;
}

.rec-panel .is-key dd {
  color: #1d6f52;
  font-weight: 700;
}

.rec-panel .is-key dt i {
  background: var(--rec-green);
}

/* ---- Map ---- */
.rec-map {
  position: relative;
  overflow: hidden;
  height: 170px;
  border-radius: 16px;
  background: #eef2e6;
  box-shadow: 0 1px 2px rgba(11, 40, 57, 0.05);
}

.rec-map svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rec-map-pin {
  position: absolute;
  top: 46%;
  left: 52%;
  width: 26px;
  height: 26px;
  margin: -26px 0 0 -13px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #2b2f38;
  box-shadow: 0 4px 10px rgba(11, 40, 57, 0.3);
  transform: rotate(-45deg);
}

.rec-map-pin::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.rec-map-label {
  position: absolute;
  top: 52%;
  left: 52%;
  color: #2b2f38;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
  transform: translateX(-50%);
  white-space: nowrap;
}

.rec-map-coords,
.rec-map-open {
  position: absolute;
  bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.500px;
  font-weight: 650;
}

.rec-map-coords {
  right: 70px;
  background: rgba(43, 47, 56, 0.86);
  color: #fff;
  font-family: var(--v3-mono);
}

.rec-map-open {
  right: 10px;
  background: var(--rec-blue);
  color: #fff;
}

/* ---- Integrity proof ---- */
.rec-proof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--v3-ink);
  color: #fff;
}

.rec-proof-main {
  min-width: 0;
}

.rec-proof h3 {
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--v3-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rec-hash {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: #fff;
  font-family: var(--v3-mono);
  font-size: clamp(12px, 1.25vw, 15px);
  font-weight: 600;
}

.rec-proof p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rec-proof p code {
  margin-right: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--v3-mono);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.rec-qr {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  padding: 7px;
  border-radius: 8px;
  background: #fff;
  fill: var(--v3-ink);
}

/* ---- Assembly: the record lands, then its parts come out of it ---- */
.rec.is-armed .rec-card {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
}

.rec.is-armed .rec-col--left > *,
.rec.is-armed .rec-col--right > *,
.rec.is-armed .rec-proof {
  opacity: 0;
}

.rec.is-armed .rec-col--left > * { transform: translateX(46px); }
.rec.is-armed .rec-col--right > * { transform: translateX(-46px); }
.rec.is-armed .rec-proof { transform: translateY(-18px); }

.rec.is-armed .rec-seals li {
  opacity: 0;
  transform: scale(0.7);
}

.rec.is-playing .rec-card,
.rec.is-playing .rec-col--left > *,
.rec.is-playing .rec-col--right > *,
.rec.is-playing .rec-proof {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc((var(--step) - 1) * 230ms);
}

.rec.is-playing .rec-seals li {
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1);
  transition-delay: calc(500ms + var(--seal) * 180ms);
}

@media (max-width: 960px) {
  .rec {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "card card"
      "left right"
      "proof proof";
  }

  .rec-card {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .rec.is-armed .rec-col--left > *,
  .rec.is-armed .rec-col--right > * {
    transform: translateY(-24px);
  }
}

@media (max-width: 620px) {
  .rec {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "card" "left" "right" "proof";
    padding: 12px;
    border-radius: 18px;
  }

  .rec-proof {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rec * {
    transition: none !important;
  }
}
