:root {
  --ink: #39271a;
  --bark: #5b3a24;
  --brown: #7d4b25;
  --amber: #e8a83f;
  --gold: #ffd66d;
  --cream: #fff5d7;
  --paper: #fbebc1;
  --sage: #506f4b;
  --blue: #3e6e7f;
  --coral: #bc5d3d;
  --shadow: 0 24px 80px rgba(70, 44, 22, .2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f5ddb0;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 19% 28%, rgba(255, 255, 255, .72), transparent 26rem),
    radial-gradient(circle at 82% 24%, rgba(234, 169, 63, .34), transparent 24rem),
    linear-gradient(120deg, #fff3cc, #f1cf85 48%, #e2ad5f);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image:
    linear-gradient(rgba(91, 58, 36, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 58, 36, .04) 1px, transparent 1px);
  background-size: 34px 34px;
  mix-blend-mode: multiply;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    radial-gradient(rgba(91, 58, 36, .13) .8px, transparent .8px),
    radial-gradient(rgba(255, 255, 255, .18) .8px, transparent .8px);
  background-position: 0 0, 11px 13px;
  background-size: 23px 23px;
  opacity: .45;
}

a {
  color: inherit;
}

.storybook-frame {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.storybook-frame::before,
.storybook-frame::after {
  position: absolute;
  left: 0;
  z-index: 2;
  width: 100%;
  pointer-events: none;
  content: "";
}

.storybook-frame::before {
  top: 0;
  height: clamp(170px, 24vw, 330px);
  background: linear-gradient(
    to bottom,
    rgba(245, 192, 81, .04) 0%,
    rgba(250, 226, 167, .26) 46%,
    rgba(250, 226, 167, .72) 74%,
    rgba(250, 226, 167, 0) 100%
  );
}

.storybook-frame::after {
  bottom: 0;
  height: clamp(170px, 22vw, 300px);
  background: linear-gradient(
    to top,
    rgba(224, 166, 78, .52) 0%,
    rgba(239, 196, 113, .48) 48%,
    rgba(239, 196, 113, 0) 100%
  );
}

.storybook-frame img {
  position: absolute;
  z-index: 1;
  user-select: none;
}

.frame-top {
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(118px, 21vw, 315px);
  object-fit: cover;
  object-position: top center;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 68%, rgba(0, 0, 0, .72) 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 68%, rgba(0, 0, 0, .72) 82%, transparent 100%);
}

.frame-bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: clamp(108px, 18vw, 260px);
  object-fit: cover;
  object-position: bottom center;
  opacity: .94;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 66%, rgba(0, 0, 0, .7) 82%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, #000 66%, rgba(0, 0, 0, .7) 82%, transparent 100%);
}

.frame-left,
.frame-right {
  top: clamp(98px, 13vw, 188px);
  bottom: clamp(86px, 10vw, 156px);
  width: clamp(38px, 6vw, 86px);
  height: auto;
  object-fit: contain;
  opacity: .9;
}

.frame-left {
  left: 0;
}

.frame-right {
  right: 0;
}

.page-shell {
  position: relative;
  z-index: 20;
  width: min(1180px, calc(100% - clamp(38px, 10vw, 156px)));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(190px, 20vw, 285px) 0 clamp(150px, 18vw, 245px);
}

.topbar {
  position: fixed;
  top: clamp(86px, 9vw, 142px);
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - clamp(38px, 10vw, 156px)));
  margin: 0;
  transform: translateX(-50%);
}

.brand,
.nav-links {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: .62rem;
  padding: .34rem .62rem .34rem .34rem;
  border-radius: 999px;
  background: rgba(255, 245, 215, .58);
  box-shadow: 0 12px 28px rgba(91, 58, 36, .08);
  text-decoration: none;
  font-family: "Iowan Old Style", "Palatino", Georgia, serif;
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 3px solid var(--bark);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 -5px 0 rgba(125, 75, 37, .14);
  color: var(--bark);
  line-height: 1;
}

.nav-links {
  gap: .35rem;
  padding: .4rem;
  border: 2px solid rgba(91, 58, 36, .24);
  border-radius: 999px;
  background: rgba(255, 245, 215, .74);
  box-shadow: 0 14px 34px rgba(91, 58, 36, .12);
  backdrop-filter: blur(6px);
}

.nav-links a {
  padding: .58rem .86rem;
  border-radius: 999px;
  color: #51351f;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover {
  background: #fff3c4;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: clamp(18px, 3vw, 36px);
  min-height: clamp(640px, 74vh, 820px);
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  padding-top: clamp(8px, 2vw, 34px);
}

.eyebrow {
  width: fit-content;
  margin: 0 0 1rem;
  padding: .48rem .76rem;
  border: 2px solid rgba(91, 58, 36, .28);
  border-radius: 999px;
  background: rgba(255, 245, 215, .7);
  color: var(--sage);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

h1 {
  max-width: 9.6em;
  margin: 0;
  font-family: "Iowan Old Style", "Palatino", Georgia, serif;
  font-size: clamp(3.05rem, 7vw, 6.9rem);
  line-height: .9;
  letter-spacing: 0;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  margin: 1.35rem 0 0;
  color: #563821;
  font-family: "Charter", "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.05rem, 1.55vw, 1.32rem);
  line-height: 1.55;
}

.hero-actions {
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .84rem 1.08rem;
  border: 3px solid var(--bark);
  border-radius: 999px;
  background: #fff2b8;
  box-shadow: 0 7px 0 rgba(91, 58, 36, .2);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.hero-actions a:first-child {
  background: var(--ink);
  color: var(--cream);
}

.hero-actions a:hover {
  box-shadow: 0 3px 0 rgba(91, 58, 36, .25);
  transform: translateY(4px) rotate(-1deg);
}

.hive-stage {
  position: relative;
  width: min(690px, 72vw);
  min-height: clamp(390px, 46vw, 610px);
  margin-inline: auto;
}

.hive-stage::before {
  position: absolute;
  inset: 9% 8% 7%;
  z-index: -1;
  border: 2px solid rgba(91, 58, 36, .16);
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(255, 244, 192, .82), rgba(255, 232, 150, .22) 62%, transparent 68%);
  filter: blur(.2px);
}

.hive-image {
  position: absolute;
  inset: -2%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 36px rgba(91, 58, 36, .18));
}

.link-hive {
  margin-top: clamp(40px, 8vw, 92px);
  scroll-margin-top: 180px;
}

.section-heading {
  display: grid;
  justify-items: center;
  margin-bottom: 1.2rem;
  text-align: center;
}

.section-heading h2 {
  max-width: 10em;
  margin: 0;
  font-family: "Iowan Old Style", "Palatino", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: .96;
  letter-spacing: 0;
}

.cell-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .95rem;
  width: min(820px, 100%);
  margin: 0 auto;
}

.cell-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 1.2rem;
  min-height: 118px;
  padding: 1.05rem 1.2rem;
  border: 3px solid rgba(91, 58, 36, .7);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 250, 226, .94), rgba(246, 203, 107, .88)),
    #fff2c1;
  box-shadow: 0 13px 0 rgba(91, 58, 36, .12);
  color: var(--ink);
  text-decoration: none;
  transform: rotate(var(--tilt, -.45deg));
  transition: transform .18s ease, box-shadow .18s ease;
}

.cell-card:nth-child(2) {
  --tilt: 1.2deg;
}

.cell-card:nth-child(3) {
  --tilt: -.4deg;
}

.cell-card:nth-child(4) {
  --tilt: 1deg;
}

.cell-card:nth-child(5) {
  --tilt: -.8deg;
}

.featured-cell {
  background:
    linear-gradient(135deg, rgba(255, 250, 226, .96), rgba(255, 218, 109, .92)),
    #fff2c1;
}

.cell-card:hover {
  box-shadow: 0 6px 0 rgba(91, 58, 36, .16);
  transform: translateY(7px) rotate(0deg);
}

.cell-kicker,
.cell-card strong,
.cell-card span:last-child {
  display: block;
}

.cell-kicker {
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: 0;
  display: grid;
  place-items: center;
  border: 2px solid rgba(91, 58, 36, .36);
  border-radius: 50%;
  background: rgba(255, 245, 215, .62);
  color: var(--coral);
  font-size: .78rem;
  font-weight: 900;
}

.cell-card strong {
  margin-bottom: .3rem;
  font-family: "Iowan Old Style", "Palatino", Georgia, serif;
  font-size: clamp(1.35rem, 2.7vw, 2.1rem);
  overflow-wrap: anywhere;
}

.cell-card span:last-child {
  color: #674327;
  font-family: "Charter", "Iowan Old Style", Georgia, serif;
  font-size: .98rem;
  line-height: 1.35;
}

.note-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  max-width: 780px;
  margin: clamp(34px, 6vw, 74px) auto 0;
  padding: 1.1rem 1.25rem;
  border: 2px dashed rgba(91, 58, 36, .42);
  border-radius: 7px;
  background: rgba(255, 245, 215, .62);
  scroll-margin-top: 180px;
}

.note-strip img {
  width: 72px;
  filter: drop-shadow(0 6px 6px rgba(91, 58, 36, .16));
}

.note-strip p {
  margin: 0;
  color: #563821;
  font-family: "Charter", "Iowan Old Style", Georgia, serif;
  font-size: 1.06rem;
  line-height: 1.45;
}

@media (max-width: 920px) {
  .page-shell {
    width: min(720px, calc(100% - 68px));
    padding-top: clamp(150px, 24vw, 190px);
  }

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

  .topbar {
    top: clamp(76px, 11vw, 112px);
    align-items: center;
  }

  .hero {
    gap: 1.25rem;
    min-height: auto;
  }

  .hive-stage {
    min-height: min(96vw, 590px);
    order: -1;
  }

}

@media (max-width: 620px) {
  .frame-left,
  .frame-right {
    opacity: .45;
    width: 34px;
  }

  .frame-bottom {
    opacity: .16;
  }

  .page-shell {
    width: min(100% - 32px, 520px);
    padding-top: 138px;
  }

  .topbar {
    top: 72px;
    gap: .75rem;
  }

  .nav-links {
    width: auto;
    justify-content: space-between;
  }

  .nav-links a {
    padding-inline: .45rem;
    text-align: center;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.7rem);
  }

  .hive-stage {
    width: min(100%, 430px);
    min-height: 390px;
  }

  .cell-board,
  .note-strip {
    grid-template-columns: 1fr;
  }

  .cell-card {
    grid-template-columns: 1fr;
    gap: .75rem;
    min-height: 150px;
  }

  .note-strip img {
    width: 60px;
  }
}
