/* =========================================================================
   Digital Product Passport 004 — standalone stylesheet
   Faithful port of the Chakra UI v2 theme + computed styles used by
   src/app/id/004/page.tsx in the Next.js app.
   ========================================================================= */

/* ---------- Fonts ---------------------------------------------------- */
@font-face {
  font-family: 'Erode Variable';
  src: url('../fonts/Erode-Variable.ttf') format('truetype-variations'),
       url('../fonts/Erode-Variable.ttf') format('truetype');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Erode Variable';
  src: url('../fonts/Erode-VariableItalic.ttf') format('truetype-variations'),
       url('../fonts/Erode-VariableItalic.ttf') format('truetype');
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens (from src/providers/chakra-provider.tsx) ---- */
:root {
  --font-erode: 'Erode Variable', serif;
  --font-inter-tight: 'Inter Tight', sans-serif;
  --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Helvetica, Arial, sans-serif;

  /* primary — luxury blue */
  --primary-50: #e8edf7;
  --primary-100: #c0d1e8;
  --primary-200: #97b5d9;
  --primary-300: #6e99ca;
  --primary-400: #457dbb;
  --primary-500: #2f4370;
  --primary-600: #263659;
  --primary-700: #1d2842;

  /* background */
  --bg-main: #f6f6f6;
  --bg-gray: #e4e4e4;

  /* chakra grays */
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;

  --blue-50: #ebf8ff;
  --blue-100: #bee3f8;
  --blue-500: #3182ce;
  --blue-600: #2b6cb0;
  --blue-700: #2c5282;
  --blue-800: #2a4365;

  --purple-50: #faf5ff;
  --purple-300: #b794f4;
  --purple-500: #805ad5;
  --purple-600: #6b46c1;

  --green-600: #38a169;
  --green-700: #2f855a;
  --orange-600: #c05621;
  --teal-600: #2c7a7b;

  --black-alpha-700: rgba(0, 0, 0, 0.64);
  --black-alpha-800: rgba(0, 0, 0, 0.8);
  --white-alpha-500: rgba(255, 255, 255, 0.36);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ---------- Reset (mirrors Chakra CSSReset) --------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
}
html {
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-800);
  background: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
}
img, video {
  max-width: 100%;
  height: auto;
}
a { color: inherit; text-decoration: inherit; }
button { background: none; padding: 0; font: inherit; cursor: pointer; }

/* ---------- Layout primitives ---------------------------------------- */
.page {
  min-height: 100vh;
  background: var(--bg-main);
}
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1rem;
}
.container--sm { max-width: 30rem; }
.container--md { max-width: 48rem; padding-block: 2rem; }

.stack { display: flex; flex-direction: column; }
.hstack { display: flex; flex-direction: row; align-items: center; }

/* ---------- Header --------------------------------------------------- */
.site-header {
  background: #fff;
  padding-block: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.site-header__inner { display: flex; justify-content: center; }
.site-header__logo {
  height: 3rem;
  width: auto;
  object-fit: contain;
}

/* ---------- Section rhythm (VStack spacing={10}) ---------------------- */
.sections {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: stretch;
}

/* ---------- Card ----------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  word-wrap: break-word;
  background: #fff;
  border-radius: 0;
  box-shadow: var(--shadow-sm);
}
.card--overflow-hidden { overflow: hidden; }
.card__body { padding: 2rem; }
.card__body--sm { padding: 1rem; }
.card__body--md { padding: 1.5rem; }
.card--primary { background: var(--primary-500); color: #fff; }
.card--blue { background: var(--blue-50); }

/* ---------- Typography ----------------------------------------------- */
.heading {
  font-family: var(--font-erode);
  font-weight: 400;
  line-height: 1.2;
  color: var(--primary-500);
}
.heading--xl { font-size: 1.875rem; line-height: 1.33; }
@media (min-width: 48em) {
  .heading--xl { font-size: 2.25rem; line-height: 1.2; }
}
.heading--md { font-size: 1.25rem; }
.heading--sm { font-size: 1rem; }
.heading--on-primary { color: #fff; }

.eyebrow {
  color: var(--primary-500);
  font-size: 1.5rem;
  font-family: var(--font-erode);
  font-weight: 400;
}

.txt-xs { font-size: 0.75rem; }
.txt-sm { font-size: 0.875rem; }
.txt-md { font-size: 1rem; }
.txt-lg { font-size: 1.125rem; }
.txt-xl { font-size: 1.25rem; }
.txt-4xl { font-size: 2.25rem; }

.fw-300 { font-weight: 300; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.lh-tall { line-height: 1.625; }
.font-inter { font-family: var(--font-inter-tight); }

.c-gray-400 { color: var(--gray-400); }
.c-gray-500 { color: var(--gray-500); }
.c-gray-600 { color: var(--gray-600); }
.c-gray-700 { color: var(--gray-700); }
.c-primary-500 { color: var(--primary-500); }
.c-primary-600 { color: var(--primary-600); }
.c-blue-500 { color: var(--blue-500); }
.c-blue-700 { color: var(--blue-700); }
.c-purple-500 { color: var(--purple-500); }
.c-purple-600 { color: var(--purple-600); }
.c-green-600 { color: var(--green-600); }
.c-green-700 { color: var(--green-700); }
.c-orange-600 { color: var(--orange-600); }
.c-teal-600 { color: var(--teal-600); }

.label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* ---------- Badge ---------------------------------------------------- */
.badge {
  display: inline-block;
  white-space: nowrap;
  vertical-align: middle;
  padding-inline: 0.25rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.125rem;
  background: var(--gray-100);
  color: var(--gray-800);
}
.badge--category {
  padding-inline: 0.75rem;
  padding-block: 0.25rem;
  letter-spacing: 0.025em;
  font-family: var(--font-inter-tight);
  font-weight: 600;
}
.badge--blue {
  background: var(--blue-100);
  color: var(--blue-800);
  cursor: pointer;
}
.badge--blue:hover { background: var(--blue-600); }

/* ---------- Product header ------------------------------------------- */
.product-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  margin-top: -1.25rem;
}
.product-header__description {
  max-width: 28rem;
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.625;
  font-family: var(--font-inter-tight);
  font-weight: 300;
}

/* ---------- Carousel ------------------------------------------------- */
.carousel { position: relative; height: 400px; }
.carousel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.carousel__dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black-alpha-700);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--white-alpha-500);
  cursor: pointer;
  padding: 0;
}
.carousel__dot.is-active { background: #fff; }
.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--black-alpha-700);
  color: #fff;
  padding: 0.5rem;
  border-radius: 9999px;
  cursor: pointer;
  line-height: 1.5;
}
.carousel__nav:hover { background: var(--black-alpha-800); }
.carousel__nav--prev { left: 1rem; }
.carousel__nav--next { right: 1rem; }

/* ---------- Generic stacks used inside cards -------------------------- */
.vstack-2 { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.vstack-3 { display: flex; flex-direction: column; gap: 0.75rem; align-items: stretch; }
.vstack-4 { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.vstack-6 { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.w-full { width: 100%; }
.align-stretch { align-items: stretch; }
.text-center { text-align: center; }

/* ---------- Grids ---------------------------------------------------- */
.grid { display: grid; }
.grid--2 { grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 48em) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.grid--stack6 { grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1.5rem; }

.grid--photos { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; }
@media (min-width: 30em) { .grid--photos { gap: 0.5rem; } }
@media (min-width: 62em) { .grid--photos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.grid--subphotos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.25rem; }
@media (min-width: 48em) { .grid--subphotos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.grid--env2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.grid--env3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
@media (min-width: 48em) { .grid--env3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.grid--community { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 48em) { .grid--community { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Key details / unique features ---------------------------- */
.callout {
  padding: 0.75rem;
  background: var(--gray-50);
  border-left: 3px solid var(--primary-300);
}
.callout--purple {
  background: var(--purple-50);
  border-left-color: var(--purple-300);
}

/* ---------- Divider -------------------------------------------------- */
.divider {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--gray-200);
  opacity: 0.6;
  margin: 0;
}

/* ---------- Journey map ---------------------------------------------- */
.map--overview {
  width: 100%;
  height: 300px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid var(--primary-200);
  box-shadow: var(--shadow-md);
}
.map--step {
  width: 100%;
  height: 100px;
  border-radius: 0.375rem;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.map-caption {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.5rem;
  text-align: center;
}
.route-badges {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.route-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}
.route-arrow { margin-inline: 0.25rem; color: var(--gray-400); }

/* ---------- Timeline ------------------------------------------------- */
.timeline { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; width: 100%; }
.timeline__item { position: relative; }
.timeline__connector {
  position: absolute;
  left: 20px;
  top: 40px;
  bottom: -20px;
  width: 2px;
  background: var(--primary-200);
  z-index: 0;
}
.timeline__row { display: flex; flex-direction: row; align-items: flex-start; gap: 1rem; }
.timeline__dot {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9999px;
  background: var(--primary-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
@media (min-width: 30em) {
  .timeline__dot { width: 40px; height: 40px; }
}
.timeline__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.timeline__head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
}
.timeline__stage {
  font-weight: 600;
  color: var(--primary-600);
  font-family: var(--font-inter-tight);
}
.timeline__chain {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}
.subprocess {
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: 0.375rem;
  border: 1px solid var(--gray-200);
}

/* ---------- Thumbnails ----------------------------------------------- */
.thumb {
  width: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
}
.thumb:hover { opacity: 0.8; transform: scale(1.02); }
.thumb--process { height: 60px; border-radius: 0.375rem; border: 1px solid var(--gray-200); }
.thumb--sub { height: 50px; border-radius: 0.125rem; border: 1px solid var(--gray-300); }
.thumb--sub:hover { transform: scale(1.05); }
.thumb--env { height: 60px; border-radius: 0.375rem; }
.thumb--community { height: 120px; border-radius: 0.375rem; }
.community-item { position: relative; }
.community-item__tag {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: var(--black-alpha-700);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.125rem;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ---------- Logo marquee --------------------------------------------- */
@keyframes logoSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 150px;
}
.marquee__track {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
  width: max-content;
  height: 100%;
  animation: logoSlide 40s linear infinite;
}
.marquee__item {
  height: 100px;
  width: 200px;
  flex: 0 0 auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}
.marquee__item:hover { filter: grayscale(0%); opacity: 1; }
.marquee__item img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Press release -------------------------------------------- */
.press { display: flex; flex-direction: row; align-items: center; gap: 0.75rem; }
.press__body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; flex: 1; }
.press__link { color: var(--blue-500); text-decoration: underline; font-size: 0.75rem; }
.press__link:hover { color: var(--blue-600); }

/* ---------- Footer --------------------------------------------------- */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-block: 2rem;
}

/* ---------- Image modal ---------------------------------------------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: var(--black-alpha-800);
}
.modal__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--gray-800);
}
.modal__close:hover { background: var(--gray-200); }
.modal__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

/* ---------- Loading / 404 -------------------------------------------- */
.state-screen {
  min-height: 100vh;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
}
.state-screen__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ---------- Utilities ------------------------------------------------ */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
