:root {
  --mi-home-bg: #0b0908;
  --mi-home-panel: rgba(15, 12, 10, 0.84);
  --mi-home-panel-soft: rgba(255, 255, 255, 0.02);
  --mi-home-border: rgba(231, 197, 126, 0.12);
  --mi-home-text: #f3ede3;
  --mi-home-text-muted: #b9b0a1;
  --mi-home-text-soft: #908777;
  --mi-home-gold: #e3bd72;
  --mi-home-gold-bright: #f1d89d;
  --mi-home-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --mi-home-radius-xl: 18px;
  --mi-home-radius-lg: 10px;
  --mi-home-radius-md: 8px;
  --mi-home-shell-width: 1440px;
  --mi-home-font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --mi-home-font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mi-home-transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--mi-home-bg);
}

body.mi-home-body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #14100d 0%, #0b0908 46%, #090807 100%);
  color: var(--mi-home-text);
  font-family: var(--mi-home-font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mi-home-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(227, 189, 114, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 46%);
  opacity: 0.86;
}

.mi-home-shell {
  position: relative;
  width: min(calc(100% - clamp(18px, 4vw, 48px)), var(--mi-home-shell-width));
  margin: 0 auto;
  padding: 26px 0 46px;
}

.mi-home-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 26px;
}

.mi-home-hero {
  position: relative;
  min-height: clamp(600px, 76svh, 700px);
  overflow: hidden;
  border: 1px solid rgba(231, 197, 126, 0.12);
  border-radius: var(--mi-home-radius-xl);
  background: #0b0908;
  box-shadow: var(--mi-home-shadow);
}

.mi-home-hero::before,
.mi-home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mi-home-hero::before {
  background:
    linear-gradient(90deg, rgba(11, 9, 8, 0.94) 0%, rgba(11, 9, 8, 0.86) 35%, rgba(11, 9, 8, 0.46) 62%, rgba(11, 9, 8, 0.14) 100%),
    linear-gradient(180deg, rgba(11, 9, 8, 0.1), rgba(11, 9, 8, 0.78));
}

.mi-home-hero::after {
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: inherit;
}

.mi-home-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 20px;
  width: min(680px, 58%);
  min-height: clamp(600px, 76svh, 700px);
  padding: 72px 0 72px 68px;
}

.mi-home-kicker,
.mi-home-text-link,
.mi-home-footer-link {
  color: var(--mi-home-gold-bright);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mi-home-kicker {
  margin: 0 0 2px;
}

.mi-home-hero-title,
.mi-home-section-title,
.mi-home-journal-title {
  margin: 0;
  font-family: var(--mi-home-font-display);
  font-weight: 500;
  letter-spacing: 0;
}

.mi-home-hero-title {
  max-width: 12ch;
  font-size: 4.7rem;
  line-height: 0.96;
}

.mi-home-hero-title-mobile {
  display: none;
}

.mi-home-hero-subheadline,
.mi-home-section-copy,
.mi-home-journal-excerpt {
  margin: 0;
  color: var(--mi-home-text-muted);
  line-height: 1.65;
}

.mi-home-hero-subheadline {
  max-width: 33rem;
  font-size: 1.08rem;
}

.mi-home-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.mi-home-button,
.mi-home-text-link,
.mi-home-footer-link,
.mi-home-journal-card {
  text-decoration: none;
}

.mi-home-button,
.mi-home-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  transition:
    transform var(--mi-home-transition),
    background-color var(--mi-home-transition),
    color var(--mi-home-transition),
    border-color var(--mi-home-transition),
    box-shadow var(--mi-home-transition);
}

.mi-home-button:hover,
.mi-home-button:focus-visible,
.mi-home-journal-card:hover,
.mi-home-journal-card:focus-visible {
  transform: translateY(-1px);
}

.mi-home-button--primary {
  color: #17120c;
  background: linear-gradient(135deg, var(--mi-home-gold-bright), var(--mi-home-gold));
  box-shadow: 0 14px 34px rgba(227, 189, 114, 0.18);
}

.mi-home-button--primary:hover,
.mi-home-button--primary:focus-visible {
  box-shadow: 0 18px 40px rgba(227, 189, 114, 0.24);
}

.mi-home-button--secondary {
  color: var(--mi-home-text);
  border: 1px solid rgba(243, 237, 227, 0.16);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(16px);
}

.mi-home-button--secondary:hover,
.mi-home-button--secondary:focus-visible {
  border-color: rgba(241, 216, 157, 0.34);
}

.mi-home-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 100%;
}

.mi-home-carousel-track {
  display: flex;
  gap: 0;
  width: 300%;
  height: 100%;
  animation: mi-home-carousel-rotate 18s ease-in-out infinite;
}

.mi-home-carousel-slide {
  flex: 0 0 33.3333%;
  min-width: 0;
  margin: 0;
}

.mi-home-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(600px, 76svh, 700px);
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.92) contrast(1.05);
}

.mi-home-footer {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(231, 197, 126, 0.1);
  border-radius: var(--mi-home-radius-lg);
  background: linear-gradient(180deg, rgba(18, 15, 13, 0.82), rgba(10, 8, 7, 0.84));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.mi-home-footer {
  padding: 30px;
}

.mi-home-section {
  padding: 2px 0 0;
}

.mi-home-section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.mi-home-section-heading.mi-home-section-heading--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.mi-home-section-heading--split > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.mi-home-section-heading--split > .mi-home-text-link {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.mi-home-section-title {
  font-size: 1.85rem;
  line-height: 1.05;
}

.mi-home-text-link:hover,
.mi-home-text-link:focus-visible,
.mi-home-footer-link:hover,
.mi-home-footer-link:focus-visible {
  color: var(--mi-home-text);
}

.mi-home-journal-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mi-home-journal-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--mi-home-radius-md);
  background: rgba(255, 255, 255, 0.024);
  transition:
    transform var(--mi-home-transition),
    border-color var(--mi-home-transition),
    background-color var(--mi-home-transition);
}

.mi-home-journal-card:hover,
.mi-home-journal-card:focus-visible {
  border-color: rgba(241, 216, 157, 0.2);
  background: rgba(255, 255, 255, 0.036);
}

.mi-home-journal-title {
  color: var(--mi-home-gold-bright);
  font-size: 1.2rem;
  line-height: 1.18;
}

.mi-home-journal-excerpt {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.95rem;
}

.mi-home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.mi-home-footer-logo {
  display: block;
  width: 194px;
  height: auto;
}

.mi-home-footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

@media (min-width: 1600px) {
  .mi-home-shell {
    width: min(calc(100% - 80px), 1500px);
  }

  .mi-home-hero,
  .mi-home-hero-content,
  .mi-home-carousel-slide img {
    min-height: 700px;
  }

  .mi-home-hero-content {
    padding-left: 78px;
  }
}

@media (max-width: 1100px) {
  .mi-home-shell {
    padding-top: 16px;
  }

  .mi-home-hero,
  .mi-home-hero-content,
  .mi-home-carousel-slide img {
    min-height: clamp(560px, calc(100svh - 104px), 620px);
  }

  .mi-home-hero-content {
    width: min(600px, 68%);
    padding: 48px 0 48px 42px;
  }

  .mi-home-hero-title {
    font-size: clamp(3.15rem, 5vw, 3.75rem);
  }
}

@media (max-width: 900px) {
  .mi-home-main {
    gap: 22px;
  }

  .mi-home-hero,
  .mi-home-hero-content,
  .mi-home-carousel-slide img {
    min-height: clamp(540px, calc(100svh - 116px), 600px);
  }

  .mi-home-hero-content {
    width: min(560px, 78%);
    padding-left: 34px;
  }

  .mi-home-hero-title {
    font-size: clamp(2.75rem, 7vw, 3.35rem);
  }
}

@media (max-width: 760px) {
  .mi-home-shell {
    padding-top: 10px;
    padding-bottom: 32px;
  }

  .mi-home-main {
    gap: 16px;
  }

  .mi-home-hero {
    min-height: 0;
    height: auto;
  }

  .mi-home-hero-content {
    min-height: 0;
    height: auto;
  }

  .mi-home-carousel,
  .mi-home-carousel-track,
  .mi-home-carousel-slide,
  .mi-home-carousel-slide img {
    min-height: 0;
    height: 100%;
  }

  .mi-home-hero::before {
    background:
      linear-gradient(180deg, rgba(11, 9, 8, 0.84) 0%, rgba(11, 9, 8, 0.66) 38%, rgba(11, 9, 8, 0.5) 64%, rgba(11, 9, 8, 0.76) 100%),
      linear-gradient(90deg, rgba(11, 9, 8, 0.78) 0%, rgba(11, 9, 8, 0.38) 66%, rgba(11, 9, 8, 0.58) 100%);
  }

  .mi-home-hero-content {
    align-content: start;
    width: 100%;
    gap: 11px;
    padding: 22px 18px 18px;
  }

  .mi-home-carousel-slide img {
    object-position: center center;
    filter: saturate(0.9) contrast(1.06) brightness(0.9);
  }

  .mi-home-kicker {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
  }

  .mi-home-hero-title {
    max-width: 100%;
    font-size: clamp(1.95rem, 8.2vw, 2.28rem);
    line-height: 0.98;
  }

  .mi-home-hero-title-desktop {
    display: none;
  }

  .mi-home-hero-title-mobile {
    display: inline;
  }

  .mi-home-hero-subheadline {
    max-width: 20rem;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .mi-home-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 2px;
  }

  .mi-home-button {
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.6rem;
    letter-spacing: 0.09em;
  }

  .mi-home-footer {
    padding: 20px;
  }

  .mi-home-section-heading.mi-home-section-heading--split {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
  }

  .mi-home-section-title {
    font-size: clamp(1.32rem, 6vw, 1.62rem);
  }

  .mi-home-section-heading--split > .mi-home-text-link {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .mi-home-journal-grid {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .mi-home-journal-card {
    min-height: 0;
    padding: 16px;
  }

  .mi-home-journal-title {
    font-size: 1.05rem;
  }

  .mi-home-journal-excerpt {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .mi-home-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .mi-home-shell {
    width: min(calc(100% - 12px), var(--mi-home-shell-width));
  }

  .mi-home-hero,
  .mi-home-hero-content,
  .mi-home-carousel-slide img {
    min-height: 0;
    height: auto;
  }

  .mi-home-hero-content {
    padding: 20px 15px 17px;
  }

  .mi-home-hero-title {
    font-size: clamp(1.72rem, 8vw, 1.96rem);
  }

  .mi-home-hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .mi-home-button {
    flex: 1 1 100%;
  }

  .mi-home-section-heading--split > .mi-home-text-link {
    margin-left: 0;
  }
}

@keyframes mi-home-carousel-rotate {
  0%, 28% {
    transform: translateX(0);
  }
  33%, 61% {
    transform: translateX(-33.3333%);
  }
  66%, 94% {
    transform: translateX(-66.6666%);
  }
  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mi-home-carousel-track {
    animation: none;
  }

  .mi-home-button,
  .mi-home-journal-card {
    transition: none;
  }
}
