:root {
  --bg: #f6efe4;
  --bg-deep: #102437;
  --surface: rgba(255, 252, 248, 0.78);
  --surface-strong: #fff9f1;
  --ink: #102132;
  --muted: #5a6776;
  --line: rgba(16, 33, 50, 0.1);
  --accent: #c85a21;
  --accent-deep: #94421a;
  --teal: #0d6b6b;
  --shadow: 0 20px 70px rgba(16, 33, 50, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(200, 90, 33, 0.15), transparent 26%),
    radial-gradient(circle at 85% 10%, rgba(13, 107, 107, 0.16), transparent 20%),
    linear-gradient(180deg, #fbf6ef 0%, #f0e6d7 42%, #efe4d1 100%);
}

.page-glow {
  position: fixed;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

.page-glow-left {
  top: -5rem;
  left: -6rem;
  background: rgba(200, 90, 33, 0.45);
}

.page-glow-right {
  top: 12rem;
  right: -8rem;
  background: rgba(13, 107, 107, 0.32);
}

.hero,
.main-shell,
.footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  padding: 1.2rem 0 0.9rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1.1rem;
  background: var(--bg-deep);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-subtitle {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(1.95rem, 4.2vw, 3.5rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1;
}

.ghost-link,
.primary-button,
.secondary-button {
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.ghost-link {
  color: var(--ink);
  border-bottom: 1px solid rgba(16, 33, 50, 0.2);
  padding-bottom: 0.25rem;
}

.ghost-link:hover,
.primary-button:hover,
.secondary-button:hover,
.experiment-card:hover {
  transform: translateY(-2px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 1.2rem;
}

.hero-copy,
.hero-panel,
.section-card {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -3rem -3rem auto;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 90, 33, 0.18), transparent 70%);
}

.hero-kicker {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
}

.hero-text,
.upload-text,
.footer p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  color: var(--ink);
  border: 1px solid rgba(16, 33, 50, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

.hero-panel {
  padding: 1.4rem;
  border-radius: var(--radius-xl);
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
}

.hero-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.hero-facts li {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(16, 33, 50, 0.05);
  font-weight: 500;
}

.main-shell {
  display: grid;
  gap: 1.2rem;
  padding: 0 0 2rem;
}

.section-card {
  padding: clamp(1rem, 2vw, 1.5rem);
  border-radius: var(--radius-xl);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.search-field {
  display: grid;
  gap: 0.45rem;
  min-width: min(320px, 100%);
  color: var(--muted);
  font-size: 0.92rem;
}

.search-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(16, 33, 50, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font: inherit;
}

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

.experiment-card {
  display: grid;
  gap: 0.85rem;
  min-height: 220px;
  padding: 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 249, 241, 0.65)),
    linear-gradient(135deg, rgba(13, 107, 107, 0.14), rgba(200, 90, 33, 0.12));
  cursor: pointer;
  text-align: left;
  animation: cardIn 460ms ease both;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.experiment-card.is-active {
  border-color: rgba(200, 90, 33, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 235, 0.9)),
    linear-gradient(135deg, rgba(200, 90, 33, 0.22), rgba(13, 107, 107, 0.16));
  box-shadow:
    0 0 0 3px rgba(200, 90, 33, 0.18),
    0 18px 42px rgba(200, 90, 33, 0.22);
  transform: translateY(-2px);
}

.experiment-card.is-active h3 {
  color: var(--accent);
}

.experiment-card.is-active .experiment-summary {
  color: var(--ink);
}

.experiment-card:nth-child(2) {
  animation-delay: 40ms;
}

.experiment-card:nth-child(3) {
  animation-delay: 80ms;
}

.experiment-card:nth-child(4) {
  animation-delay: 120ms;
}

.experiment-card:nth-child(5) {
  animation-delay: 160ms;
}

.experiment-card:nth-child(6) {
  animation-delay: 200ms;
}

.experiment-card:nth-child(7) {
  animation-delay: 240ms;
}

.experiment-card:nth-child(8) {
  animation-delay: 280ms;
}

.experiment-code {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  background: var(--bg-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.experiment-card h3 {
  font-size: 1.35rem;
}

.experiment-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(13, 107, 107, 0.09);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1rem;
}

.detail-intro,
.detail-video,
.detail-steps {
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.detail-intro,
.detail-video {
  padding: 1.1rem;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.detail-description {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.detail-meta {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 1.1rem;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(16, 33, 50, 0.04);
}

.meta-item span:first-child {
  color: var(--muted);
}

.steps-title,
.video-title {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.detail-steps {
  padding: 1.1rem;
}

.steps-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.85rem;
}

.steps-list li {
  color: var(--ink);
  line-height: 1.65;
  padding-left: 0.35rem;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(160deg, #13283f, #0a1828);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-frame video {
  display: block;
  width: 100%;
  max-height: 420px;
  background: #000;
}

.video-fallback {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 1.25rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.video-frame video[hidden],
.video-fallback[hidden] {
  display: none;
}

.video-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.empty-state {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background: rgba(16, 33, 50, 0.04);
  color: var(--muted);
  line-height: 1.7;
}

.upload-card {
  background:
    linear-gradient(135deg, rgba(13, 107, 107, 0.12), rgba(200, 90, 33, 0.08)),
    rgba(255, 251, 245, 0.85);
}

.upload-note {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(16, 33, 50, 0.06);
  color: var(--ink);
}

.footer {
  padding: 0 0 2.5rem;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .experiment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-layout,
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar,
  .section-heading,
  .detail-title-row {
    flex-direction: column;
    align-items: start;
  }

  .search-field {
    min-width: 0;
    width: 100%;
  }

  .experiment-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .main-shell,
  .footer {
    width: min(100% - 1rem, 1180px);
  }

  .hero-copy,
  .hero-panel,
  .section-card {
    border-radius: 24px;
  }

  .video-frame video,
  .video-fallback {
    min-height: 220px;
  }
}
