:root {
  --white: #fffefe;
  --surface: #f8f8f7;
  --surface-soft: #fbfbfb;
  --ink: #111c2b;
  --muted: #687383;
  --line: #dfe3e7;
  --mint: #8fcac1;
  --mint-dark: #367f78;
  --coral: #f18a7e;
  --lavender: #afa0d9;
  --shadow: 0 16px 42px rgba(23, 31, 40, 0.07);
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --shell: min(1380px, calc(100vw - 96px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
}

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

button {
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.works-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 254, 254, 0.94);
  border-bottom: 1px solid #f0f1f2;
  backdrop-filter: blur(15px);
}

.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4.7vw, 68px);
  width: var(--shell);
  min-height: 108px;
  margin: 0 auto;
}

.works-brand {
  display: block;
  width: clamp(190px, 20vw, 246px);
  margin-right: auto;
}

.works-nav {
  display: flex;
  gap: clamp(26px, 3.7vw, 56px);
  align-items: center;
  color: #1c2737;
  font-size: 1.02rem;
  font-weight: 500;
}

.works-nav a {
  position: relative;
  padding: 10px 0;
}

.works-nav a::after {
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 100%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--mint), var(--coral), var(--lavender));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.works-nav a:is(:hover, :focus-visible)::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 33px;
  border-radius: 9px;
  font-weight: 500;
  transition: box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.button-dark {
  border: 2px solid transparent;
  color: #ffffff;
  background:
    linear-gradient(135deg, #152132, #252e3b) padding-box,
    linear-gradient(90deg, var(--mint), var(--coral), var(--lavender)) border-box;
}

.button-dark:is(:hover, :focus-visible) {
  box-shadow: 0 12px 25px rgba(28, 37, 48, 0.2);
  transform: translateY(-2px);
}

.button-outline {
  border: 1px solid #253043;
  background: var(--white);
}

.button-outline:is(:hover, :focus-visible) {
  border-color: var(--mint-dark);
  box-shadow: 0 8px 22px rgba(44, 73, 77, 0.11);
  transform: translateY(-2px);
}

.header-action {
  min-width: 154px;
  min-height: 54px;
}

.works-hero {
  background: linear-gradient(110deg, var(--white) 34%, #f8f9f9 100%);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(420px, 46.5%) minmax(380px, 1fr);
  align-items: center;
  width: var(--shell);
  min-height: min(680px, calc(100svh - 108px));
  margin: 0 auto;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding: 54px 0 70px;
}

.hero-copy h1 {
  max-width: 630px;
  margin: 0 0 24px;
  color: #162131;
  font-family: var(--display);
  font-size: clamp(3.65rem, 5.45vw, 5.15rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.wide-break {
  display: inline;
}

.hero-copy p {
  max-width: 525px;
  margin: 0 0 38px;
  color: #596575;
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.hero-image {
  align-self: stretch;
  margin: 0 calc((var(--shell) - 100vw) / 2) 0 -90px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 100%);
}

.worlds {
  padding: clamp(72px, 7vw, 98px) max(calc((100vw - 1270px) / 2), 48px) 70px;
}

.section-heading {
  max-width: 780px;
  margin: 0 auto 39px;
  text-align: center;
}

.section-heading h2,
.process h2,
.commission h2 {
  margin: 13px 0 10px;
  font-size: clamp(2.4rem, 3.5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.cube-mark {
  display: block;
  width: 42px;
  height: auto;
  margin: 0 auto;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 27px;
  max-width: 1270px;
  margin: 0 auto;
}

.world-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 5px 17px rgba(31, 36, 44, 0.05);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.tavern-world:is(:hover, :focus-visible),
.home-world:is(:hover, :focus-visible) {
  border-color: var(--mint);
  box-shadow: 0 16px 34px rgba(31, 42, 43, 0.12);
  transform: translateY(-3px);
}

.world-card > img {
  width: 100%;
  aspect-ratio: 16 / 8.3;
  object-fit: cover;
}

.world-body {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 175px;
  align-items: end;
  gap: 17px 24px;
  padding: 27px 31px 28px;
}

.world-body > div {
  grid-column: 1 / 3;
}

.world-body h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(2rem, 2.5vw, 2.3rem);
  font-weight: 600;
  line-height: 1;
}

.world-body p {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
  line-height: 1.53;
}

.world-button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-width: 220px;
  padding: 15px 20px;
  border-radius: 7px;
  color: white;
  background: #1d524b;
  font-weight: 500;
}

.world-button strong {
  font-size: 1.25rem;
  font-weight: 400;
}

.home-world {
  border-color: #ded8eb;
}

.coming-soon {
  grid-column: 2;
  flex-shrink: 0;
  padding: 11px 20px;
  border: 1px solid #d2c5ec;
  border-radius: 999px;
  color: #7565a8;
  background: #f8f5fe;
  font-size: 0.93rem;
}

.process {
  width: min(1270px, calc(100vw - 96px));
  margin: 0 auto 42px;
  padding-top: 4px;
}

.process-shell {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  padding: 35px clamp(30px, 4vw, 52px) 38px;
}

.process h2 {
  margin-top: 0;
  margin-bottom: 30px;
  text-align: center;
  font-size: clamp(2.05rem, 2.8vw, 2.45rem);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.process-grid article {
  display: flex;
  align-items: center;
  gap: 20px;
}

.step-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid;
  border-radius: 50%;
  font-size: 1.55rem;
}

.step-icon.mint {
  color: var(--mint-dark);
  background: #f1faf8;
}

.step-icon.coral {
  color: #db6155;
  background: #fff5f3;
}

.step-icon.lavender {
  color: #806bb7;
  background: #f7f4fd;
}

.process-grid h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
}

.process-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.commission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  width: min(1270px, calc(100vw - 96px));
  margin: 0 auto 70px;
  padding: 33px clamp(34px, 5vw, 62px);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.commission h2 {
  margin: 0 0 7px;
  font-family: var(--display);
  font-size: clamp(2rem, 2.6vw, 2.4rem);
  font-weight: 600;
}

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

.works-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 34px;
  width: var(--shell);
  margin: 0 auto;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
}

.works-footer::before {
  position: absolute;
  top: -2px;
  left: 0;
  width: 190px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--mint), var(--coral), var(--lavender));
}

.footer-brand img {
  width: 180px;
}

.works-footer nav {
  display: flex;
  gap: clamp(20px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.9rem;
}

.works-footer nav :is(a, button):hover {
  color: var(--ink);
}

.works-footer p {
  justify-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.contact-toast {
  position: fixed;
  z-index: 10;
  right: 28px;
  bottom: 28px;
  max-width: min(390px, calc(100vw - 42px));
  padding: 17px 22px;
  border: 1px solid #d4dce1;
  border-radius: 9px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
}

@media (max-width: 1080px) {
  :root {
    --shell: calc(100vw - 48px);
  }

  .header-shell {
    gap: 22px;
  }

  .works-nav {
    gap: 19px;
    font-size: 0.95rem;
  }

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

  .hero-image {
    margin-left: -30px;
  }

  .worlds {
    padding-right: 24px;
    padding-left: 24px;
  }

  .world-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 790px) {
  :root {
    --shell: calc(100vw - 38px);
  }

  .works-header {
    position: relative;
  }

  .header-shell {
    min-height: 84px;
  }

  .works-brand {
    width: 164px;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 7px;
    order: 2;
    width: 41px;
    padding: 8px 4px;
  }

  .nav-toggle span {
    width: 27px;
    height: 2px;
    background: var(--ink);
  }

  .works-nav {
    position: absolute;
    top: 83px;
    left: -19px;
    right: -19px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 18px 22px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: white;
  }

  .works-nav.open {
    display: flex;
  }

  .header-action {
    min-width: 0;
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .hero-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
  }

  .hero-copy {
    width: var(--shell);
    padding: 49px 0 39px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 14vw, 3.7rem);
  }

  .wide-break {
    display: none;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .hero-image {
    width: 100%;
    height: 330px;
    margin: 0;
  }

  .hero-image img {
    -webkit-mask-image: none;
    mask-image: none;
    object-position: 69% center;
  }

  .worlds {
    padding-top: 55px;
    padding-bottom: 43px;
  }

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

  .world-body {
    min-height: 0;
    padding: 22px 23px 25px;
  }

  .process,
  .commission {
    width: var(--shell);
  }

  .process-shell {
    padding: 30px 23px;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .commission {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 50px;
    padding: 28px 23px;
  }

  .works-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 25px;
    text-align: center;
  }

  .footer-brand img {
    width: 210px;
  }

  .works-footer nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .works-footer p {
    justify-self: center;
  }
}
