/* Shared editorial tokens and controls for both TudoB2B editions. */

:root {
  --navy: #26486a;
  --green: #19a885;
  --green-deep: #128d70;
  --paper: #f8f9fa;
  --ink: #0a1128;
  --muted: #5b6577;
  --line: #d9dee5;
  --mint: #7ae0c3;
  --motion-fast: 280ms;
  --motion-strip: 480ms;
  --ease-out: cubic-bezier(.22, .7, .2, 1);
}

.button,
.editorial-button,
.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.button {
  border: 0;
  gap: 20px;
  background: var(--green);
  color: var(--ink);
  padding: 15px 23px;
}

.button:hover { background: var(--green-deep); }
.button .arrow { font-size: 22px; line-height: 1; }

.editorial-button {
  width: fit-content;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--mint);
  padding: 2px 0 4px;
}

.soft-button {
  background: transparent;
  border: 1px solid var(--line);
  padding: 11px 16px;
  color: var(--navy);
}

.motion-track {
  display: flex;
  height: 100%;
  gap: 0;
}

.motion-frame {
  height: 100%;
  overflow: hidden;
  flex: 0 0 auto;
}

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

.media-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 460px;
  background: var(--navy);
  color: white;
}

.media-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
}

.editorial-photo {
  position: relative;
  overflow: hidden;
  inline-size: 100%;
  margin: 0;
  aspect-ratio: var(--photo-aspect, 3 / 2);
  background: #d9e2e8;
}

.section-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.editorial-photo > img,
.section-backdrop > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-position, center);
}

.section-backdrop::after {
  position: absolute;
  inset: 0;
  background: var(--backdrop-wash, #0a112880);
  content: "";
}

@media (prefers-reduced-motion: no-preference) {
  .js-motion :is(.editorial-photo, .section-backdrop) > img { transition: transform 900ms var(--ease-out); }
  .js-motion :is(.editorial-photo, .section-backdrop):not(.visible) > img { transform: scale(1.06); }
}

.js-motion .media-tile:not(.visible) img { transform: scale(1.18) translate3d(0, 6%, 0); }

.js-motion .media-tile img,
.media-tile img {
  transition: transform 900ms var(--ease-out);
}

.js-motion .media-tile.visible img { transform: scale(1) translate3d(0, 0, 0); }

.js-motion .media-tile.visible:hover img,
.js-motion .media-tile.visible:focus-within img,
.media-tile:hover img,
.media-tile:focus-within img { transform: scale(1.06) translate3d(0, -2%, 0); }

.step-card { position: relative; }

.step-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--green);
  transform: scaleY(1);
  transform-origin: top;
}

.js-motion .step-card:not(.visible)::before {
  transform: scaleY(0);
  background: var(--line);
}

.js-motion .step-card::before { transition: transform 520ms var(--ease-out), background 520ms linear; }
.js-motion .step-card.visible::before,
.js-motion .step-card:hover::before,
.step-card:focus-within::before,
.step-card.is-current::before { transform: scaleY(1); background: var(--green); }

.reading-overlay {
  position: fixed;
  inset: 0;
  z-index: 125;
  overflow: auto;
  background: #0a112899;
  padding: 25px;
}

.reading-dialog {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  max-width: 980px;
  margin: 20px auto;
  overflow: hidden;
  background: var(--paper);
  border-radius: 5px;
}

.reading-dialog img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.reading-copy { padding: 36px; }
.reading-copy .close {
  float: right;
  border: 1px solid var(--line);
  background: white;
  border-radius: 3px;
  padding: 7px 11px;
  color: var(--navy);
}

.reading-copy h2 {
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.12;
  color: var(--navy);
  margin: 0 0 18px;
}

.reading-copy p { font-size: 17px; color: #435166; margin: 0; }
.reading-materials { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.reading-materials a { color: var(--navy); font-weight: 600; }

@media (max-width: 760px) {
  .reading-dialog { grid-template-columns: 1fr; }
  .reading-dialog img { max-height: 240px; }
  .reading-copy { padding: 22px; }
}


.motion-overlay .reading-dialog { animation: dialog-in 560ms var(--ease-out) both; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@keyframes copy-reveal {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to { opacity: 1; clip-path: inset(0); }
}

@media (prefers-reduced-motion: reduce) {
  .media-tile img,
  .js-motion .media-tile:not(.visible) img,
  .media-tile:hover img,
  .media-tile:focus-within img,
  .step-card::before,
  .js-motion .step-card:not(.visible)::before,
  .motion-overlay .reading-dialog {
    transform: none;
    transition: none;
    animation: none;
  }
}

.viewport-section {
  display: grid;
  grid-template-rows: minmax(auto, 1fr);
  align-items: center;
  gap: 12px;
  min-block-size: calc(100svh - var(--nav-offset, 0px));
}

.section-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 10px;
  width: fit-content;
  min-block-size: 34px;
  padding-inline: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.3;
  text-decoration: none;
}

.section-next:hover { text-decoration: underline; text-underline-offset: 4px; }

.section-next span[aria-hidden] {
  flex: none;
  width: 7px;
  height: 7px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .section-next span[aria-hidden] {
    transition: transform var(--motion-fast) var(--ease-out);
  }
  .section-next:is(:hover, :focus-visible) span[aria-hidden] {
    transform: translateY(1px) rotate(45deg);
  }
}

@media (max-width: 760px) {
  .section-next { display: none; }
}

.locale-menu { position: relative; color: var(--navy); }
.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding-inline: 4px;
  color: var(--navy);
  list-style: none;
  cursor: pointer;
}
.locale-switch::-webkit-details-marker { display: none; }
.locale-globe, .locale-chevron { fill: none; stroke: currentColor; }
.locale-globe { width: 16px; height: 16px; stroke-width: 1.6; }
.locale-code { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.locale-chevron { width: 10px; height: 7px; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.locale-menu[open] .locale-chevron { transform: scaleY(-1); }
.locale-popover {
  position: absolute;
  z-index: 40;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  display: grid;
  inline-size: min(240px, calc(100vw - 64px));
  margin: 0;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 16px 40px #0a11281f;
}
.locale-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
}
.locale-option:hover, .locale-option[aria-current="true"] { background: #e6f6f1; }
.locale-option-code { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.locale-check { color: #0b745e; font-weight: 700; }

.social-links-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 32px;
  min-block-size: 44px;
  color: var(--navy);
}

.social-links-list a:hover {
  background: #26486a12;
}

.social-links-list a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.social-links-icon {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  fill: currentColor;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  min-block-size: 32px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.back-to-top:hover { text-decoration: underline; text-underline-offset: 4px; }
.back-to-top-arrow { font-size: 16px; line-height: 1; }
