:root {
  --bg: #f6f2e9;
  --ink: #171a20;
  --muted: #626975;
  --surface: rgba(255, 252, 246, 0.84);
  --surface-strong: #fffaf0;
  --line: rgba(53, 43, 32, 0.14);
  --accent: #9b2737;
  --accent-2: #0f766e;
  --gold: #c68b26;
  --charcoal: #202024;
  --shadow: 0 18px 55px rgba(32, 28, 24, 0.12);
  --shadow-hot: 0 26px 70px rgba(155, 39, 55, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 26, 32, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #f8f4ec 0%, #f1eadf 42%, #ece0d0 100%);
  background-size: 44px 44px, 100% 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
  content: "";
  mix-blend-mode: multiply;
}

h1,
h2,
h3,
.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  line-height: 1.06;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.flex,
.grid {
  min-width: 0;
}

.flex > *,
.grid > * {
  min-width: 0;
}

p,
li,
td,
summary,
.hero-content > *,
.catalog-grid > *,
.impact-grid > *,
.before-after > *,
.timeline-track > * {
  min-width: 0;
}

p,
li,
td,
summary {
  overflow-wrap: anywhere;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.32);
  outline-offset: 3px;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent-2));
  box-shadow: 0 0 18px rgba(198, 139, 38, 0.58);
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(246, 242, 233, 0.72);
  backdrop-filter: blur(18px) saturate(1.12);
  box-shadow: 0 1px 0 rgba(23, 26, 32, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 100%;
}

.brand::before {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(155, 39, 55, 0.12), 0 0 24px rgba(155, 39, 55, 0.45);
  content: "";
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: #424854;
  padding: 0.45rem 0.82rem;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.site-nav a:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 26, 32, 0.1);
  background: rgba(255, 252, 246, 0.68);
  color: var(--accent);
}

.hero-stage {
  position: relative;
  display: grid;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  color: #fffaf0;
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: contrast(1.1) saturate(0.78);
  animation: heroDrift 16s ease-in-out infinite alternate;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(18, 16, 15, 0.9) 0%, rgba(18, 16, 15, 0.72) 42%, rgba(18, 16, 15, 0.26) 100%),
    linear-gradient(180deg, rgba(18, 16, 15, 0.18), rgba(18, 16, 15, 0.82));
}

.hero-gridline {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.15) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 250, 240, 0.11) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 92%);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(17rem, 0.52fr);
  align-items: center;
  gap: 3rem;
  padding-block: 6rem 8.25rem;
}

.hero-copy {
  max-width: 56rem;
}

.eyebrow,
.section-kicker,
.panel-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.12);
  color: #f7dec0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.48rem 0.72rem;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 1.2rem 0 1rem;
  color: #fffaf0;
  font-size: clamp(3rem, 7.8vw, 6.8rem);
  letter-spacing: 0;
  max-width: 13ch;
}

.hero-copy p {
  max-width: 43rem;
  color: rgba(255, 250, 240, 0.82);
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 18px 42px rgba(155, 39, 55, 0.32);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 252, 246, 0.12);
  color: #fffaf0;
  backdrop-filter: blur(16px);
}

.hero-dashboard {
  display: grid;
  gap: 0.85rem;
}

.signal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.12);
  padding: 1rem;
  backdrop-filter: blur(18px);
}

.signal-card::after {
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  content: "";
  animation: shine 4.8s ease-in-out infinite;
}

.signal-card span,
.signal-card small {
  display: block;
  color: rgba(255, 250, 240, 0.68);
  font-size: 0.82rem;
  line-height: 1.25;
}

.signal-card strong {
  display: block;
  color: #fffaf0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  line-height: 1;
  margin: 0.3rem 0;
  overflow-wrap: anywhere;
}

.signal-card.is-live {
  border-color: rgba(198, 139, 38, 0.5);
}

.artifact-strip {
  position: absolute;
  right: 4vw;
  bottom: 1.6rem;
  display: flex;
  max-width: 46rem;
  gap: 0.75rem;
  opacity: 0.92;
}

.artifact-strip img {
  width: 6.4rem;
  height: 4.6rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.2);
  object-fit: contain;
  padding: 0.35rem;
  backdrop-filter: blur(12px);
  animation: floatInPlace 5s ease-in-out infinite;
}

.artifact-strip img:nth-child(2n) {
  animation-delay: 0.75s;
}

.section-wrap {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  max-width: 54rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.8vw, 4.8rem);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.section-kicker,
.panel-label {
  border-color: rgba(23, 26, 32, 0.11);
  background: rgba(255, 252, 246, 0.76);
  color: var(--accent);
}

.filter-shell {
  position: relative;
  top: auto;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(23, 26, 32, 0.1);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.72);
  padding: 0.45rem;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.filter-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #3e4652;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
  padding: 0.72rem 0.95rem;
  white-space: normal;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.filter-btn:hover {
  transform: translateY(-1px);
  background: rgba(15, 118, 110, 0.08);
}

.filter-btn.active {
  background: var(--ink);
  color: #fffaf0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
  margin-top: 2rem;
  perspective: 1100px;
}

.invention-card {
  position: relative;
  display: grid;
  grid-template-rows: 14rem minmax(0, 1fr);
  height: 34rem;
  overflow: hidden;
  border: 1px solid rgba(23, 26, 32, 0.1);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: opacity 0.2s ease, transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.invention-card:hover {
  border-color: rgba(155, 39, 55, 0.34);
  box-shadow: var(--shadow-hot);
}

.invention-card.hidden {
  display: none;
}

.card-media {
  display: grid;
  height: 14rem;
  min-height: 14rem;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(198, 139, 38, 0.12)),
    rgba(255, 252, 246, 0.9);
}

.card-media img {
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
  max-width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  object-fit: contain;
  padding: 0;
  filter: saturate(0.92) contrast(1.04);
  transform: none;
  transition: filter 0.24s ease;
}

.invention-card:hover .card-media img {
  filter: saturate(1) contrast(1.04);
}

.card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: 0.8rem;
  min-height: 0;
  padding: 1.2rem;
}

.card-topline {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-topline span,
.card-topline b,
.card-origin {
  border-radius: 999px;
  background: rgba(23, 26, 32, 0.055);
  padding: 0.36rem 0.55rem;
}

.card-topline span,
.card-origin {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.card-topline span {
  -webkit-line-clamp: 2;
}

.card-topline b {
  flex: 0 0 auto;
  color: var(--accent-2);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 1.75rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #444b56;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.card-origin {
  width: 100%;
  color: var(--muted);
  font-size: 0.85rem;
  -webkit-line-clamp: 2;
}

.impact-section {
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.3), rgba(255, 252, 246, 0.72)),
    linear-gradient(90deg, rgba(155, 39, 55, 0.06), rgba(15, 118, 110, 0.06));
  border-block: 1px solid rgba(23, 26, 32, 0.08);
}

.impact-grid,
.before-after {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.impact-card,
.comparison-panel,
.data-table,
.timeline-item,
article,
details,
.rounded-2xl,
.rounded-3xl {
  border: 1px solid rgba(23, 26, 32, 0.1) !important;
  border-radius: 22px !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(12px);
}

.impact-card {
  padding: 1.25rem;
}

.impact-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 16px;
  background: var(--ink);
  color: #fffaf0;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.impact-card h3,
.comparison-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 1.45rem;
}

.impact-card p {
  margin: 0;
  color: var(--muted);
}

.before-after {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comparison-panel {
  padding: 1.35rem;
}

.comparison-panel.highlight {
  background: linear-gradient(135deg, rgba(255, 252, 246, 0.92), rgba(236, 247, 244, 0.86)) !important;
  border-color: rgba(15, 118, 110, 0.24) !important;
}

.comparison-panel ul {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.comparison-panel li {
  position: relative;
  padding-left: 1.2rem;
  color: #414853;
}

.comparison-panel li::before {
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.comparison-panel.highlight li::before {
  background: var(--accent-2);
}

.data-table {
  overflow-x: auto;
  margin-top: 1rem;
}

.data-table table,
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th,
.data-table td,
th,
td {
  border-bottom: 1px solid rgba(23, 26, 32, 0.08);
  padding: 1rem;
  vertical-align: top;
}

.data-table th,
th {
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td,
td {
  color: #444b56;
}

.timeline-section {
  overflow: hidden;
}

.timeline-track {
  position: relative;
  display: grid;
  gap: 0.85rem;
}

.timeline-track::before {
  position: absolute;
  left: 1.13rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--gold), var(--accent-2));
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 0.35rem;
  margin-left: 3rem;
  padding: 1rem 1rem 1rem 1.15rem;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
  border-color: rgba(155, 39, 55, 0.3) !important;
}

.timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 1.15rem;
  width: 0.9rem;
  height: 0.9rem;
  border: 3px solid #f6f2e9;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(155, 39, 55, 0.12);
}

.timeline-period {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.timeline-item strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(23, 26, 32, 0.1);
  background: rgba(255, 252, 246, 0.55);
  color: var(--muted);
  backdrop-filter: blur(12px);
}

.text-accent {
  color: var(--accent) !important;
}

.bg-accent {
  background: var(--accent) !important;
}

.text-slate-500,
.text-slate-600,
.text-slate-700 {
  color: var(--muted) !important;
}

.bg-white\/90,
.bg-white\/85,
.bg-white {
  background: var(--surface) !important;
}

.bg-amber-50,
.bg-amber-50\/40,
.bg-white\/30 {
  background: rgba(255, 252, 246, 0.52) !important;
}

.bg-rose-100,
.bg-amber-100,
.bg-amber-200,
.bg-amber-300,
.bg-slate-200 {
  background: rgba(155, 39, 55, 0.1) !important;
}

.text-rose-800,
.text-amber-900 {
  color: var(--accent) !important;
}

.border-amber-100,
.border-amber-200,
.border-gold,
.border-t,
.border-b,
.border-y {
  border-color: rgba(23, 26, 32, 0.1) !important;
}

.rounded-xl,
.rounded-lg {
  border-radius: 16px !important;
}

.rounded-full {
  border-radius: 999px !important;
  max-width: 100%;
  line-height: 1.2;
  white-space: normal;
}

.shadow-card,
.shadow-xl,
.shadow-2xl {
  box-shadow: var(--shadow) !important;
}

.text-justify {
  text-align: left !important;
}

.media-cell {
  aspect-ratio: 4 / 3;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.items-center.justify-between,
.items-center.gap-3 {
  flex-wrap: wrap;
}

.media-cell img,
.lightbox-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: saturate(0.94) contrast(1.03);
}

details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  float: right;
  color: var(--accent-2);
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
}

details[open] summary::after {
  content: "-";
}

#lightbox img {
  background: var(--surface-strong);
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes heroDrift {
  from {
    transform: scale(1.08) translate3d(-1%, -1%, 0);
  }
  to {
    transform: scale(1.13) translate3d(1.5%, 1%, 0);
  }
}

@keyframes shine {
  0%,
  56% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes floatInPlace {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

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

@media (max-width: 1060px) {
  .hero-content,
  .catalog-grid,
  .impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .hero-dashboard {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-content {
    padding-block: 4.5rem 8rem;
  }

  .hero-copy h1 {
    max-width: 16ch;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 136px;
  }

  body {
    background-size: 30px 30px, 100% 100%;
  }

  .site-nav {
    gap: 0.25rem !important;
  }

  .site-nav a {
    padding: 0.35rem 0.55rem;
  }

  .hero-stage {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-block: 3.5rem 2rem;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 13vw, 3.35rem);
  }

  .hero-copy p {
    font-size: 1.05rem;
  }

  .hero-actions {
    margin-top: 1.35rem;
  }

  .hero-dashboard,
  .catalog-grid,
  .impact-grid,
  .before-after {
    grid-template-columns: 1fr;
  }

  .hero-dashboard {
    gap: 0.65rem;
  }

  .artifact-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0 1rem 1rem;
    max-width: none;
  }

  .artifact-strip img {
    width: 100%;
    height: 3.8rem;
  }

  .section-wrap {
    padding: 3.5rem 0;
  }

  .section-heading h2 {
    font-size: 2.4rem;
  }

  .filter-shell {
    top: auto;
    width: 100%;
    border-radius: 20px;
  }

  .filter-btn {
    flex: 1 1 auto;
    padding: 0.65rem 0.7rem;
  }

  .invention-card {
    grid-template-rows: 12rem minmax(0, 1fr);
    height: 32rem;
    min-height: 0;
  }

  .card-media {
    height: 12rem;
    min-height: 12rem;
  }

  .card-body {
    gap: 0.65rem;
    padding: 1rem;
  }

  .card-body h3 {
    font-size: 1.55rem;
  }

  .card-body p {
    -webkit-line-clamp: 3;
  }

  .data-table table,
  table {
    min-width: 720px;
  }

  .media-cell {
    min-height: 0;
  }
}

@media (max-width: 420px) {
  .brand {
    font-size: 0.98rem;
  }

  .site-nav a {
    font-size: 0.86rem;
    padding: 0.28rem 0.45rem;
  }

  .hero-copy h1 {
    font-size: 2.45rem;
  }

  .signal-card strong {
    font-size: 1.75rem;
  }

  .artifact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading h2 {
    font-size: 2rem;
  }
}
